SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
Cross-Platform, Native Mobile Development
                                       with Eclipse




       @peterfriese | http://peterfriese.de
           http://www.zuehlke.com
cell phone usage is ubiquitous
cell phone usage is ubiquitous
s t
                 e c
             o pn e
            h s
           p a
          r y
         u r
        o ve
      se e ves
     u ge
   e a
 w an our    li
    m of
to
People are !fferent
... so #ey have !fferent ta$es!
countless devices
diversity of platforms
Java
public class SpeakersList extends GenericListActivity<Speaker> {

	   List<Speaker> speakers;

	   @Override
	   public void onCreate(Bundle savedInstanceState) {
	   	   super.onCreate(savedInstanceState);

	   	   setTitle("Speakers");

	   	   speakers = getItemsFromProvider();

	   	   ArrayList<AbstractRowAdapter> rowAdapters = new ArrayList<AbstractRowAdapter>();

	   	   Iterable<Speaker> items1 = speakers;
	   	   for (Speaker i : items1)
	   	   	   rowAdapters.add(new Cell1(i));

	   	   setListAdapter(new GenericItemAdapter(this, rowAdapters));
	   	   finishCreation();

	   }
C#
public partial class SpeakerDetailsDetailsView : PhoneApplicationPage
{
    public SpeakerDetailsDetailsView()
    {
        InitializeComponent();
    }

    protected override void OnNavigatedTo(NavigationEventArgs e)
    {
        string selectedIndex = "";
        if (NavigationContext.QueryString.TryGetValue("itemByIndex", out selectedIndex))
        {
            int index = int.Parse(selectedIndex);
            DataContext = App.RootViewModelProvider.BlogpostsModelProvider().BlogItems[index];
        }
    }
}
Objective-C
@implementation SpeakersListViewController

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
	   if(section == 0) {
	   	   return [[[contentProvider valueForKeyPath:@"content"] asArray] count];
	   } else
	   	   return 0;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
	   id item = [self.items objectAtIndex: indexPath.row];
	   IPContentProvider *provider = [(itemisAppProviders*)contentProvider.providers
        providerForSpeakerByName: [item valueForKeyPath:@"name"]];
	   SpeakerDetailsViewController *controller = [[SpeakerDetailsViewController alloc] init];
	   controller.contentProvider = provider;
	   [self.navigationController pushViewController: controller animated: TRUE];
	   [controller release];
}
HTML
{% extends "generated/application.html" %}
{% block title%}Speakers{% endblock %}
{% block content_class %}table list{% endblock %}

{% block content %}
<ul>
{% for s in data|to_list %}
  <li>
     {% url views.SpeakerDetailsBySpeakerByName s.name|urlencode as url %}
     <a href="{{ url }}">
       <div class="cell_text">{{s.name|safe}}</div>
     </a>
  </li>
{% endfor %}
</ul>
{% endblock %}
server-side web


                           Web Server
                        executes application
                               logic


Web Browser




                       Files             Database




  Device                       Backend
client-side web

     Web Browser



      JavaScript
executes application logic




  Files         Database




          Device                Backend
hybrid app

Native App

         Interpreter



    Request
   Interceptor


         JavaScript Bridge

          Browser
     executes JavaScript




             Device                Backend
interpreted app

Native App

         interpreter




                  Database
  Application
    Script
                       Files




             Device               Backend
generated app

    Generator




 Generator Input       Native App

                               Logic     Logic
      Model
describes logic and
                             Database   Database
 complete system

                                Files    Files
Files     Database

                              Device    Backend
App Anatomy 101
Views
Views   Cells
Views Cells   Navigation
Entities
Views
                 Session
Cells        title
             room
Navigation
Views
                 Session
Cells        title
             room
Navigation
Entities                   ContentProviders
Views
                 Session
Cells        title
             room
Navigation
Entities                   ContentProviders
DSL for mobile
Views
Cells
Navigation
Entities
ContentProviders
Navigation
tabbarApplication itemisApp {

	   button {
	   	 title="News"
	   	 icon="calendar.png"
	   	 view=NewsList( CurrentTimeline() )
	   }

	   button {
	   	 title= "Tue"
	   	 icon= "calendar.png"
	   	 view= SessionsList( Sessions("2011-11-03 ") )
	   }

	   button {
	   	 title= "Speakers"
	   	 icon= "person"
	   	 view= SpeakersList( AllSpeakers() )
	   }

}
Views
tableview SessionsList(Session[] sessions) {
	 title= "Sessions"
	 section {




	   	   }
	   }
}
Cells
tableview SessionsList(Session[] sessions) {
	 title= "Sessions"
	 section {
	 	 cell Subtitle foreach items as item {
	 	 	 details= item.title
	 	 	 action=NewsItemDetailView(item)
	 	 }
	 }
}
Entities
entity Session {
	 String title
	 String id
	 String room
	 Date startTime
	 Date endTime
}
ContentProviders
   contentprovider Sessions(String day) returns Session[]
   	 fetches XML
   	 from ("http://eclipsecon.org/ece2011?" day)
   	 selects "sessions.session"
Demo :)
«Xpand»
Toolsmith’s point of view

                            «Xpand»
                  Parser
                               Templates   Templates
                                 iPhone     Android
    Grammar
                  Editor
  describes DSL

                           EMF MM
Extending Applause
1. Create a new generator bundle
         2. Provide build strategy
           <extension point="org.applause.lang.ui.buildstrate
                                                              gy">
             <buildstrategy
               class="org.applause.lang.generator.wp7.builder.W
                                                                P7BuildStrategy">
             </buildstrategy>
           </extension>


   3. Provide template project
                                                      orm">
   <extension point="org.applause.lang.ui.mobileplatf
     <mobileplatform
       name="Windows Phone 7"
       projectNameSuffix="WP7"
       templateProject="templateproject/project.zip">
     </mobileplatform>
   </extension>
twitter @peterfriese
blog    http://peterfriese.de
company http://www.zuehlke.com

Contenu connexe

En vedette

Web 2.0 in der politischen Bildung
Web 2.0 in der politischen BildungWeb 2.0 in der politischen Bildung
Web 2.0 in der politischen Bildung
Karl Staudinger
 
Joy private events eng march12
Joy private events eng march12Joy private events eng march12
Joy private events eng march12
weiss2001
 
15 ccha sp_social_emot_0606_v3
15 ccha sp_social_emot_0606_v315 ccha sp_social_emot_0606_v3
15 ccha sp_social_emot_0606_v3
Ximena Ponce Saez
 
Inf1 p1 a_ex5_josue ramon rodriguez gil
Inf1 p1 a_ex5_josue ramon rodriguez gilInf1 p1 a_ex5_josue ramon rodriguez gil
Inf1 p1 a_ex5_josue ramon rodriguez gil
Josue Rodriguez
 
Fireeye definitive-guide-next-gen-threat-protection-2
Fireeye definitive-guide-next-gen-threat-protection-2Fireeye definitive-guide-next-gen-threat-protection-2
Fireeye definitive-guide-next-gen-threat-protection-2
drewz lin
 
Service Support Flow
Service Support FlowService Support Flow
Service Support Flow
Raymond Koh
 
Ud1 a nosa casa
Ud1 a nosa casaUd1 a nosa casa
Ud1 a nosa casa
Evahg
 
Títulos valor preguntas icfes
Títulos valor preguntas icfesTítulos valor preguntas icfes
Títulos valor preguntas icfes
alejagarcia7
 
Maximizacion Beneficio
Maximizacion BeneficioMaximizacion Beneficio
Maximizacion Beneficio
modeladm
 

En vedette (20)

Eco Fest 2010 Media Kit (Vf)
Eco Fest 2010  Media Kit (Vf)Eco Fest 2010  Media Kit (Vf)
Eco Fest 2010 Media Kit (Vf)
 
Web 2.0 in der politischen Bildung
Web 2.0 in der politischen BildungWeb 2.0 in der politischen Bildung
Web 2.0 in der politischen Bildung
 
Joy private events eng march12
Joy private events eng march12Joy private events eng march12
Joy private events eng march12
 
15 ccha sp_social_emot_0606_v3
15 ccha sp_social_emot_0606_v315 ccha sp_social_emot_0606_v3
15 ccha sp_social_emot_0606_v3
 
Wisanka Piguno | Brochure Iffina 2015
Wisanka Piguno | Brochure Iffina 2015Wisanka Piguno | Brochure Iffina 2015
Wisanka Piguno | Brochure Iffina 2015
 
Cercol 2000
Cercol 2000Cercol 2000
Cercol 2000
 
Medios
MediosMedios
Medios
 
Bioclass ng 0914_es
Bioclass ng 0914_esBioclass ng 0914_es
Bioclass ng 0914_es
 
Inf1 p1 a_ex5_josue ramon rodriguez gil
Inf1 p1 a_ex5_josue ramon rodriguez gilInf1 p1 a_ex5_josue ramon rodriguez gil
Inf1 p1 a_ex5_josue ramon rodriguez gil
 
Escritura expuesta y Poder en la Historia
Escritura expuesta y Poder en la HistoriaEscritura expuesta y Poder en la Historia
Escritura expuesta y Poder en la Historia
 
Virgilio la eneida (en verso)
Virgilio   la eneida (en verso)Virgilio   la eneida (en verso)
Virgilio la eneida (en verso)
 
Fireeye definitive-guide-next-gen-threat-protection-2
Fireeye definitive-guide-next-gen-threat-protection-2Fireeye definitive-guide-next-gen-threat-protection-2
Fireeye definitive-guide-next-gen-threat-protection-2
 
Service Support Flow
Service Support FlowService Support Flow
Service Support Flow
 
Glossari Dialectològic
Glossari DialectològicGlossari Dialectològic
Glossari Dialectològic
 
Ud1 a nosa casa
Ud1 a nosa casaUd1 a nosa casa
Ud1 a nosa casa
 
El dentista nº 58
El dentista nº 58El dentista nº 58
El dentista nº 58
 
Títulos valor preguntas icfes
Títulos valor preguntas icfesTítulos valor preguntas icfes
Títulos valor preguntas icfes
 
PechaKucha Kit Kat
PechaKucha Kit KatPechaKucha Kit Kat
PechaKucha Kit Kat
 
Maximizacion Beneficio
Maximizacion BeneficioMaximizacion Beneficio
Maximizacion Beneficio
 
SPOOL MASTER
SPOOL MASTERSPOOL MASTER
SPOOL MASTER
 

Similaire à Cross-Platform Native Mobile Development with Eclipse

China Science Challenge
China Science ChallengeChina Science Challenge
China Science Challenge
remko caprio
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
Fermin Galan
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
FIWARE
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
Tony Frame
 
android training_material ravy ramio
android training_material ravy ramioandroid training_material ravy ramio
android training_material ravy ramio
slesulvy
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
Aaron Saunders
 

Similaire à Cross-Platform Native Mobile Development with Eclipse (20)

Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
APPlause - DemoCamp Munich
APPlause - DemoCamp MunichAPPlause - DemoCamp Munich
APPlause - DemoCamp Munich
 
Prototyping applications with heroku and elasticsearch
 Prototyping applications with heroku and elasticsearch Prototyping applications with heroku and elasticsearch
Prototyping applications with heroku and elasticsearch
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture Components
 
The Best Way to Become an Android Developer Expert with Android Jetpack
The Best Way to Become an Android Developer Expert  with Android JetpackThe Best Way to Become an Android Developer Expert  with Android Jetpack
The Best Way to Become an Android Developer Expert with Android Jetpack
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 
Playing with parse.com
Playing with parse.comPlaying with parse.com
Playing with parse.com
 
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyRed Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
 
China Science Challenge
China Science ChallengeChina Science Challenge
China Science Challenge
 
SgCodeJam24 Workshop
SgCodeJam24 WorkshopSgCodeJam24 Workshop
SgCodeJam24 Workshop
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Development
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
 
android training_material ravy ramio
android training_material ravy ramioandroid training_material ravy ramio
android training_material ravy ramio
 
Android application architecture
Android application architectureAndroid application architecture
Android application architecture
 
Core Android
Core AndroidCore Android
Core Android
 
Approaches to mobile site development
Approaches to mobile site developmentApproaches to mobile site development
Approaches to mobile site development
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 

Plus de Peter Friese

Plus de Peter Friese (20)

Building Reusable SwiftUI Components
Building Reusable SwiftUI ComponentsBuilding Reusable SwiftUI Components
Building Reusable SwiftUI Components
 
Firebase & SwiftUI Workshop
Firebase & SwiftUI WorkshopFirebase & SwiftUI Workshop
Firebase & SwiftUI Workshop
 
Building Reusable SwiftUI Components
Building Reusable SwiftUI ComponentsBuilding Reusable SwiftUI Components
Building Reusable SwiftUI Components
 
Firebase for Apple Developers - SwiftHeroes
Firebase for Apple Developers - SwiftHeroesFirebase for Apple Developers - SwiftHeroes
Firebase for Apple Developers - SwiftHeroes
 
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 
async/await in Swift
async/await in Swiftasync/await in Swift
async/await in Swift
 
Firebase for Apple Developers
Firebase for Apple DevelopersFirebase for Apple Developers
Firebase for Apple Developers
 
Building Apps with SwiftUI and Firebase
Building Apps with SwiftUI and FirebaseBuilding Apps with SwiftUI and Firebase
Building Apps with SwiftUI and Firebase
 
Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and Firebase
 
Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and Firebase
 
6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth
 
Five Things You Didn't Know About Firebase Auth
Five Things You Didn't Know About Firebase AuthFive Things You Didn't Know About Firebase Auth
Five Things You Didn't Know About Firebase Auth
 
Building High-Quality Apps for Google Assistant
Building High-Quality Apps for Google AssistantBuilding High-Quality Apps for Google Assistant
Building High-Quality Apps for Google Assistant
 
Building Conversational Experiences with Actions on Google
Building Conversational Experiences with Actions on Google Building Conversational Experiences with Actions on Google
Building Conversational Experiences with Actions on Google
 
Building Conversational Experiences with Actions on Google
Building Conversational Experiences with Actions on GoogleBuilding Conversational Experiences with Actions on Google
Building Conversational Experiences with Actions on Google
 
What's new in Android Wear 2.0
What's new in Android Wear 2.0What's new in Android Wear 2.0
What's new in Android Wear 2.0
 
Google Fit, Android Wear & Xamarin
Google Fit, Android Wear & XamarinGoogle Fit, Android Wear & Xamarin
Google Fit, Android Wear & Xamarin
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android Wear
 
Google Play Services Rock
Google Play Services RockGoogle Play Services Rock
Google Play Services Rock
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android Wear
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Cross-Platform Native Mobile Development with Eclipse

  • 1. Cross-Platform, Native Mobile Development with Eclipse @peterfriese | http://peterfriese.de http://www.zuehlke.com
  • 2. cell phone usage is ubiquitous
  • 3. cell phone usage is ubiquitous
  • 4.
  • 5. s t e c o pn e h s p a r y u r o ve se e ves u ge e a w an our li m of to
  • 7. ... so #ey have !fferent ta$es!
  • 10. Java public class SpeakersList extends GenericListActivity<Speaker> { List<Speaker> speakers; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle("Speakers"); speakers = getItemsFromProvider(); ArrayList<AbstractRowAdapter> rowAdapters = new ArrayList<AbstractRowAdapter>(); Iterable<Speaker> items1 = speakers; for (Speaker i : items1) rowAdapters.add(new Cell1(i)); setListAdapter(new GenericItemAdapter(this, rowAdapters)); finishCreation(); }
  • 11. C# public partial class SpeakerDetailsDetailsView : PhoneApplicationPage { public SpeakerDetailsDetailsView() { InitializeComponent(); } protected override void OnNavigatedTo(NavigationEventArgs e) { string selectedIndex = ""; if (NavigationContext.QueryString.TryGetValue("itemByIndex", out selectedIndex)) { int index = int.Parse(selectedIndex); DataContext = App.RootViewModelProvider.BlogpostsModelProvider().BlogItems[index]; } } }
  • 12. Objective-C @implementation SpeakersListViewController - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if(section == 0) { return [[[contentProvider valueForKeyPath:@"content"] asArray] count]; } else return 0; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { id item = [self.items objectAtIndex: indexPath.row]; IPContentProvider *provider = [(itemisAppProviders*)contentProvider.providers providerForSpeakerByName: [item valueForKeyPath:@"name"]]; SpeakerDetailsViewController *controller = [[SpeakerDetailsViewController alloc] init]; controller.contentProvider = provider; [self.navigationController pushViewController: controller animated: TRUE]; [controller release]; }
  • 13. HTML {% extends "generated/application.html" %} {% block title%}Speakers{% endblock %} {% block content_class %}table list{% endblock %} {% block content %} <ul> {% for s in data|to_list %} <li> {% url views.SpeakerDetailsBySpeakerByName s.name|urlencode as url %} <a href="{{ url }}"> <div class="cell_text">{{s.name|safe}}</div> </a> </li> {% endfor %} </ul> {% endblock %}
  • 14. server-side web Web Server executes application logic Web Browser Files Database Device Backend
  • 15. client-side web Web Browser JavaScript executes application logic Files Database Device Backend
  • 16. hybrid app Native App Interpreter Request Interceptor JavaScript Bridge Browser executes JavaScript Device Backend
  • 17. interpreted app Native App interpreter Database Application Script Files Device Backend
  • 18. generated app Generator Generator Input Native App Logic Logic Model describes logic and Database Database complete system Files Files Files Database Device Backend
  • 20. Views
  • 21. Views Cells
  • 22. Views Cells Navigation
  • 23. Entities Views Session Cells title room Navigation
  • 24. Views Session Cells title room Navigation Entities ContentProviders
  • 25. Views Session Cells title room Navigation Entities ContentProviders
  • 27. Navigation tabbarApplication itemisApp { button { title="News" icon="calendar.png" view=NewsList( CurrentTimeline() ) } button { title= "Tue" icon= "calendar.png" view= SessionsList( Sessions("2011-11-03 ") ) } button { title= "Speakers" icon= "person" view= SpeakersList( AllSpeakers() ) } }
  • 28. Views tableview SessionsList(Session[] sessions) { title= "Sessions" section { } } }
  • 29. Cells tableview SessionsList(Session[] sessions) { title= "Sessions" section { cell Subtitle foreach items as item { details= item.title action=NewsItemDetailView(item) } } }
  • 30. Entities entity Session { String title String id String room Date startTime Date endTime }
  • 31. ContentProviders contentprovider Sessions(String day) returns Session[] fetches XML from ("http://eclipsecon.org/ece2011?" day) selects "sessions.session"
  • 33.
  • 35. Toolsmith’s point of view «Xpand» Parser Templates Templates iPhone Android Grammar Editor describes DSL EMF MM
  • 36. Extending Applause 1. Create a new generator bundle 2. Provide build strategy <extension point="org.applause.lang.ui.buildstrate gy"> <buildstrategy class="org.applause.lang.generator.wp7.builder.W P7BuildStrategy"> </buildstrategy> </extension> 3. Provide template project orm"> <extension point="org.applause.lang.ui.mobileplatf <mobileplatform name="Windows Phone 7" projectNameSuffix="WP7" templateProject="templateproject/project.zip"> </mobileplatform> </extension>
  • 37. twitter @peterfriese blog http://peterfriese.de company http://www.zuehlke.com