24
Cross-Platform Mobile Development with Eclipse @peterfriese / @itemis mobile

APPlause - DemoCamp Munich

Embed Size (px)

DESCRIPTION

Build native cross-platform apps using APPlause, a DSL for mobile developement.

Citation preview

Page 1: APPlause - DemoCamp Munich

Cross-Platform Mobile Developmentwith Eclipse

@peterfriese / @itemismobile

Page 2: APPlause - DemoCamp Munich
Page 3: APPlause - DemoCamp Munich

countless devices

Page 4: APPlause - DemoCamp Munich
Page 5: APPlause - DemoCamp Munich

diversity of platforms

Page 6: APPlause - DemoCamp Munich

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();

}

Page 7: APPlause - DemoCamp Munich

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]; } }}

Page 8: APPlause - DemoCamp Munich

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];}

Page 9: APPlause - DemoCamp Munich

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 %}

Page 10: APPlause - DemoCamp Munich

App Anatomy 101

Page 11: APPlause - DemoCamp Munich

App Anatomy 101Views

Page 12: APPlause - DemoCamp Munich

App Anatomy 101CellsViews

Page 13: APPlause - DemoCamp Munich

App Anatomy 101NavigationCellsViews

Page 14: APPlause - DemoCamp Munich

App Anatomy 101NavigationCellsViews

Page 15: APPlause - DemoCamp Munich

App Anatomy 101

Navigation

Cells

Views

Page 16: APPlause - DemoCamp Munich

App Anatomy 101EntitiesSession

titleroom

Navigation

Cells

Views

Page 17: APPlause - DemoCamp Munich

App Anatomy 101

Sessiontitleroom

Entities

Navigation

Cells

Views

Page 18: APPlause - DemoCamp Munich

App Anatomy 101

Sessiontitleroom

Entities

Navigation

Cells

Views

Page 19: APPlause - DemoCamp Munich

App Anatomy 101

ContentProviders

Sessiontitleroom

Entities

Navigation

Cells

Views

Page 20: APPlause - DemoCamp Munich

App Anatomy 101

ContentProviders

Sessiontitleroom

Entities

Navigation

Cells

Views

Page 21: APPlause - DemoCamp Munich

App Anatomy 101

Sessiontitleroom

ContentProviders

Entities

Navigation

Cells

Views

Page 22: APPlause - DemoCamp Munich

Demo :)

Page 23: APPlause - DemoCamp Munich
Page 24: APPlause - DemoCamp Munich

@hbehrens and @peterfriese working with @itemismobile