Your SlideShare is downloading. ×
Cross-Platform Native Mobile Development with Eclipse
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Cross-Platform Native Mobile Development with Eclipse

2,438
views

Published on

Developing great apps for mobile platforms like Android, iOS or mobile web is a challenging task. Not only do you have to take into consideration the limited resources your app has at it's disposal, …

Developing great apps for mobile platforms like Android, iOS or mobile web is a challenging task. Not only do you have to take into consideration the limited resources your app has at it's disposal, you also have to follow the established UI idioms - which may differ on the respective platforms.

In this session, I will demonstrate how you can build mobile apps with tools from the Eclipse ecosystem. Based on real-world examples I will present a domain-specific language we used to mobilize enterprise systems or to create the official Eclipse Summit Europe conference app (http://bit.ly/ese_app_de). What's more, I will show you how to overcome the tedium of having to manually port your application from one platform to other platform technologies such as Objective-C or Django/Python. Finally, I will show how to integrate Eclipse tooling with external tools such as Apple's Xcode and Google App Engine.

See http://lanyrd.com/2011/eclipsecon-europe/shhmy/

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,438
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
116
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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. 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 ofto
  • 5. People are !fferent
  • 6. ... so #ey have !fferent ta$es!
  • 7. countless devices
  • 8. diversity of platforms
  • 9. Javapublic 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(); }
  • 10. 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]; } }}
  • 11. 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];}
  • 12. 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 %}
  • 13. server-side web Web Server executes application logicWeb Browser Files Database Device Backend
  • 14. client-side web Web Browser JavaScriptexecutes application logic Files Database Device Backend
  • 15. hybrid appNative App Interpreter Request Interceptor JavaScript Bridge Browser executes JavaScript Device Backend
  • 16. interpreted appNative App interpreter Database Application Script Files Device Backend
  • 17. generated app Generator Generator Input Native App Logic Logic Modeldescribes logic and Database Database complete system Files FilesFiles Database Device Backend
  • 18. App Anatomy 101
  • 19. Views
  • 20. Views Cells
  • 21. Views Cells Navigation
  • 22. EntitiesViews SessionCells title roomNavigation
  • 23. Views SessionCells title roomNavigationEntities ContentProviders
  • 24. Views SessionCells title roomNavigationEntities ContentProviders
  • 25. DSL for mobileViewsCellsNavigationEntitiesContentProviders
  • 26. NavigationtabbarApplication 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() ) }}
  • 27. Viewstableview SessionsList(Session[] sessions) { title= "Sessions" section { } }}
  • 28. Cellstableview SessionsList(Session[] sessions) { title= "Sessions" section { cell Subtitle foreach items as item { details= item.title action=NewsItemDetailView(item) } }}
  • 29. Entitiesentity Session { String title String id String room Date startTime Date endTime}
  • 30. ContentProviders contentprovider Sessions(String day) returns Session[] fetches XML from ("http://eclipsecon.org/ece2011?" day) selects "sessions.session"
  • 31. Demo :)
  • 32. «Xpand»
  • 33. Toolsmith’s point of view «Xpand» Parser Templates Templates iPhone Android Grammar Editor describes DSL EMF MM
  • 34. Extending Applause1. 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>
  • 35. twitter @peterfrieseblog http://peterfriese.decompany http://www.zuehlke.com