Presentation is loading. Please wait.

Presentation is loading. Please wait.

| 2004 JavaOne SM Conference | BOF 2796 1 JAVAONE 2004 Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc.

Similar presentations


Presentation on theme: "| 2004 JavaOne SM Conference | BOF 2796 1 JAVAONE 2004 Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc."— Presentation transcript:

1 | 2004 JavaOne SM Conference | BOF 2796 1 JAVAONE 2004 Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc.

2 java.sun.com/javaone/sf | 2004 JavaOne SM Conference | BOF 2796 2 Pervasive J2ME™ in Practice Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc. A Cookbook for Developers and Designers http://uievolution.com/javaone/

3 | 2004 JavaOne SM Conference | BOF 2796 3 Delivering on J2ME ™ Learn from two different perspectives: Programmer's and Designer's Practical aspects & Design considerations

4 | 2004 JavaOne SM Conference | BOF 2796 4 Agenda Programmer's perspective APIs (and more APIs) Constraints Bugs Designer's perspective Deconstructing mobile design From PC to mobile From Browser to mobile From Flash to mobile Q & A

5 | 2004 JavaOne SM Conference | BOF 2796 5 Programmer's Perspective APIs and more APIs Constraints Bugs

6 | 2004 JavaOne SM Conference | BOF 2796 6 API Fragmentation Configuration: ─CLDC Profiles: ─DoJa-1.5oe, DoJa-2.0, DoJa-3.0, DoJa-3.5 ─MIDP-1.0, Motorola, Nokia, Sprint, Vodafone,... ─MIDP-2.0 (CDC & Personal Profiles not shown...) One configuration, a multitude of profiles

7 | 2004 JavaOne SM Conference | BOF 2796 7 DoJa Connect to original host only 30KB application code 100KB scratchpad (“scratchpad:///0;pos=nn”) JAM not JAD GIF not PNG MLD not MIDI SoftKey not Command No drawArc or fillArc No clipRect (DoJa-1.5oe) DoJa Profile requires special treatment

8 | 2004 JavaOne SM Conference | BOF 2796 8 MIDP Missing in MIDP-1.0 ─Sound, Video ─Full screen ─browse(url), call(telno), send(sms) MIDP-2.0 and JTWI do consolidate Unresolved: ─Detecting presence of optional APIs ─Detecting support for platform requests Evolution of MIDP

9 | 2004 JavaOne SM Conference | BOF 2796 9 API Fragmentation void browseTo(String url) throws Exception{ //#sprint{ System.setExitURI(url); notifyDestroyed(); //#sprint} //#midp2{ if (platformRequest(url)) { notifyDestroyed(); } //#midp2} } Strategy: Conditional Compilation

10 | 2004 JavaOne SM Conference | BOF 2796 10 API Fragmentation Preprocessors http://antenna.sourceforge.net http://sosnoski.com/opensrc/jenable Strategy: Conditional Compilation

11 | 2004 JavaOne SM Conference | BOF 2796 11 Constraints Lower bounds: ─200KB heap ─30KB code ─20KB record store ─12KB network request ─120x120 screen ─Slow processor Most constrained: DoJa and Nokia Series 40 Varied and sometimes incompatible

12 | 2004 JavaOne SM Conference | BOF 2796 12 Constraints Lowest common denominator? Load code and content OTA Strategies

13 | 2004 JavaOne SM Conference | BOF 2796 13 Bugs Detecting end of input stream Font metrics Graphics clipping Record stores A select few – from a large collection

14 | 2004 JavaOne SM Conference | BOF 2796 14 Bug: InputStream End Test byte[] readFromStream(InputStream in) throws IOException { byte[] buf = new byte[100]; ByteArrayOutputStream out = new ByteArrayOutputStream(); int n; // while ((n = in.read(buf)) != -1) { while ((n = in.read(buf)) > 0) { // FIXED out.write(buf, 0, n)); return out.toByteArray(); } EOF (-1) is never returned

15 | 2004 JavaOne SM Conference | BOF 2796 15 Bug: Inaccurate Font Metrics g.drawString(“Qwerty”, x, y, g.TOP | g.LEFT); Precise control of text layout is tricky

16 | 2004 JavaOne SM Conference | BOF 2796 16 Bug: Clipping Problems protected void paint(Graphics g) { int w = getWidth(); int h = getHeight(); g.setColor(0xFF0000); g.translate(-w/2, -h/2); g.fillRect(w/2, h/2, w, h); g.setColor(0x0000FF); g.clipRect(w - w/4, h - h/4, w/2, h/2); g.fillArc(w - w/4, h - h/4, w/2, h/2, 0, 360); } Graphics translate vs. clipRect

17 | 2004 JavaOne SM Conference | BOF 2796 17 Bug: Clipping Problems g.fillArc(w/4, h/4, w/2, h/2, 0, 360); Strategy: Don't use g.translate

18 | 2004 JavaOne SM Conference | BOF 2796 18 Bug: Record Stores Complex DB-style API Many bugs in MIDP-1.0 RI Wide range in limits and performance Easy to corrupt No way to read or write a partial record RMS is complex and fragile

19 | 2004 JavaOne SM Conference | BOF 2796 19 Bug: Record Store Corruption void replace(String name, byte[] data) throws RecordStoreException { try { RecordStore.deleteRecordStore(name); } catch (RecordStoreNotFoundException ex) { } RecordStore rs = RecordStore.openRecordStore(name, true); boolean done = false; try { rs.addRecord(data, 0, data.length); done = true; } finally { rs.closeRecordStore(); if (!done) RecordStore.deleteRecordStore(name); } Strategy: Never modify, completely replace

20 | 2004 JavaOne SM Conference | BOF 2796 20 Unusual Features Absolute URL in JAD: ─MIDlet-Jar-URL: http://host.net/path/app.jarhttp://host.net/path/app.jar Gateway transformations ─Accept: */* ─Cache-Control: No-Transform Paintable canvas overlaps command labels Or bugs?

21 | 2004 JavaOne SM Conference | BOF 2796 21 Overlapping Command Labels

22 | 2004 JavaOne SM Conference | BOF 2796 22 Agenda Programmer's perspective APIs (and more APIs) Constraints Bugs Designer's perspective What is mobile design? From PC to mobile From Browser to mobile From Flash to mobile Q & A

23 | 2004 JavaOne SM Conference | BOF 2796 23 Explore Solutions for Wireless J2ME Applications from the Designers Perspective UI Design Challenges and Solution

24 | 2004 JavaOne SM Conference | BOF 2796 24 UI Design Challenges and Solution for J2ME Deconstructing mobile design PC to Mobile: ESPN Bottomline Web to Mobile: Movies.com Flash to Mobile: ESPN Baseball Gamecast

25 | 2004 JavaOne SM Conference | BOF 2796 25 Deconstructing Mobile Design Size Limitations Everywhere -Screens -File Sizes -Heap Customer Considerations -Existing Brand Continuity -Features -What do users expect? Mobile User Interface Model -Input Controls -Usage Patterns -Feedback / Responsiveness -Cost UI Design Challenges and Solution for J2ME

26 | 2004 JavaOne SM Conference | BOF 2796 26 PC Application to Mobile: ESPN Bottomline UI Design Challenges and Solution for J2ME

27 | 2004 JavaOne SM Conference | BOF 2796 27 PC Application to Mobile: ESPN Bottomline UI Design Challenges and Solution for J2ME

28 | 2004 JavaOne SM Conference | BOF 2796 28 PC Application: ESPN Bottomline Considerations -Real-time Sports News Ticker -Large amount of data displayed -Links to ESPN Website for further information. -Desktop Application has ”Always On” Experience UI Design Challenges and Solution for J2ME

29 | 2004 JavaOne SM Conference | BOF 2796 29 Mobile: ESPN Bottomline UI Controls and Focus: Auto-scroll UI Design Challenges and Solution for J2ME

30 | 2004 JavaOne SM Conference | BOF 2796 30 Mobile: ESPN Bottomline The Translation: Passive to Active UI Design Challenges and Solution for J2ME

31 | 2004 JavaOne SM Conference | BOF 2796 31 Mobile: ESPN Bottomline UI Controls and Focus UI Design Challenges and Solution for J2ME

32 | 2004 JavaOne SM Conference | BOF 2796 32 Mobile: ESPN Bottomline Dynamic Screen Layout UI Design Challenges and Solution for J2ME Standard Phone Small (Sanyo 8100) Wide (RIM Blackberry)

33 | 2004 JavaOne SM Conference | BOF 2796 33 Mobile: ESPN Bottomline Application State Persistence UI Design Challenges and Solution for J2ME End Application Locked… Restart Application  Return to Locked Game!

34 | 2004 JavaOne SM Conference | BOF 2796 34 Web to Mobile: Movies.com UI Design Challenges and Solution for J2ME

35 | 2004 JavaOne SM Conference | BOF 2796 35 Web to Wireless: Movies.com UI Design Challenges and Solution for J2ME

36 | 2004 JavaOne SM Conference | BOF 2796 36 Web to Mobile: Movies.com Considerations -Website holds large amount of data -Many paths to find information -User customization features for ZIP code& Favorite theater UI Design Challenges and Solution for J2ME

37 | 2004 JavaOne SM Conference | BOF 2796 37 Web to Mobile: Movies.com Consistent Branding and custom UI elements UI Design Challenges and Solution for J2ME

38 | 2004 JavaOne SM Conference | BOF 2796 38 ZIP Search Navigate Web to Mobile: Movies.com Top Level Accessibility UI Design Challenges and Solution for J2ME What’s New?

39 | 2004 JavaOne SM Conference | BOF 2796 39 Web to Mobile: Movies.com Quick Access to ZIP codes… UI Design Challenges and Solution for J2ME

40 | 2004 JavaOne SM Conference | BOF 2796 40 Web to Mobile: Movies.com UI Design Challenges and Solution for J2ME Favorite Theaters My Movies

41 | 2004 JavaOne SM Conference | BOF 2796 41 FLASH to Mobile: ESPN Baseball Gamecast UI Design Challenges and Solution for J2ME

42 | 2004 JavaOne SM Conference | BOF 2796 42 FLASH to Mobile: ESPN Baseball Gamecast UI Design Challenges and Solution for J2ME

43 | 2004 JavaOne SM Conference | BOF 2796 43 FLASH to Mobile: ESPN Baseball Gamecast Considerations -Connected application with real time information -Large Immersive Data application -Progress, stats, scores and player information all on one screen poses interesting layout problems UI Design Challenges and Solution for J2ME

44 | 2004 JavaOne SM Conference | BOF 2796 44 FLASH to Mobile: ESPN Baseball Gamecast UI Design Challenges and Solution for J2ME

45 | 2004 JavaOne SM Conference | BOF 2796 45 FLASH to Mobile: ESPN Baseball Gamecast Dividing the Information UI Design Challenges and Solution for J2ME

46 | 2004 JavaOne SM Conference | BOF 2796 46 FLASH to Mobile: ESPN Baseball Gamecast Mobile Specific Feature: User alerts UI Design Challenges and Solution for J2ME

47 | 2004 JavaOne SM Conference | BOF 2796 47 Summary Some of the items we think about when designing these applications: Determine which controls make sense for the application and for mobile. Dividing the data and decision process into usable pieces for mobile. Focus on features that make sense to the mobile experience.

48 | 2004 JavaOne SM Conference | BOF 2796 48 For More Information http://www.uievolution.com/javaone/

49 | 2004 JavaOne SM Conference | BOF 2796 49 Q&A Pervasive J2ME™ in Practice 49

50 java.sun.com/javaone/sf | 2004 JavaOne SM Conference | BOF 2796 50 Pervasive J2ME™ in Practice Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc. A Cookbook for Developers and Designers http://uievolution.com/javaone/


Download ppt "| 2004 JavaOne SM Conference | BOF 2796 1 JAVAONE 2004 Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc."

Similar presentations


Ads by Google