SlideShare a Scribd company logo
1 of 54
iPhone versus Windows Phone 7 Coding By Don Burnett
Mobile App Building From design to product.. In this slide show I will do a direct comparison of coding and tools of the Apple iPhone to the Windows Phone 7 environment from Microsoft.  To be fair to the Apple folks and accurately represent a good example, I chose a simple “hello world” master-detail example from a very popular iPhone coding blog called the iCode Blog.. If you want to do iPhone coding and development it’s one of the best sources of information out there and I wholeheartedly recommend it.. I then ported the same example to Windows Phone 7 to show some of the differences. Different isn’t always better and these are just my opinions but you can judge for yourself.  I am not anti-iDevice or anti-Apple. I own a bunch of Apple products and do development/design on that platform as well. But I hope you take a look at the differences and advantages to each for yourself. You choose! All Apple source code in this presentation quoted from: Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
Let’s Compare iPhone Versus Windows Phone 7 Who has the better designer developer content workflow story? Which one could you make an app and bring it to market with first? How do their developer support programs compare?
“Hello World App” comparison Tools comparison Designer Developer Story Be everywhere and make your apps shine
iPhone versus Windows Phone 7 Go get some coffee so we can get started, we’ll be done in 30 slides or so with the iPhone example… The following iPhone sample source application is sample code I am “quoting” directly from the iCode Blog. If you are doing iPhone app building this is one of the best places on the net to find out how to code for the iPhone. http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Open up X-Code and Select File->New Project… Select Navigation-Based Application and click Choose… Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Next: Name the  project Fruit. Click on File -> New File… The object we are creating will inherit from NSObject, so select NSObject Subclass and click Next. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App The next screen will ask you to name it. Go ahead and name it “Fruit” and make sure that “Also create Fruit.h” is checked. It should look like the screen below. Then, click Finish. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
Objective- C Your Father’s Programming Language
iPhone App Easy so far right?? It gets a bit more painful.. Now, we are going to define the properties of a “Fruit” object. For this application a fruit will have a name and a description. Open Fruit.h and add the following code: Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App We have created the properties needed to represent our fruit. There is one line that you may be unfamiliar with. The line -(id)initWithName:(NSString*)n description:(NSString *)desc; is a definition for a function. This function will be called to initialize a Fruit object. All NSObjects have an init method, but we want to create our own so that we can pass in a name and description when the object is created. Open up Fruit.m and add the following code: Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Here we implement the initWithName method. The code here seems pretty straight forward. We are basically setting our local copies of name and description to the arguments passed to this method. The important thing to notice here is the return self line. This is crucial for using this method as a constructor. It allows this function to return the newly created instance of a fruit object. Next, we are going to set the title of our main view. This is necessary to create a back button when transitioning between views. Open up RootViewController.m…In theviewDidLoad method, add the following code: Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App We are setting the title property of the RootViewController object to the string “Fruits”. Also, be sure to add the #import “Fruit.h” line at the top to include the fruit object in our project as well as @synthesize fruitView to add the “getter” and “setter” methods. Next, we are going to create an array of fruit objects. Open up FruitAppDelegate.h and add the following code: Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App All we are really adding here is an NSMutableArray property. I used NSMutableArray instead of NSArray because it has a few more methods making it more flexible. Now, open up FruitAppDelegate.m and add @synthesize fruits to the top. This is so other objects will have access to the fruits array. Also, be sure to include the import statement for Fruit.h. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Now add the following code to the applicationDidFinishLaunching method. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App the first three lines is creating new instances of a fruit object. Notice that instead of calling init, we are calling the initWithName method that we created. This is allowing us to pass in a name and a description to each of the fruits. The next line [self.fruits = [[NSMutableArrayalloc] initWithObjects:apple,orange,watermelon,nil]; builds a new array from the objects we just created. It is important to pass in nil as the last argument in an NSMutableArray. It will not work unless you remember this. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
Interface Builder 1993
Interface Builder Today
Change ? Improvement ? Better Design Story ? Images courtesy of: Jurassic Park - The Ride: Universal Studios Hollywood; Universal's Islands of Adventure
Welcome to..The state of mobile app programming 2010.. Images courtesy of: Jurassic Park - The Ride: Universal Studios Hollywood; Universal's Islands of Adventure
iPhone App Now we are going to create the view that will be displayed when the user selects a fruit. Double click on any one of your .xib files to open up Interface Builder. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Click File -> New and select view and click choose . Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App You should now see the new view (it will be blank) and the objects associated with it. We need some sort of text field to display the description of the fruit. For this tutorial I have chosen a UITextViewas opposed to a UITextField. This is because a UITextView is multi-line and is great for displaying more than one line of text. So, go ahead and drag it on to your view. Your view window should now look like this: Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Now click File -> Save. One important thing to keep in mind is to make sure you are saving it in the current project’s directory. It seems that every time I add a view to a project, the default directory is not my project’s directory. Name this file FruitViewController and click Save. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Another window should show up after you click save. It is asking you if you want to add this view to your project. Just check the box net to Fruit ,click Add, and close Interface Builder. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Close Interface  Builder and go back to X-Code. Next.. create a ViewController to handle our View. Click File -> New File… Select UIViewController subclass and click Next. Name this file FruitViewController.m and check the box that says “Also create “FruitViewController.h” . Click Finish. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Now we will declare an Interface Builder Outlet for the UITextView that we added to the view. Open up FruitViewController.h and add the following code. This line allows us to associate the fruitDescription property with the UITextView we created. Open up FruitViewController.m and add this code underneath @implementation keyword. This creates default “getter” and “setter” methods for the fruitDescription property. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Double click on FruitViewController.xibto open it in interface builder. We need to connect the view to the FruitViewController class we just created. Click on the File’s Owner object. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Click Tools -> Identity Inspector. Select FruitViewController from the dropdown next to class. Notice that under the Class Outlets section you will see the UITextView property we created. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App The last step in interface builder is to connect the UITextView. Click Tools -> Connection Inspector. You should see an Outlet that says fruitDescription. Click in the corresponding circle and drag it over the UITextView on your view and release it. Now, click the circle next the word View under outlets and drag it to the View object inside of the window that says FruitViewController in the title. When you are done the screen should look like this: close Interface Builder Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App The first thing we are going to do here is create a property for our new view so that it can be transitioned to when a fruit gets clicked on. Open RootViewController.h and add the following code: We are just creating a property for the fruitViewController that we added to the project. Also note that I added the #import “FruitViewController.h” line. this will allow us to create new instances of the FruitViewController object. Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Now open the RootViewController.m and find the numberOfRowsInSection method. This method tells the UITableView how many rows it will be displaying. In our case it will be the size of the array of fruits. Add the following code (click the image to enlarge): The first line allows us to gain access to the appDelegate of our application. This is where we defined the fruit array. Once we have access to the delegate the count property of the fruit gets returned. Now find the cellForRowAtIndexPathmethod and add the following code: Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App In the first line we added is the “FruitAppDelegate *appDelegate…” line. Again, this is giving us access to the appDelegate object where we declared the fruit array. The next line calls the objectAtIndexmethod on the Array of fruits. The index we will be using can be accessed via indexPath.row. This is an integer value representing each row of the UITableView. Finally, we call the setTextmethod of the cell, to display the name of the fruit in each cell at the given index. This is the last step. We are going to detect which row in the UITableView the user selected. Find the method called didSelectRow and add the following code Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App This method gets called every time a user taps on a cell in the UITableView. The parameter indexPathhas a property called row that is the integer value of the cell the user clicked on. To access this, we call indexPath.row. The first line again gives us access to the appDelegate. The next line indexes into the fruits array and makes a copy of the selected fruit object. The next section starting with “if(self.fruitView == nil)”, initializes the viewController if it hasn’t already been initialized (see my previous tutorial if you need more of an explanation on this). One thing to take note of: Make sure that the parameter you pass to initWithNibName matches the name of the .xibfile you used for your view. So in our case, its FruitViewController. Following this line is the line that pushes the viewController on to the navigationController stack. This causes the view to transition to the new view. The last 2 lines pass the fruit information to the new view. We set the title of the view to the name of the fruit and then set the description text to the description of the fruit. Now click Build and Go and your app should launch Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App Master View Detail View Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
iPhone App All that code just to get this  master detail view ?? Source:  http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
Enter Windows Phone 7 Better Designer/Developer Content Workflow Story Less Code Faster to market applications Easier to get where your going C# instead of Objective C (Not your father’s C programming language) Prototype your UI and your application all inside the same tool  Expression Blend 4 for Windows Phone 7 let’s you design, prototype, and even build.. If you need a more substantive coding environment, Visual Studio 2010 (integrated with Expression Blend)  lets you unit test, program and build..
Windows Phone 7 Project Example Tool Improvements Visual Studio 2010 for Windows Phone Expression Blend 4 for Windows Phone
Windows Phone 7 in 90 Seconds
Windows Phone 7 Example Start in Expression Blend for Windows Phone 7.. Select “New Project..”
Windows Phone 7 Example Next select Windows Phone  Project Type and “Windows Phone Data-drive Application (MVVM)”  Name your project.. Click the “OK” button
Windows Phone 7 Example Now we open up a template which we can edit with a sample data source already provided with a master detail view already created for us.. Next we can edit this to match our earlier fruity example right on the design surface (no code)..
Windows Phone 7 Example Let’s run and look at what we’ve got in the Windows Phone 7 emulator.. Select from the project menu “Project.. Run Project” The Windows Phone app should start building.. Next it will ask us to choose a real Windows 7 phone device or the Window 7 Phone Emulator running the real Windows 7 Phone OS.. We will select “Windows Phone 7 Emulator”
Windows Phone 7 Example We have the Windows Phone 7 app running with the master view showing..
Windows Phone 7 Example Clicking on the “watermelon” selection brings us our “detail” view
iPhone versus Windows Phone 7 iPhone sample master/detail view with no real data binding (creating two views) Time: 12 Minutes Windows Phone 7  Time: less than 5 Minutes  If you don’t like my timings try it yourself.. Differences:  True Drag and Drop Databinding (with sample XML data)  Editing  on a true Design Surface..  C# coding not your father’s C coding environment..
iPhone versus Windows Phone 7 Expression Blend Advantages: Drag and Drop Databinding with Sample data or XML Data Source right onto application design surface. In application access to Windows Phone 7 resident data store..
iPhone versus Windows Phone 7 Expression Blend Advantages: Data Sources can be from an OBJECT or Class..
iPhone versus Windows Phone 7 Expression Blend Advantages: Data Sources are easily created from Class complete with sample data, so your app can be designed and you get out what you see when you connect it to your live data on the cloud, or anywhere else on the net or locally including a folder of images...
iPhone versus Windows Phone 7 Expression Blend Advantages: Once you have your source you just drag and drop an individual image or the entire “collection” right on the design surface.. Blend will even put the collection in a list box and let you edit the size of the items right there..
iPhone versus Windows Phone 7 Expression Blend Advantages: Design Import as it was meant to be: Import Layers right from Photoshop and Illustrator or Expression Design and make them into custom user controls right there..
iPhone versus Windows Phone 7 Expression Blend Advantages: Drag and Drop Video and other Media Files such as animations right on the design surface to create your own integrated media application experience. No more separate video player app and restrictive UI for video playback..  Drag, Drop, Set Properties, and Go!
iPhone versus Windows Phone 7 Other Advantages: C# Easier to read, port and maintain..  No pointers, and older C standards that were developed in the late 80s and early 90s.. Visual Studio 2010 Integration XNA for X-Box Live 3D Games and Connectivity XNA Game Studio 4.0 for Windows Phone 3D applications

More Related Content

What's hot

Coding on the Shoulders of Giants
Coding on the Shoulders of GiantsCoding on the Shoulders of Giants
Coding on the Shoulders of GiantsMatt Biddulph
 
A lap around monotouch
A lap around monotouchA lap around monotouch
A lap around monotouchmecurioJ
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionRaman Gowda Hullur
 
Boys and Girls Club
Boys and Girls ClubBoys and Girls Club
Boys and Girls Clubrenrok15
 
Creating Openbravo Workspace Widgets
Creating Openbravo Workspace WidgetsCreating Openbravo Workspace Widgets
Creating Openbravo Workspace WidgetsRob Goris
 
UI Testing for Your Xamarin.Forms Apps
UI Testing for Your Xamarin.Forms AppsUI Testing for Your Xamarin.Forms Apps
UI Testing for Your Xamarin.Forms AppsCodrina Merigo
 
Titanium appcelerator sdk
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdkAlessio Ricco
 
Appcelerator mobile. the doppelgänger to XPages
Appcelerator mobile. the doppelgänger to XPagesAppcelerator mobile. the doppelgänger to XPages
Appcelerator mobile. the doppelgänger to XPagesJohn Jardin
 
Appy builder beginner tutorial
Appy builder beginner tutorialAppy builder beginner tutorial
Appy builder beginner tutorialHabibulHakam
 
7 User Experience Lessons from the iPhone (Introducing UX)
7 User Experience Lessons from the iPhone (Introducing UX)7 User Experience Lessons from the iPhone (Introducing UX)
7 User Experience Lessons from the iPhone (Introducing UX)Stephen Anderson
 
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Fabien Marry
 
打造你的第一個iPhone APP
打造你的第一個iPhone APP打造你的第一個iPhone APP
打造你的第一個iPhone APP彼得潘 Pan
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발영욱 김
 
iOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkiniOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkinKenneth Poon
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hourssjmarsh
 
iOS design: a case study
iOS design: a case studyiOS design: a case study
iOS design: a case studyJohan Ronsse
 
Iphone programming: Objective c
Iphone programming: Objective cIphone programming: Objective c
Iphone programming: Objective cKenny Nguyen
 
Life Cycle of an iPhone App
Life Cycle of an iPhone AppLife Cycle of an iPhone App
Life Cycle of an iPhone AppJohn McKerrell
 

What's hot (19)

Coding on the Shoulders of Giants
Coding on the Shoulders of GiantsCoding on the Shoulders of Giants
Coding on the Shoulders of Giants
 
A lap around monotouch
A lap around monotouchA lap around monotouch
A lap around monotouch
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : Documentaion
 
Boys and Girls Club
Boys and Girls ClubBoys and Girls Club
Boys and Girls Club
 
Creating Openbravo Workspace Widgets
Creating Openbravo Workspace WidgetsCreating Openbravo Workspace Widgets
Creating Openbravo Workspace Widgets
 
UI Testing for Your Xamarin.Forms Apps
UI Testing for Your Xamarin.Forms AppsUI Testing for Your Xamarin.Forms Apps
UI Testing for Your Xamarin.Forms Apps
 
Titanium appcelerator sdk
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdk
 
Appcelerator mobile. the doppelgänger to XPages
Appcelerator mobile. the doppelgänger to XPagesAppcelerator mobile. the doppelgänger to XPages
Appcelerator mobile. the doppelgänger to XPages
 
Appy builder beginner tutorial
Appy builder beginner tutorialAppy builder beginner tutorial
Appy builder beginner tutorial
 
7 User Experience Lessons from the iPhone (Introducing UX)
7 User Experience Lessons from the iPhone (Introducing UX)7 User Experience Lessons from the iPhone (Introducing UX)
7 User Experience Lessons from the iPhone (Introducing UX)
 
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
 
打造你的第一個iPhone APP
打造你的第一個iPhone APP打造你的第一個iPhone APP
打造你的第一個iPhone APP
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
 
iOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkiniOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + Gherkin
 
CI & CD- mobile application
CI & CD- mobile applicationCI & CD- mobile application
CI & CD- mobile application
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
 
iOS design: a case study
iOS design: a case studyiOS design: a case study
iOS design: a case study
 
Iphone programming: Objective c
Iphone programming: Objective cIphone programming: Objective c
Iphone programming: Objective c
 
Life Cycle of an iPhone App
Life Cycle of an iPhone AppLife Cycle of an iPhone App
Life Cycle of an iPhone App
 

Similar to I phone versus windows phone 7 coding

PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfPERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfarfa442827
 
iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1Shyamala Prayaga
 
Preparing for Release to the App Store
Preparing for Release to the App StorePreparing for Release to the App Store
Preparing for Release to the App StoreGeoffrey Goetz
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outletsveeracynixit
 
Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular								Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular Shelly Megan
 
Mobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B ExperimentsMobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B Experimentslacyrhoades
 
CS6611 Mobile Application Development Laboratory
CS6611 Mobile Application Development LaboratoryCS6611 Mobile Application Development Laboratory
CS6611 Mobile Application Development Laboratorybalasubramani manickam
 
Final NEWS.pdf
Final NEWS.pdfFinal NEWS.pdf
Final NEWS.pdfRebaMaheen
 
Final NewsApp.pdf
Final NewsApp.pdfFinal NewsApp.pdf
Final NewsApp.pdfRebaMaheen
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
wexarts.org iPhone Project: Developer Documentation
wexarts.org iPhone Project: Developer Documentationwexarts.org iPhone Project: Developer Documentation
wexarts.org iPhone Project: Developer Documentationtutorialsruby
 
Android Development: Build Android App from Scratch
Android Development: Build Android App from ScratchAndroid Development: Build Android App from Scratch
Android Development: Build Android App from ScratchTaufan Erfiyanto
 

Similar to I phone versus windows phone 7 coding (20)

Exploring iTools
Exploring iToolsExploring iTools
Exploring iTools
 
Android programming-basics
Android programming-basicsAndroid programming-basics
Android programming-basics
 
How to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step GuideHow to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step Guide
 
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfPERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
 
iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1
 
First android app for workshop using android studio
First android app for workshop using android studio First android app for workshop using android studio
First android app for workshop using android studio
 
Preparing for Release to the App Store
Preparing for Release to the App StorePreparing for Release to the App Store
Preparing for Release to the App Store
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular								Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular
 
MSR iOS Tranining
MSR iOS TraniningMSR iOS Tranining
MSR iOS Tranining
 
Mobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B ExperimentsMobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B Experiments
 
Web dynpro for abap
Web dynpro for abapWeb dynpro for abap
Web dynpro for abap
 
Bird.pdf
 Bird.pdf Bird.pdf
Bird.pdf
 
CS6611 Mobile Application Development Laboratory
CS6611 Mobile Application Development LaboratoryCS6611 Mobile Application Development Laboratory
CS6611 Mobile Application Development Laboratory
 
Cs 6611 mad lab manual
Cs 6611 mad lab manualCs 6611 mad lab manual
Cs 6611 mad lab manual
 
Final NEWS.pdf
Final NEWS.pdfFinal NEWS.pdf
Final NEWS.pdf
 
Final NewsApp.pdf
Final NewsApp.pdfFinal NewsApp.pdf
Final NewsApp.pdf
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
wexarts.org iPhone Project: Developer Documentation
wexarts.org iPhone Project: Developer Documentationwexarts.org iPhone Project: Developer Documentation
wexarts.org iPhone Project: Developer Documentation
 
Android Development: Build Android App from Scratch
Android Development: Build Android App from ScratchAndroid Development: Build Android App from Scratch
Android Development: Build Android App from Scratch
 

More from Our Community Exchange LLC

More from Our Community Exchange LLC (10)

Real Time Connected Vehicle Networking with HDInsight and Apache Storm
Real Time Connected Vehicle Networking with HDInsight and Apache StormReal Time Connected Vehicle Networking with HDInsight and Apache Storm
Real Time Connected Vehicle Networking with HDInsight and Apache Storm
 
2012 Updated Portfolio
2012 Updated Portfolio2012 Updated Portfolio
2012 Updated Portfolio
 
Roi and user experience
Roi and user experienceRoi and user experience
Roi and user experience
 
U Xmagic Agile Presentation
U Xmagic Agile PresentationU Xmagic Agile Presentation
U Xmagic Agile Presentation
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application Guidance
 
WPF Line of Business Control Templates Styles
WPF Line of Business Control Templates StylesWPF Line of Business Control Templates Styles
WPF Line of Business Control Templates Styles
 
WPF Fundamentals
WPF FundamentalsWPF Fundamentals
WPF Fundamentals
 
WPF Line of Business Application XAML Layouts Presentation
WPF Line of Business Application XAML Layouts PresentationWPF Line of Business Application XAML Layouts Presentation
WPF Line of Business Application XAML Layouts Presentation
 
Wpf Tech Overview2009
Wpf Tech Overview2009Wpf Tech Overview2009
Wpf Tech Overview2009
 
New Introductionfor Flash Designers
New Introductionfor Flash DesignersNew Introductionfor Flash Designers
New Introductionfor Flash Designers
 

Recently uploaded

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Recently uploaded (20)

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 

I phone versus windows phone 7 coding

  • 1. iPhone versus Windows Phone 7 Coding By Don Burnett
  • 2. Mobile App Building From design to product.. In this slide show I will do a direct comparison of coding and tools of the Apple iPhone to the Windows Phone 7 environment from Microsoft. To be fair to the Apple folks and accurately represent a good example, I chose a simple “hello world” master-detail example from a very popular iPhone coding blog called the iCode Blog.. If you want to do iPhone coding and development it’s one of the best sources of information out there and I wholeheartedly recommend it.. I then ported the same example to Windows Phone 7 to show some of the differences. Different isn’t always better and these are just my opinions but you can judge for yourself. I am not anti-iDevice or anti-Apple. I own a bunch of Apple products and do development/design on that platform as well. But I hope you take a look at the differences and advantages to each for yourself. You choose! All Apple source code in this presentation quoted from: Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 3. Let’s Compare iPhone Versus Windows Phone 7 Who has the better designer developer content workflow story? Which one could you make an app and bring it to market with first? How do their developer support programs compare?
  • 4. “Hello World App” comparison Tools comparison Designer Developer Story Be everywhere and make your apps shine
  • 5. iPhone versus Windows Phone 7 Go get some coffee so we can get started, we’ll be done in 30 slides or so with the iPhone example… The following iPhone sample source application is sample code I am “quoting” directly from the iCode Blog. If you are doing iPhone app building this is one of the best places on the net to find out how to code for the iPhone. http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 6. iPhone App Open up X-Code and Select File->New Project… Select Navigation-Based Application and click Choose… Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 7. iPhone App Next: Name the project Fruit. Click on File -> New File… The object we are creating will inherit from NSObject, so select NSObject Subclass and click Next. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 8. iPhone App The next screen will ask you to name it. Go ahead and name it “Fruit” and make sure that “Also create Fruit.h” is checked. It should look like the screen below. Then, click Finish. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 9. Objective- C Your Father’s Programming Language
  • 10. iPhone App Easy so far right?? It gets a bit more painful.. Now, we are going to define the properties of a “Fruit” object. For this application a fruit will have a name and a description. Open Fruit.h and add the following code: Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 11. iPhone App We have created the properties needed to represent our fruit. There is one line that you may be unfamiliar with. The line -(id)initWithName:(NSString*)n description:(NSString *)desc; is a definition for a function. This function will be called to initialize a Fruit object. All NSObjects have an init method, but we want to create our own so that we can pass in a name and description when the object is created. Open up Fruit.m and add the following code: Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 12. iPhone App Here we implement the initWithName method. The code here seems pretty straight forward. We are basically setting our local copies of name and description to the arguments passed to this method. The important thing to notice here is the return self line. This is crucial for using this method as a constructor. It allows this function to return the newly created instance of a fruit object. Next, we are going to set the title of our main view. This is necessary to create a back button when transitioning between views. Open up RootViewController.m…In theviewDidLoad method, add the following code: Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 13. iPhone App We are setting the title property of the RootViewController object to the string “Fruits”. Also, be sure to add the #import “Fruit.h” line at the top to include the fruit object in our project as well as @synthesize fruitView to add the “getter” and “setter” methods. Next, we are going to create an array of fruit objects. Open up FruitAppDelegate.h and add the following code: Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 14. iPhone App All we are really adding here is an NSMutableArray property. I used NSMutableArray instead of NSArray because it has a few more methods making it more flexible. Now, open up FruitAppDelegate.m and add @synthesize fruits to the top. This is so other objects will have access to the fruits array. Also, be sure to include the import statement for Fruit.h. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 15. iPhone App Now add the following code to the applicationDidFinishLaunching method. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 16. iPhone App the first three lines is creating new instances of a fruit object. Notice that instead of calling init, we are calling the initWithName method that we created. This is allowing us to pass in a name and a description to each of the fruits. The next line [self.fruits = [[NSMutableArrayalloc] initWithObjects:apple,orange,watermelon,nil]; builds a new array from the objects we just created. It is important to pass in nil as the last argument in an NSMutableArray. It will not work unless you remember this. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 19. Change ? Improvement ? Better Design Story ? Images courtesy of: Jurassic Park - The Ride: Universal Studios Hollywood; Universal's Islands of Adventure
  • 20. Welcome to..The state of mobile app programming 2010.. Images courtesy of: Jurassic Park - The Ride: Universal Studios Hollywood; Universal's Islands of Adventure
  • 21. iPhone App Now we are going to create the view that will be displayed when the user selects a fruit. Double click on any one of your .xib files to open up Interface Builder. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 22. iPhone App Click File -> New and select view and click choose . Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 23. iPhone App You should now see the new view (it will be blank) and the objects associated with it. We need some sort of text field to display the description of the fruit. For this tutorial I have chosen a UITextViewas opposed to a UITextField. This is because a UITextView is multi-line and is great for displaying more than one line of text. So, go ahead and drag it on to your view. Your view window should now look like this: Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 24. iPhone App Now click File -> Save. One important thing to keep in mind is to make sure you are saving it in the current project’s directory. It seems that every time I add a view to a project, the default directory is not my project’s directory. Name this file FruitViewController and click Save. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 25. iPhone App Another window should show up after you click save. It is asking you if you want to add this view to your project. Just check the box net to Fruit ,click Add, and close Interface Builder. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 26. iPhone App Close Interface Builder and go back to X-Code. Next.. create a ViewController to handle our View. Click File -> New File… Select UIViewController subclass and click Next. Name this file FruitViewController.m and check the box that says “Also create “FruitViewController.h” . Click Finish. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 27. iPhone App Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 28. iPhone App Now we will declare an Interface Builder Outlet for the UITextView that we added to the view. Open up FruitViewController.h and add the following code. This line allows us to associate the fruitDescription property with the UITextView we created. Open up FruitViewController.m and add this code underneath @implementation keyword. This creates default “getter” and “setter” methods for the fruitDescription property. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 29. iPhone App Double click on FruitViewController.xibto open it in interface builder. We need to connect the view to the FruitViewController class we just created. Click on the File’s Owner object. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 30. iPhone App Click Tools -> Identity Inspector. Select FruitViewController from the dropdown next to class. Notice that under the Class Outlets section you will see the UITextView property we created. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 31. iPhone App The last step in interface builder is to connect the UITextView. Click Tools -> Connection Inspector. You should see an Outlet that says fruitDescription. Click in the corresponding circle and drag it over the UITextView on your view and release it. Now, click the circle next the word View under outlets and drag it to the View object inside of the window that says FruitViewController in the title. When you are done the screen should look like this: close Interface Builder Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 32. iPhone App The first thing we are going to do here is create a property for our new view so that it can be transitioned to when a fruit gets clicked on. Open RootViewController.h and add the following code: We are just creating a property for the fruitViewController that we added to the project. Also note that I added the #import “FruitViewController.h” line. this will allow us to create new instances of the FruitViewController object. Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 33. iPhone App Now open the RootViewController.m and find the numberOfRowsInSection method. This method tells the UITableView how many rows it will be displaying. In our case it will be the size of the array of fruits. Add the following code (click the image to enlarge): The first line allows us to gain access to the appDelegate of our application. This is where we defined the fruit array. Once we have access to the delegate the count property of the fruit gets returned. Now find the cellForRowAtIndexPathmethod and add the following code: Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 34. iPhone App In the first line we added is the “FruitAppDelegate *appDelegate…” line. Again, this is giving us access to the appDelegate object where we declared the fruit array. The next line calls the objectAtIndexmethod on the Array of fruits. The index we will be using can be accessed via indexPath.row. This is an integer value representing each row of the UITableView. Finally, we call the setTextmethod of the cell, to display the name of the fruit in each cell at the given index. This is the last step. We are going to detect which row in the UITableView the user selected. Find the method called didSelectRow and add the following code Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 35. iPhone App This method gets called every time a user taps on a cell in the UITableView. The parameter indexPathhas a property called row that is the integer value of the cell the user clicked on. To access this, we call indexPath.row. The first line again gives us access to the appDelegate. The next line indexes into the fruits array and makes a copy of the selected fruit object. The next section starting with “if(self.fruitView == nil)”, initializes the viewController if it hasn’t already been initialized (see my previous tutorial if you need more of an explanation on this). One thing to take note of: Make sure that the parameter you pass to initWithNibName matches the name of the .xibfile you used for your view. So in our case, its FruitViewController. Following this line is the line that pushes the viewController on to the navigationController stack. This causes the view to transition to the new view. The last 2 lines pass the fruit information to the new view. We set the title of the view to the name of the fruit and then set the description text to the description of the fruit. Now click Build and Go and your app should launch Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 36. iPhone App Master View Detail View Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 37. iPhone App All that code just to get this master detail view ?? Source: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray
  • 38. Enter Windows Phone 7 Better Designer/Developer Content Workflow Story Less Code Faster to market applications Easier to get where your going C# instead of Objective C (Not your father’s C programming language) Prototype your UI and your application all inside the same tool Expression Blend 4 for Windows Phone 7 let’s you design, prototype, and even build.. If you need a more substantive coding environment, Visual Studio 2010 (integrated with Expression Blend) lets you unit test, program and build..
  • 39. Windows Phone 7 Project Example Tool Improvements Visual Studio 2010 for Windows Phone Expression Blend 4 for Windows Phone
  • 40. Windows Phone 7 in 90 Seconds
  • 41. Windows Phone 7 Example Start in Expression Blend for Windows Phone 7.. Select “New Project..”
  • 42. Windows Phone 7 Example Next select Windows Phone Project Type and “Windows Phone Data-drive Application (MVVM)” Name your project.. Click the “OK” button
  • 43. Windows Phone 7 Example Now we open up a template which we can edit with a sample data source already provided with a master detail view already created for us.. Next we can edit this to match our earlier fruity example right on the design surface (no code)..
  • 44. Windows Phone 7 Example Let’s run and look at what we’ve got in the Windows Phone 7 emulator.. Select from the project menu “Project.. Run Project” The Windows Phone app should start building.. Next it will ask us to choose a real Windows 7 phone device or the Window 7 Phone Emulator running the real Windows 7 Phone OS.. We will select “Windows Phone 7 Emulator”
  • 45. Windows Phone 7 Example We have the Windows Phone 7 app running with the master view showing..
  • 46. Windows Phone 7 Example Clicking on the “watermelon” selection brings us our “detail” view
  • 47. iPhone versus Windows Phone 7 iPhone sample master/detail view with no real data binding (creating two views) Time: 12 Minutes Windows Phone 7 Time: less than 5 Minutes If you don’t like my timings try it yourself.. Differences: True Drag and Drop Databinding (with sample XML data) Editing on a true Design Surface.. C# coding not your father’s C coding environment..
  • 48. iPhone versus Windows Phone 7 Expression Blend Advantages: Drag and Drop Databinding with Sample data or XML Data Source right onto application design surface. In application access to Windows Phone 7 resident data store..
  • 49. iPhone versus Windows Phone 7 Expression Blend Advantages: Data Sources can be from an OBJECT or Class..
  • 50. iPhone versus Windows Phone 7 Expression Blend Advantages: Data Sources are easily created from Class complete with sample data, so your app can be designed and you get out what you see when you connect it to your live data on the cloud, or anywhere else on the net or locally including a folder of images...
  • 51. iPhone versus Windows Phone 7 Expression Blend Advantages: Once you have your source you just drag and drop an individual image or the entire “collection” right on the design surface.. Blend will even put the collection in a list box and let you edit the size of the items right there..
  • 52. iPhone versus Windows Phone 7 Expression Blend Advantages: Design Import as it was meant to be: Import Layers right from Photoshop and Illustrator or Expression Design and make them into custom user controls right there..
  • 53. iPhone versus Windows Phone 7 Expression Blend Advantages: Drag and Drop Video and other Media Files such as animations right on the design surface to create your own integrated media application experience. No more separate video player app and restrictive UI for video playback.. Drag, Drop, Set Properties, and Go!
  • 54. iPhone versus Windows Phone 7 Other Advantages: C# Easier to read, port and maintain.. No pointers, and older C standards that were developed in the late 80s and early 90s.. Visual Studio 2010 Integration XNA for X-Box Live 3D Games and Connectivity XNA Game Studio 4.0 for Windows Phone 3D applications