| 2004 JavaOne SM Conference | BOF JAVAONE 2004 Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc.
java.sun.com/javaone/sf | 2004 JavaOne SM Conference | BOF Pervasive J2ME™ in Practice Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc. A Cookbook for Developers and Designers
| 2004 JavaOne SM Conference | BOF Delivering on J2ME ™ Learn from two different perspectives: Programmer's and Designer's Practical aspects & Design considerations
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF Programmer's Perspective APIs and more APIs Constraints Bugs
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF API Fragmentation void browseTo(String url) throws Exception{ //#sprint{ System.setExitURI(url); notifyDestroyed(); //#sprint} //#midp2{ if (platformRequest(url)) { notifyDestroyed(); } //#midp2} } Strategy: Conditional Compilation
| 2004 JavaOne SM Conference | BOF API Fragmentation Preprocessors Strategy: Conditional Compilation
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF Constraints Lowest common denominator? Load code and content OTA Strategies
| 2004 JavaOne SM Conference | BOF Bugs Detecting end of input stream Font metrics Graphics clipping Record stores A select few – from a large collection
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF Bug: Inaccurate Font Metrics g.drawString(“Qwerty”, x, y, g.TOP | g.LEFT); Precise control of text layout is tricky
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF Bug: Clipping Problems g.fillArc(w/4, h/4, w/2, h/2, 0, 360); Strategy: Don't use g.translate
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF Unusual Features Absolute URL in JAD: ─MIDlet-Jar-URL: Gateway transformations ─Accept: */* ─Cache-Control: No-Transform Paintable canvas overlaps command labels Or bugs?
| 2004 JavaOne SM Conference | BOF Overlapping Command Labels
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF Explore Solutions for Wireless J2ME Applications from the Designers Perspective UI Design Challenges and Solution
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF PC Application to Mobile: ESPN Bottomline UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF PC Application to Mobile: ESPN Bottomline UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF Mobile: ESPN Bottomline UI Controls and Focus: Auto-scroll UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF Mobile: ESPN Bottomline The Translation: Passive to Active UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF Mobile: ESPN Bottomline UI Controls and Focus UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF Mobile: ESPN Bottomline Dynamic Screen Layout UI Design Challenges and Solution for J2ME Standard Phone Small (Sanyo 8100) Wide (RIM Blackberry)
| 2004 JavaOne SM Conference | BOF Mobile: ESPN Bottomline Application State Persistence UI Design Challenges and Solution for J2ME End Application Locked… Restart Application Return to Locked Game!
| 2004 JavaOne SM Conference | BOF Web to Mobile: Movies.com UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF Web to Wireless: Movies.com UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF Web to Mobile: Movies.com Consistent Branding and custom UI elements UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF ZIP Search Navigate Web to Mobile: Movies.com Top Level Accessibility UI Design Challenges and Solution for J2ME What’s New?
| 2004 JavaOne SM Conference | BOF Web to Mobile: Movies.com Quick Access to ZIP codes… UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF Web to Mobile: Movies.com UI Design Challenges and Solution for J2ME Favorite Theaters My Movies
| 2004 JavaOne SM Conference | BOF FLASH to Mobile: ESPN Baseball Gamecast UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF FLASH to Mobile: ESPN Baseball Gamecast UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF 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
| 2004 JavaOne SM Conference | BOF FLASH to Mobile: ESPN Baseball Gamecast UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF FLASH to Mobile: ESPN Baseball Gamecast Dividing the Information UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF FLASH to Mobile: ESPN Baseball Gamecast Mobile Specific Feature: User alerts UI Design Challenges and Solution for J2ME
| 2004 JavaOne SM Conference | BOF 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.
| 2004 JavaOne SM Conference | BOF For More Information
| 2004 JavaOne SM Conference | BOF Q&A Pervasive J2ME™ in Practice 49
java.sun.com/javaone/sf | 2004 JavaOne SM Conference | BOF Pervasive J2ME™ in Practice Joe Bowbeer Software Designer UIEvolution, Inc. Cris Cook Graphic Designer UIEvolution, Inc. A Cookbook for Developers and Designers