Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

EclipseCon2011 Cross-Platform Mobile Development with Eclipse

4,350 views

Published on

  • Be the first to comment

EclipseCon2011 Cross-Platform Mobile Development with Eclipse

  1. 1. Cross-Platform Mobile Development with EclipseEclipseCon 2011 March 21st - 24th Santa Clara, California@hbehrens and @peterfriese working with @itemismobile
  2. 2. @moskovich: “Your mobile phone has morecomputing power than all of NASA in 1969. NASA put a man on the moon...
  3. 3. ...we put a bird into pigs.”
  4. 4. countless devices
  5. 5. diversity of platforms
  6. 6. 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(); }
  7. 7. 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]; } }}
  8. 8. 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];}
  9. 9. 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 %}
  10. 10. object-orientation
  11. 11. –principle
  12. 12. stateless
  13. 13. App Anatomy 101
  14. 14. Views
  15. 15. Views Cells
  16. 16. Views Cells Navigation
  17. 17. EntitiesViews SessionCells title roomNavigation
  18. 18. Views SessionCells title roomNavigationEntities ContentProviders
  19. 19. DSL for mobiletabbarApplication itemisApp { button { title= "Tuesday" icon= "calendar.png" view= SessionList( SessionsByDay("2011-03-22") ) } button { title= "Wednesday" icon= "calendar.png" view= SessionList( SessionsByDay("2011-03-23") ) } button { title= "Thursday" icon= "calendar.png" view= SessionList( SessionsByDay("2011-03-24") ) } button { title= "Speakers" icon= "person.png" view= SpeakersList( AllSpeakers() ) }}
  20. 20. «Xpand»
  21. 21. Demo :)
  22. 22. @hbehrens and @peterfriese working with @itemismobile

×