150 likes | 260 Views
Some Real Life Practical Experience Words of Wisdom(?!) by Dave Westwater. Mobile Application Development. A Few Admissions. I'm self taught, so I don't know everything! Been 'out of it' for a couple of years now, not up-to-date. Mostly games development.
E N D
Some Real Life Practical Experience Words of Wisdom(?!) by Dave Westwater Mobile Application Development
A Few Admissions • I'm self taught, so I don't know everything! • Been 'out of it' for a couple of years now, not up-to-date. • Mostly games development. • 3 years embedded C, 6 years of J2ME, no experience of other languages.
Lessons Learned (1) • First job in industry with Nokia (1999-2002) • First lesson learned: • There's no big secret to mobile application development! • Languages are essentially the same as those for desktop applications with some restrictions: • C/C++/C#, J2ME, ... • Project life-cycles are essentially the same.
Lessons Learned (2) • Second Lesson: • Be acutely aware of the environment! • Using very limited resources: • Screen size, processing power, memory (both flash-ROM and RAM), user interface, connectivity • Can you write a game engine plus four games in <90kb? • Better now of course. • You've got it easy
Lessons Learned (3) • Third Lesson: • Optimise, optimise and optimise again... • Particularly true in games programming • Pushing the phone to the limit of CPU power and memory usage. • You want to use every available resource. • Comes with experience. • A good book should give you helpful hints.
Lessons Learned (4) • Second job in industry: 3G-Scene (2004-2006) • First real use of J2ME, first mobile casino • Fourth Lesson: • One instruction manual, twenty interpretations • Sun release the JSR descriptions of APIs. • Can be vague in places • Manufacturers seem to have their own interpretation. • Manufacturers and service providers drive JSR development
Lessons Learned (5) • Fifth Lesson: • Phone software is full of bugs. • Not surprising! • First in a new line is always the worst. • Need to work around some problems • Examples • Samsung D500, HTTPConnection always fails when first opened, need to close then reopen it. • Nokia 6600 series, early versions had problems with full screen mode
Lessons Learned (6) • Sixth Lesson: • Brute force testing on the device is the only assured way of ensuring the apps work on the phones! • You can develop on emulators and it will work fine. Put it on a phone, it will fall over. • Stems from lessons 4 and 5. • Emulators are getting better. • Nokia's S40 emulators were very good.
Lessons Learned (7) • Seventh Lesson • Debugging on the device is a bitch! • No stdout or stderr stream for error output. • Need to draw on the screen. • In J2ME throw up alerts with the information. • Do as much as you can on the emulator! • Fail gracefully • Nothing worse than having to remove the battery to reset the phone when an app crashes.
Lessons Learned (8) • Eighth Lesson: • Make the product work. • You can't issue patches to fix the problem. • Need to reissue the whole application. • MIDP3 going to use shared libraries • A consumer will be annoyed if they purchase an app that doesn't work. • Not restricted to mobile apps.
Lessons Learned (9) • Third job in industry: Tricast Solutions (2006-2007), J2ME engine for flash-like media • Ninth Lesson: • Don't use a high-end phone as your baseline! • You'll need two baseline phones for each screen size template • One with lowest CPU power • One with smallest memory • Find the most restrictive devices you want your app on and do them first.
Lessons Learned (10) • I tried hard to think of another one but couldn't. • I could give lots more technical advice but I've kept this as general as possible.
Lessons Learned (10) • I tried hard to think of another one but couldn't. • I could give lots more technical advice but I've kept this as general as possible. • Be prepared to do lots of porting! • More porting. • Less developing.
Some Links • J2ME API documents: • http://java.sun.com/javame/reference/apis.jsp#api • Community: • www.JavaRanch.com • Distribution: • www.getjar.com, free, and it's not all sex.
Examples • Demo games: • http://www.getjar.com/products/8203/Rebound • http://www.getjar.com/products/8205/AlienAttack • http://www.getjar.com/products/8207/AlienInvaders • Source code to be added to course website. • Might be old code • I hope it works!