Revista PROGRAMAR Edição 51 – Dezembro de 2015


(clica para download)

A Revista PROGRAMAR está de volta com mais uma edição. Desta vez temos como tema de capa o artigo Travessia de uma árvore de diretórios usando recursividade, da autoria de Patricio Domingues, Vítor Carreira e Carlos Grilo. Adicionalmente, nesta edição poderá encontrar mais 19 artigos, que listamos de seguida :

Continuaremos também a premiar os autores dos três melhores artigos, dado o sucesso nas edições anteriores. E os leitores devem dar a sua opinião para que possamos premiar correctamente. Para isso vote em http://tinyurl.com/ProgramarED51-V.

#PGGD29 – 29º Portugal Girl Geek Dinner – Lisboa

No próximo encontro de Lisboa vamos ser recebidas pela Main Hub – Innovation, Incubation and Development!

Contamos contigo no dia 26 de novembro!
Agenda:

19:00 Registo / Snacks & Drinks

19:30 Boas-vindas

19:40 Rita Queiroz – Apresentar o desafio do Marketing na área de TI

20:20 Sofia Azevedo – (Un)process or the truth about functional analysis

21:00 Encerramento

Apoio:

Main Hub
Nota: Homens podem também participar desde que sejam acompanhantes de uma geek girl.

 

Sobre os Girl Geek Dinners…

Os Girl Geek Dinners nasceram em Londres há 7 anos. Este conceito reside em organizar eventos temáticos para mulheres apaixonadas por tecnologia, sejam elas, programadoras, investigadoras, empreendedoras, designers ou simplesmente interessadas por tópicos relacionados com tecnologia.

A ideia por detrás destes jantares é simples: num ambiente relaxado e informal proporcionar um ambiente para networking e ao mesmo tempo ouvir uma ou duas apresentações dedicadas a um tema tecnológico ou de negócio. Mais do que isso é também o espaço ideal para dar a conhecer o que se anda a fazer no mundo da tecnologia e new media em Portugal.

Website | Facebook | Twitter | hashtag oficial: #PGGD29

Tem dúvidas sobre #PGGD29 – 29º Portugal Girl Geek Dinner – Lisboa?Contacte Portugal Girl Geek Dinners

How to Try Web Apps and Mobile Apps for Free

Editor’s note: The following post was written by .NET MVP Sara Silva as part of our Technical Tuesday series

To use Microsoft Azure it is necessary to link a credit card to the account, otherwise it is not possible to create a new account, which in some cases blocks new clients to try Azure. To help on it Microsoft released the tryappservice.azure.com with the goal to provide a simple way to learn and test Azure App Services without an account, for free. In this article I will show you how to create and test Web Apps and Mobile Apps using this reference.

See more here:
[The Microsoft MVP Award Program Blog] How to Try Web Apps and Mobile Apps for Free

Xamarin Guide 5. Add ShareService

Scope

This Xamarin Workshop Guide was created for the The Portuguese National Meeting of IT Students (ENEI) by Sara Silva which original content is available here. With the goal to extend it to the global community, it was published in a new project called Xam Community Workshop, which the main goal is to any developer, or user group customize it to theirs events.

Guides 5. Add ShareService

An application which allow to share content in social networks brings more value to the users, because allow to share with others something the user think is important or relevant. An application for events like 1010 ENEI Sessions App could not miss this feature.

Each platform has your own implementation to share content in social network. This means, we need to create an abstraction of the share feature to use it in ENEI.SessionsApp and then in each platform we need to implement that abstraction. Let’s see how the Abstraction Pattern can be created! In ENEI.SessionsApp project, create the interface IShareService as following:

public interface IShareService 
{ 
void ShareLink(string title, string status, string link); 
}

Then is required to create the implementation of the IShareService in each platform. Let’s define the following implementation by platform:

Windows Phone

[assembly: Dependency(typeof(ShareService))]
namespace ENEI.SessionsApp.WinPhone.Services
{
    public class ShareService : IShareService
    {
      public void ShareLink(string title, string status, string link)
      {
        var task = new ShareLinkTask { Title = title, Message = status, LinkUri = new Uri(link) };
        Device.BeginInvokeOnMainThread(() =>
        {
            try
            {
                task.Show();
            }
            catch (Exception ex)
            {
             // todo handle the error   
            }
        });
    }
  }
}

Android

 [assembly: Dependency(typeof(ShareService))]
 namespace ENEI.SessionsApp.Droid.Services
 {
   public class ShareService : IShareService
   {
     public void ShareLink(string title, string status, string link)
     {
        var intent = new Intent(global::Android.Content.Intent.ActionSend);
        intent.PutExtra(global::Android.Content.Intent.ExtraText, string.Format("{0} - {1}", status ?? string.Empty, link ?? string.Empty));
        intent.PutExtra(global::Android.Content.Intent.ExtraSubject, title ?? string.Empty);
        intent.SetType("text/plain");
        intent.SetFlags(ActivityFlags.ClearTop);
        intent.SetFlags(ActivityFlags.NewTask);
        Android.App.Application.Context.StartActivity(intent);
    }
  }
}

iOS

[assembly: Dependency(typeof(ShareService))]
namespace ENEI.SessionsApp.iOS.Services
{
public class ShareService : IShareService
{
    public void ShareLink(string title, string status, string link)
    {
        var actionSheet = new UIActionSheet("Share on");
        foreach (SLServiceKind service in Enum.GetValues(typeof(SLServiceKind)))
        {
            actionSheet.AddButton(service.ToString());
        }
        actionSheet.Clicked += delegate(object a, UIButtonEventArgs b)
        {
            SLServiceKind serviceKind = (SLServiceKind)Enum.Parse(typeof(SLServiceKind), actionSheet.ButtonTitle(b.ButtonIndex));
            ShareOnService(serviceKind, title, status, link);
        };
        actionSheet.ShowInView(UIApplication.SharedApplication.KeyWindow.RootViewController.View);
    }

    private void ShareOnService(SLServiceKind service, string title, string status, string link)
    {
        if (SLComposeViewController.IsAvailable(service))
        {
            var slComposer = SLComposeViewController.FromService(service);
            slComposer.SetInitialText(status);
            slComposer.SetInitialText(title != null ? string.Format("{0} {1}", title, status) : status);
            if (link != null)
            {
                slComposer.AddUrl(new NSUrl(link));
            }
            slComposer.CompletionHandler += (result) =>
            {
                UIApplication.SharedApplication.KeyWindow.RootViewController.InvokeOnMainThread(() =>
                {
                    UIApplication.SharedApplication.KeyWindow.RootViewController.DismissViewController(true, null);
                });
            };
            UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(slComposer, true, null);
        }
    }
  }
}

This way, we are ready to call the share service in the SessionsView using DependencyService, as following: private void ShareGesture_OnTapped(object sender, EventArgs e) { var tappedEventArg = e as TappedEventArgs; if (tappedEventArg != null) { var session = tappedEventArg.Parameter as Session; if (session != null) { var shareService = DependencyService.Get(); if (shareService != null) { var status = string.Format(“Não percas a sessão {0} de {1}.”, session.Name, session.Speaker.Name); shareService.ShareLink(“ENEI 2015”, status, “https://enei.pt/”); } } } }

The DependencyService only will get the implementation from the IShareService because the implementation from each platform was registered using: [assembly: Dependency(typeof(ShareService))]

At this moment the 1010 ENEI Sessions App has support to share session in social network!

[ISCTE-IUL ACM Student Chapter] Introduction to Xamarin Platform

ISCTE-IUL ACM Student Chapter – Introduction to Xamarin Platform

xamarin ISCTE – Auditório 0NE02-Caiano Pereira

April 29 @ 19:3021:00

Speaker:  Sara Silva

Session Title: Introduction to Xamarin Platform

Session Description:

In this session you will learn what’s Xamarin and its products, how to create mobile cross-platform applications, using Xamarin for Android, iOS and Windows. And you will learn the two most used patterns in this kind of applications, and what’s cross-platform means.

After the theory you will see how to setup your own environment to create apps using Xamarin and then you will learn how to make your ideas in an app!

You can read the Portuguese article in Programar EMagazine: “Xamarin: Sem custos para estudantes“.

The mobile applications market is growing faster and faster, and current students are our future.

Registration: http://smarttalks-xamarin.eventbrite.co.uk

Location:  ISCTE – Auditório 0NE02-Caiano Pereira

See more: http://iscte.acm.org/event/xamarin/

MSDN Magazine – Azure Notification Hubs: Best Practices for Managing Devices

Today was published to everyone the April’s issue of MSDN Magazine, which has an article written by me.

MSDN Magazing cover

Thank you @LyalinDotCom @piyushjo @PauloMorgado @chrisrisner @MichaelDesmond and Elsa Dias for the support!

Slides from my presentation “Integrating Cortana in a Windows Phone application “

Yesterday I spoke  @ TNWikiSummit15  (online event) and I want to share the slides I used

Which source code is available on GitHub: https://github.com/AppStudioSamples/Menu