android l09 - windows phone and ios

46
Cloud Interaction Design Android

Upload: mohammad-shaker

Post on 15-Jan-2017

339 views

Category:

Software


0 download

TRANSCRIPT

CloudInteraction Design

Android

iOS

iPad Pro

Xcode

Model-View-Controller (MVC)

C

Objective-C

Data TypesBOOLidnil...

Foundation Data Types• NSInteger• NSPoint• NSRect• NSSize• NSUInteger• ...

Funcation Calls - Messages

Instance Methods

Messages

Swift

Swiftlet  tutorialTeam =  60  let  editorialTeam =  17  let  totalTeam =  tutorialTeam +  editorialTeam

//  Explicit  vs.  Inferred  Typinglet  tutorialTeam:  Int =  60let  tutorialTeam =  60

//  functionsfunc powerOfTwo(sum:  Double)  -­‐>  Double  {  return  sum  *  sum}

iOS Dev Centerhttps://developer.apple.com/devcenter/ios/

Coordinate System

Windows Phone

Windows Phone 8

Emulator

.NET Support

MVVM Model-View View-Model

MVVMtargeted at modern UI development platforms

which support Event-driven programming

MVVM HTML5, WPF, Silverlight, … etc.

MVVM more at https://en.wikipedia.org/wiki/MVVM

Binding Awesomeness<TextBlock Text="{Binding  Message}"  Margin="10“TextWrapping="Wrap"  FontSize="18"  Width="350"  />

Expression Blend

Binding Techniques - Templates

<ListBox Name="lstTwitter"  Margin="12,78,8,78"><ListBox.ItemTemplate>

<DataTemplate><StackPanel Orientation="Horizontal"  Height="110"  Margin="-­‐10,-­‐10,-­‐10,-­‐10">

<TextBlock Text="{Binding  Message}"  Margin="10"  TextWrapping="Wrap"  FontSize="18"  Width="350"  />

</StackPanel></DataTemplate>

</ListBox.ItemTemplate></ListBox>

WebClient

private  void  button2_Click(object  sender,  RoutedEventArgs e){

WebClient twitter  =  new  WebClient();

//  Handle  downloaded  data  when  finishedtwitter.DownloadStringCompleted +=  new  

DownloadStringCompletedEventHandler(twitter_DownloadStringCompleted);

//  Set  the  sitetwitter.DownloadStringAsync(new  

Uri("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name="  +  textBox1.Text));

}

WebClient

void  twitter_DownloadStringCompleted(object sender,  DownloadStringCompletedEventArgs e)

{if  (e.Error !=  null)

return;

XElement xmlTweets =  XElement.Parse(e.Result);lstTwitter.ItemsSource =  

from tweet  in  xmlTweets.Descendants("status")select new  TwitterItem{ImageSource =  

tweet.Element("user").Element("profile_image_url").Value,Message  =  tweet.Element("text").Value};}

Navigationvoid  GoToPage2_Click(object  sender,  RoutedEventArgs e){

NavigationService.Navigate(new  Uri("/Page2.xaml",  UriKind.Relative));}

Windows Azure Toolkit for Windows Phone

http://watwp.codeplex.com

Frameworks

Frameworks• jQuery Mobile• PhoneGap• Sencha Touch• Xamarin• AngularJS with iconic• … etc

How they work?