SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
Models To Go
                          Peter Friese, itemis
                         Heiko Behrens, itemis

                   @peterfriese | @HBehrens
                        @itemismobile
                    http://mobile.itemis.de

                           (c) 2010 Heiko Behrens & Peter Friese
More info: http://www.heikobehrens.net / http://www.peterfriese.de / http://mobile.itemis.com
mobile is sexy
mobile is challenging
diversity of platforms
94 App Stores
two categories
countless devices
How can we address
  this diversity?
You can write amazing web apps
that look exactly and behave
exactly like apps on the iPhone
                  Steve Jobs, WWDC 2007
MOBILE WEB
server-side web                             client-side web


                                                Web Browser
                  Web Server
               executes application
                      logic
                                                 JavaScript
                                           executes application logic
Web Browser




              Files             Database
                                             Files         Database




  Device              Backend                        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
gain speed
    through restrictions
Lists   Details   Custom
analyzing the problem




http://www.flickr.com/photos/minifig/3174009125/
Anatomy
of these apps
View




      Speaker
  Name
  Image

        Session
  Title
  Location                        Cells




Entity
                                  Navigation
                  Data Provider
demo
getting real
tabbarApplication itemisApp {
	 button {
	 	 title= "Tuesday"
	 	 icon= "calendar.png"
	 	 view= SessionList( SessionsByDay("0") )
	 }

	   button {
	   	 title= "Wednesday"
	   	 icon= "calendar.png"
	   	 view= SessionList( SessionsByDay("1") )
	   }
	
	   button {
	   	 title= "Thursday"
	   	 icon= "calendar.png"
	   	 view= SessionList( SessionsByDay("2") )
	   }
	
	   button {
	   	 title= "Speakers"
	   	 icon= "person.png"
	   	 view= SpeakersList( AllSpeakers() )
	   }
}
tabbarApplication itemisApp {
	 button {
	 	 title= "Tuesday"
	 	 icon= "calendar.png"
	 	 view= SessionList( SessionsByDay("0") )
	 }

	   button {
	   	 title= "Wednesday"
	   	 icon= "calendar.png"
	   	 view= SessionList( SessionsByDay("1") )
	   }
	
	   button {
	   	 title= "Thursday"
	   	 icon= "calendar.png"
	   	 view= SessionList( SessionsByDay("2") )
	   }
	
	   button {
	   	 title= "Speakers"
	   	 icon= "person.png"
	   	 view= SpeakersList( AllSpeakers() )
	   }
}
-(UIViewController*)createController {
!    itemisAppProviders *providers = [[[itemisAppProviders alloc] init] autorelease];
!    UITabBarController *result = [[UITabBarController alloc] init];
!    NSMutableArray *controllers = [NSMutableArray array];
!
!    UIViewController<IPUIView> *controller;
!    UINavigationController *navController;
!    IPContentProvider *contentProvider;

!   // controller for @"Tuesday"
!   contentProvider = [providers providerForSessionsByDay: @"0"];
!
!   controller = [[SessionListViewController alloc] init];
!   [controller setContentProvider: contentProvider];
!   controller.tabBarItem.title = @"Tuesday";
!   controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"];
!   navController = [[UINavigationController alloc] initWithRootViewController:controller];
!   [controllers addObject: navController];
!   [controller release];
!   [navController release];

!
!   // controller for @"Wednesday"
!   contentProvider = [providers providerForSessionsByDay: @"1"];
!
!   controller = [[SessionListViewController alloc] init];
!   [controller setContentProvider: contentProvider];
!   controller.tabBarItem.title = @"Wednesday";
!   controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"];
!   navController = [[UINavigationController alloc] initWithRootViewController:controller];
!   [controllers addObject: navController];
!   [controller release];
!   [navController release];

!
!   // controller for @"Thursday"
!   contentProvider = [providers providerForSessionsByDay: @"2"];
!
!   controller = [[SessionListViewController alloc] init];
!   [controller setContentProvider: contentProvider];
!   controller.tabBarItem.title = @"Thursday";
!   controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"];
!   navController = [[UINavigationController alloc] initWithRootViewController:controller];
!   [controllers addObject: navController];
!   [controller release];
!   [navController release];

!
!   // controller for @"Speakers"
!   contentProvider = [providers providerForAllSpeakers];
!
!   controller = [[SpeakersListViewController alloc] init];
!   [controller setContentProvider: contentProvider];
!   controller.tabBarItem.title = @"Speakers";
!   controller.tabBarItem.image = [UIImage imageNamed:@"person.png"];
!   navController = [[UINavigationController alloc] initWithRootViewController:controller];
!   [controllers addObject: navController];
!   [controller release];
!   [navController release];


!   result.viewControllers = controllers;
!   return result;
}
-(UIViewController*)createController {
!    itemisAppProviders *providers = [[[itemisAppProviders alloc] init] autorelease];
!    UITabBarController *result = [[UITabBarController alloc] init];
!    NSMutableArray *controllers = [NSMutableArray array];
!
!    UIViewController<IPUIView> *controller;
!    UINavigationController *navController;
!    IPContentProvider *contentProvider;

!   // controller for @"Tuesday"
!   contentProvider = [providers providerForSessionsByDay: @"0"];
!
!   controller = [[SessionListViewController alloc] init];
!   [controller setContentProvider: contentProvider];
!   controller.tabBarItem.title = @"Tuesday";
!   controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"];
!   navController = [[UINavigationController alloc] initWithRootViewController:controller];
!   [controllers addObject: navController];
!   [controller release];
!   [navController release];

!
!   // controller for @"Wednesday"
!   contentProvider = [providers providerForSessionsByDay: @"1"];
!
!   controller = [[SessionListViewController alloc] init];
!   [controller setContentProvider: contentProvider];
!   controller.tabBarItem.title = @"Wednesday";
!   controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"];
!   navController = [[UINavigationController alloc] initWithRootViewController:controller];
!   [controllers addObject: navController];
!   [controller release];
!   [navController release];

!
!   // controller for @"Thursday"
!   contentProvider = [providers providerForSessionsByDay: @"2"];
!
!   controller = [[SessionListViewController alloc] init];
!   [controller setContentProvider: contentProvider];
!   controller.tabBarItem.title = @"Thursday";
!   controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"];
!   navController = [[UINavigationController alloc] initWithRootViewController:controller];
!   [controllers addObject: navController];
!   [controller release];
!   [navController release];

!
!   // controller for @"Speakers"
!   contentProvider = [providers providerForAllSpeakers];
!
!   controller = [[SpeakersListViewController alloc] init];
!   [controller setContentProvider: contentProvider];
!   controller.tabBarItem.title = @"Speakers";
!   controller.tabBarItem.image = [UIImage imageNamed:@"person.png"];
!   navController = [[UINavigationController alloc] initWithRootViewController:controller];
!   [controllers addObject: navController];
!   [controller release];
!   [navController release];


!   result.viewControllers = controllers;
!   return result;
}
«Xpand»
«DEFINE moduleFile FOR Application»
«FILE filenameApplicationDelegateModule()»
#import "«filenameApplicationDelegateHeader()»"
#import "IPUIView.h"
#import "«filenameCentralProvidersHeader()»"

«EXPAND importStatements-»

@implementation «applicationDelegateClassname()»

@synthesize window, rootController;

-(UIViewController*)createController {
	    «centralProvidersClassName()» *providers = [[[«centralProvidersClassName()» alloc] init] autorelease];
	    UITabBarController *result = [[UITabBarController alloc] init];
	    NSMutableArray *controllers = [NSMutableArray array];
	
	    UIViewController<IPUIView> *controller;
	    UINavigationController *navController;
	    IPContentProvider *contentProvider;

«EXPAND barControllerInstance FOREACH buttons»

	   result.viewControllers = controllers;
	   return result;
}

- (void)applicationDidFinishLaunching:(UIApplication *)application {
	    self.rootController = [self createController];
	    [window addSubview: [self.rootController view]];
    [window makeKeyAndVisible];
}

- (void)dealloc {
	    self.rootController = nil;
    [window release];
    [super dealloc];
}



@end
«ENDFILE»
«ENDDEFINE»
«DEFINE moduleFile FOR Application»
«FILE filenameApplicationDelegateModule()»
#import "«filenameApplicationDelegateHeader()»"
#import "IPUIView.h"
#import "«filenameCentralProvidersHeader()»"

«EXPAND importStatements-»

@implementation «applicationDelegateClassname()»

@synthesize window, rootController;

-(UIViewController*)createController {
	    «centralProvidersClassName()» *providers = [[[«centralProvidersClassName()» alloc] init] autorelease];
	    UITabBarController *result = [[UITabBarController alloc] init];
	    NSMutableArray *controllers = [NSMutableArray array];
	
	    UIViewController<IPUIView> *controller;
	    UINavigationController *navController;
	    IPContentProvider *contentProvider;

«EXPAND barControllerInstance FOREACH buttons»

	   result.viewControllers = controllers;
	   return result;
}

- (void)applicationDidFinishLaunching:(UIApplication *)application {
	    self.rootController = [self createController];
	    [window addSubview: [self.rootController view]];
    [window makeKeyAndVisible];
}

- (void)dealloc {
	    self.rootController = nil;
    [window release];
    [super dealloc];
}



@end
«ENDFILE»
«ENDDEFINE»
«DEFINE barControllerInstance FOR TabbarButton»
	 «IF view.provider != null»
	 // controller for «this.title.expression('', '')»
	 contentProvider = «view.provider.contentProvider('providers', '', '')»;
	 «ENDIF»
	 controller = [[«view.view.className()» alloc] init];
	 [controller setContentProvider: contentProvider];
	 controller.tabBarItem.title = «title.expression('', '')»;
	 controller.tabBarItem.image = [UIImage imageNamed:«this.icon.expression('','')»];
	 navController = [[UINavigationController alloc] initWithRootViewController:controller];
	 [controllers addObject: navController];
	 [controller release];
	 [navController release];
«ENDDEFINE»
tool integration
demo 2
developer’s point of view

                                      Simulator


                        Objective-C


                                       Device



        DSL
describes application




                                      Simulator


                           Java


                                        Device
toolsmith’s point of view

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

                          EMF MM
APPlause
                                     applause

                                                                                            Simulator



                           «Xpand»
                                                                              Objective-C


                                                                                             Device
                 Parser
                              Templates   Templates
                                iPhone     Android
  Grammar
                 Editor                                       DSL
describes DSL                                         describes application

                          EMF MM


                                                                                            Simulator


                                                                                 Java


                                                                                              Device




                http://code.google.com/p/applause/
http://mobile.itemis.de

@peterfriese | http://peterfriese.de
@hbehrens |!http://heikobehrens.net

Más contenido relacionado

Más de Peter Friese

Más de Peter Friese (20)

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
 
Google+ for Mobile Apps on iOS and Android
Google+ for Mobile Apps on iOS and AndroidGoogle+ for Mobile Apps on iOS and Android
Google+ for Mobile Apps on iOS and Android
 
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-InCross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-In
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Models To Go: How We Built a DSL for Mobile Apps With Tools From the Eclipse Modeling Project

  • 1. Models To Go Peter Friese, itemis Heiko Behrens, itemis @peterfriese | @HBehrens @itemismobile http://mobile.itemis.de (c) 2010 Heiko Behrens & Peter Friese More info: http://www.heikobehrens.net / http://www.peterfriese.de / http://mobile.itemis.com
  • 8. How can we address this diversity?
  • 9. You can write amazing web apps that look exactly and behave exactly like apps on the iPhone Steve Jobs, WWDC 2007
  • 11. server-side web client-side web Web Browser Web Server executes application logic JavaScript executes application logic Web Browser Files Database Files Database Device Backend Device Backend
  • 12. hybrid app Native App Interpreter Request Interceptor JavaScript Bridge Browser executes JavaScript Device Backend
  • 13. interpreted app Native App interpreter Database Application Script Files Device Backend
  • 14. generated app Generator Generator Input Native App Logic Logic Model describes logic and Database Database complete system Files Files Files Database Device Backend
  • 15. gain speed through restrictions
  • 16.
  • 17.
  • 18. Lists Details Custom
  • 21. View Speaker Name Image Session Title Location Cells Entity Navigation Data Provider
  • 22.
  • 23. demo
  • 25. tabbarApplication itemisApp { button { title= "Tuesday" icon= "calendar.png" view= SessionList( SessionsByDay("0") ) } button { title= "Wednesday" icon= "calendar.png" view= SessionList( SessionsByDay("1") ) } button { title= "Thursday" icon= "calendar.png" view= SessionList( SessionsByDay("2") ) } button { title= "Speakers" icon= "person.png" view= SpeakersList( AllSpeakers() ) } }
  • 26. tabbarApplication itemisApp { button { title= "Tuesday" icon= "calendar.png" view= SessionList( SessionsByDay("0") ) } button { title= "Wednesday" icon= "calendar.png" view= SessionList( SessionsByDay("1") ) } button { title= "Thursday" icon= "calendar.png" view= SessionList( SessionsByDay("2") ) } button { title= "Speakers" icon= "person.png" view= SpeakersList( AllSpeakers() ) } }
  • 27. -(UIViewController*)createController { ! itemisAppProviders *providers = [[[itemisAppProviders alloc] init] autorelease]; ! UITabBarController *result = [[UITabBarController alloc] init]; ! NSMutableArray *controllers = [NSMutableArray array]; ! ! UIViewController<IPUIView> *controller; ! UINavigationController *navController; ! IPContentProvider *contentProvider; ! // controller for @"Tuesday" ! contentProvider = [providers providerForSessionsByDay: @"0"]; ! ! controller = [[SessionListViewController alloc] init]; ! [controller setContentProvider: contentProvider]; ! controller.tabBarItem.title = @"Tuesday"; ! controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"]; ! navController = [[UINavigationController alloc] initWithRootViewController:controller]; ! [controllers addObject: navController]; ! [controller release]; ! [navController release]; ! ! // controller for @"Wednesday" ! contentProvider = [providers providerForSessionsByDay: @"1"]; ! ! controller = [[SessionListViewController alloc] init]; ! [controller setContentProvider: contentProvider]; ! controller.tabBarItem.title = @"Wednesday"; ! controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"]; ! navController = [[UINavigationController alloc] initWithRootViewController:controller]; ! [controllers addObject: navController]; ! [controller release]; ! [navController release]; ! ! // controller for @"Thursday" ! contentProvider = [providers providerForSessionsByDay: @"2"]; ! ! controller = [[SessionListViewController alloc] init]; ! [controller setContentProvider: contentProvider]; ! controller.tabBarItem.title = @"Thursday"; ! controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"]; ! navController = [[UINavigationController alloc] initWithRootViewController:controller]; ! [controllers addObject: navController]; ! [controller release]; ! [navController release]; ! ! // controller for @"Speakers" ! contentProvider = [providers providerForAllSpeakers]; ! ! controller = [[SpeakersListViewController alloc] init]; ! [controller setContentProvider: contentProvider]; ! controller.tabBarItem.title = @"Speakers"; ! controller.tabBarItem.image = [UIImage imageNamed:@"person.png"]; ! navController = [[UINavigationController alloc] initWithRootViewController:controller]; ! [controllers addObject: navController]; ! [controller release]; ! [navController release]; ! result.viewControllers = controllers; ! return result; }
  • 28. -(UIViewController*)createController { ! itemisAppProviders *providers = [[[itemisAppProviders alloc] init] autorelease]; ! UITabBarController *result = [[UITabBarController alloc] init]; ! NSMutableArray *controllers = [NSMutableArray array]; ! ! UIViewController<IPUIView> *controller; ! UINavigationController *navController; ! IPContentProvider *contentProvider; ! // controller for @"Tuesday" ! contentProvider = [providers providerForSessionsByDay: @"0"]; ! ! controller = [[SessionListViewController alloc] init]; ! [controller setContentProvider: contentProvider]; ! controller.tabBarItem.title = @"Tuesday"; ! controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"]; ! navController = [[UINavigationController alloc] initWithRootViewController:controller]; ! [controllers addObject: navController]; ! [controller release]; ! [navController release]; ! ! // controller for @"Wednesday" ! contentProvider = [providers providerForSessionsByDay: @"1"]; ! ! controller = [[SessionListViewController alloc] init]; ! [controller setContentProvider: contentProvider]; ! controller.tabBarItem.title = @"Wednesday"; ! controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"]; ! navController = [[UINavigationController alloc] initWithRootViewController:controller]; ! [controllers addObject: navController]; ! [controller release]; ! [navController release]; ! ! // controller for @"Thursday" ! contentProvider = [providers providerForSessionsByDay: @"2"]; ! ! controller = [[SessionListViewController alloc] init]; ! [controller setContentProvider: contentProvider]; ! controller.tabBarItem.title = @"Thursday"; ! controller.tabBarItem.image = [UIImage imageNamed:@"calendar.png"]; ! navController = [[UINavigationController alloc] initWithRootViewController:controller]; ! [controllers addObject: navController]; ! [controller release]; ! [navController release]; ! ! // controller for @"Speakers" ! contentProvider = [providers providerForAllSpeakers]; ! ! controller = [[SpeakersListViewController alloc] init]; ! [controller setContentProvider: contentProvider]; ! controller.tabBarItem.title = @"Speakers"; ! controller.tabBarItem.image = [UIImage imageNamed:@"person.png"]; ! navController = [[UINavigationController alloc] initWithRootViewController:controller]; ! [controllers addObject: navController]; ! [controller release]; ! [navController release]; ! result.viewControllers = controllers; ! return result; }
  • 30. «DEFINE moduleFile FOR Application» «FILE filenameApplicationDelegateModule()» #import "«filenameApplicationDelegateHeader()»" #import "IPUIView.h" #import "«filenameCentralProvidersHeader()»" «EXPAND importStatements-» @implementation «applicationDelegateClassname()» @synthesize window, rootController; -(UIViewController*)createController { «centralProvidersClassName()» *providers = [[[«centralProvidersClassName()» alloc] init] autorelease]; UITabBarController *result = [[UITabBarController alloc] init]; NSMutableArray *controllers = [NSMutableArray array]; UIViewController<IPUIView> *controller; UINavigationController *navController; IPContentProvider *contentProvider; «EXPAND barControllerInstance FOREACH buttons» result.viewControllers = controllers; return result; } - (void)applicationDidFinishLaunching:(UIApplication *)application { self.rootController = [self createController]; [window addSubview: [self.rootController view]]; [window makeKeyAndVisible]; } - (void)dealloc { self.rootController = nil; [window release]; [super dealloc]; } @end «ENDFILE» «ENDDEFINE»
  • 31. «DEFINE moduleFile FOR Application» «FILE filenameApplicationDelegateModule()» #import "«filenameApplicationDelegateHeader()»" #import "IPUIView.h" #import "«filenameCentralProvidersHeader()»" «EXPAND importStatements-» @implementation «applicationDelegateClassname()» @synthesize window, rootController; -(UIViewController*)createController { «centralProvidersClassName()» *providers = [[[«centralProvidersClassName()» alloc] init] autorelease]; UITabBarController *result = [[UITabBarController alloc] init]; NSMutableArray *controllers = [NSMutableArray array]; UIViewController<IPUIView> *controller; UINavigationController *navController; IPContentProvider *contentProvider; «EXPAND barControllerInstance FOREACH buttons» result.viewControllers = controllers; return result; } - (void)applicationDidFinishLaunching:(UIApplication *)application { self.rootController = [self createController]; [window addSubview: [self.rootController view]]; [window makeKeyAndVisible]; } - (void)dealloc { self.rootController = nil; [window release]; [super dealloc]; } @end «ENDFILE» «ENDDEFINE»
  • 32. «DEFINE barControllerInstance FOR TabbarButton» «IF view.provider != null» // controller for «this.title.expression('', '')» contentProvider = «view.provider.contentProvider('providers', '', '')»; «ENDIF» controller = [[«view.view.className()» alloc] init]; [controller setContentProvider: contentProvider]; controller.tabBarItem.title = «title.expression('', '')»; controller.tabBarItem.image = [UIImage imageNamed:«this.icon.expression('','')»]; navController = [[UINavigationController alloc] initWithRootViewController:controller]; [controllers addObject: navController]; [controller release]; [navController release]; «ENDDEFINE»
  • 35. developer’s point of view Simulator Objective-C Device DSL describes application Simulator Java Device
  • 36. toolsmith’s point of view «Xpand» Parser Templates Templates iPhone Android Grammar Editor describes DSL EMF MM
  • 37. APPlause applause Simulator «Xpand» Objective-C Device Parser Templates Templates iPhone Android Grammar Editor DSL describes DSL describes application EMF MM Simulator Java Device http://code.google.com/p/applause/
  • 38.