Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Schepis UI JMDF Flash Lite vs. JavaME

4.404 Aufrufe

Veröffentlicht am

Veröffentlicht in: Business
  • Login to see the comments

Schepis UI JMDF Flash Lite vs. JavaME

  1. 1. žJMDF Java ME User Interface Development User Interface Development - “Flash Lite vs. javaME", Bologna 29-01«2007 - htLp: //wvn. -¡, jmdf. org
  2. 2. Agenda User Interface Development- "Flash Lite vs. javaME". Bologna 2901-2007 - httpz/ /wwwjmdtorg
  3. 3. User Interface APIs - Today MIDP 2.0 (JSR 118) MM API 1.1 (JSR 135) 3D Graphics (JSR 184) JTWI (JSR 185) r: on: n andler (JSR 211) SVG (JSR 226) Anwar»: Sup (TSR 234) CLDC 1.1 (JSR 139) ”EIN-Inn User Interface Development- "Flash Lite vs. javaME". Bologna 2901-2007 - httpz/ /wwwjmdtorg
  4. 4. Netbeans Mobile Visual Designer High Level UI H the different paths thai: iEHÄH; he can add ar lremave Scílfēíėlllši, . ;.ell as thė» E Enteri: líläign er Simjulatēs Thíow scíreen gappeaarenins; a real device; E station into; three uude . MaínL-IaIIy* User Interface Development- "Flash Lite vs. javaME". Bologna 2901-2007 - httpz/ /wwwjmdforg
  5. 5. Layout with Mobile Visual Designer ÜMDF - The Component Palette - Screens - Commands - Form Items - Elements - Resources - Custom Components - Special Components - Splash Screen - Table - Waít Screen - lnspector and Properties Windows User Interface Development - “Flash Lite vs. javaMč". Bologna 29-01-2007 - http: ma/ viiv. jmdforçi
  6. 6. Bit-armu m A na: muu”. ma. : go. l. ._. ... 70- yi u. o_. -. uųn. , r. . ma- va: . V f 41 n. .. „u v s-ųvjnruí . innu-namm- . smwn' . ų-O-w-ev' . . , Üum z-m Š~~: Z(›ui run; I "| u . ._i. .. i. ._„ . ..1 _ › . .-„. „_-. i.. ... .., ¡ uuu- _ l"ll›&4 „i . laulu-ull huma- 'wvs „_ _. „ «y u , í „m > . .. ›. (l: [ii §r~ EJJ Lui : "¡)lu' 1.41 . ..p . ..i l : list-Mi »nl - 4 nr. "rOlhvi. 'lr. 'n y 'a 'run' r», nm : mçi r-. i.. ... „<ų 1 sammu. : _ ^ . 'OCpLJIIIL a Pivnlwun v. u. .. U „omi ”r u-ninw . I ruum: -` ”lrzazc : run »Wii nii l l l v sK-J lnllí-J . ; ILV'ŠJIVIIIIIILJ u. Il; nhí itųųlv Im r 0 llavßėnm u 4 1 PŠI - 'Äßbllßlppli MMIÜ *ƒydm uni : oo g. _a~: .v¡. ,_i. y›. :r. 24 ma : m . riiul 'nun- 'Enter Ylrbu Te-1' I müüsid . _ u ~rrrn [ram] Il Ill v " _ L. lnspector I' x Duo-linnu [Fun] ~ Muu. › u r ŠVŠCIÖGI rr- nj L (1 V ma. Wcprrn Irv- rrekrn: Müftm la. lmahm Pvo-'nr lmwrn-u l FL-'írlrt Uxv C ü: ` [ Vlduev
  7. 7. Demo žJMDF - Visual Designer Demonstration: - creating Mobile Splash Screens - using the Tableltem User Interface Development- “Flash Lite vs. javaMč". Bologna 29-01-2007 - http: ma/ viiv. jmdforg
  8. 8. Optimize The Application For Different Devices - Configuration Manager - Writing a single application that will run on disparate platforms can be challenging: - screen size - free memory - software issues - available API's - One Configuration for each distribution JAR file you plan on building for your project - Existing Configuration template - customizable User Interface Development- “Flash Lite vs. javaME". Bologna 29-01-2007 - http: Iivi/ viiv. jmdforg
  9. 9. Editions PMÜF' l Ü : Lou IC mm. l u run-imp: l Ü MIÜP l -. `I' CLDC l U WIJA | 'J MRÄÄPI l Ü pēršrinnl, laual* lėf hnnifig! JavaPhcfn-: Ü API ç: Eel-Igat . viiLiP _* U Cíttii: l l '. '.". l›`« in riIxiAPi I c: BIAPI wocsöcxi MIDP '_` U CLDC l CI cam I P: l. l'vl. ›'I. PI Bi-*IPI : No üBEx: IMIILIP J IJ. *_; _EI(. `, l l IŠZFIIÝ Arlii Py-, cgncll pruly Wh/ Ux l Ü Mhlâsl aim INQUBEXI' FC wir: F'I'i/ l l 20.4% VIIDF 2 ÜJZLCHZ l I Java' lectnologv for the W r-: - ess Industri, *JNIIA l l VINNIAPI Elluvlooíh API : valn IJBEX API; Mirabile 3Ü líšiųphcs API F IeiIi*›nn: <r'„li1~'1 . ind PIM API MIDP Z *JWŠZL DC l l Jama lecnnc-logx* 'o' the W c-ess Industri, help Se*. ces API SATSA API Location API SIP API lilobile "VI íjraph cs API WIJA Z -J FI s-: Tlaneuttirn and P l. ' âPI Bluetooth API l. '.ll"l ÜEEX RP! :
  10. 10. Multiple Device Configurations ¡- Q kui ljlnovdmhntofdnmwlhrf 'I- Ka: i- uus mammu: ė : sammuna ¡ [g m__'*°'““' nuu- lmrvu-. epėnmJnw-„v E] I nalia-istuv haarangu I : Inc-w Qancpu ; '- MPs-laius e O mu mammu „nonii ennem I suurenema-o l : 'r omab-u MÜÜ* __ E' „H lhdnslneeunas [jrbcorcnawiumonumusis . ': ':'sw'„„'m¡a¡¡_'~lu¡„, 'I E Wfßm” : uusasumi . ' ¡ - ammu 1 r E „n mmwnnmmiuurmubwis ¡ nu kuumohu: [jim-mainimata f MW Emmaoemuquuuiuųmo " '. °'°""" Enunmnnimanmmt» User Interface Development- “Flash Lite vs. javaME". Bologna 29-01-2007 - http: .'/ xvi'iiv, jrndf. org
  11. 11. Optimize The Application For Different Devices - Resource Locations - Handling Project Resources - Use Different Resource Locations and match the resources to the configurations in Libraries & Resource panel / res/ small/ splashscreen. pnq / res/ medium/ splashscreen. png fres/ large/ sp1ashScreen. png Image splashscreen = Image. createImage('sp1ashScreen. png”); - Using Configuration-Specific Code Blocks and Abilities Illltdat amallscroon / /0 splashscreen-Image. crea: eInage["/ res/ spleshsczeensnall. png"); Illolitdot Inddunscroon / /0 splashscreen-Image. createInaqe("/ :es/ spleshscreennedium. pnq"): Illoloo apleshscreen-Inage. croatolaga("/ res/8p1ashsc: eenLazce. pnI"J: Illendit User Interface Develoomem - “Fíash Lne vs. javaME". Bologna 29-01-2007 - i1LLp: /'. "vv'uv. jmdforg
  12. 12. Defining and Using Preprocessor *MDF - Using Preprocessor Directives - Directive Syntax and Functions - Identifiers - Variables - Operators - Expressions - Compilation Based on Device Platform Versioning User lnLeNace Develoomevt - “Flash Lite vs. javaMč". Bologna 29701-2007 - http: ma/ viiv. jmdforçi
  13. 13. Optimize The Application For Different Devices - Preprocessor - Using the Preprocessor - CPP-Iike syntax - Example: // #if nmodia / /Öif nokia / /li! a60_ver= =“1.0' import com. nokía. mmapi. v1 / /0011! s60_ver= ="2.0" import com. nokia. mmapi. v2 / /loloo import com. nokía. mmapi. def / /Iendit / /ßelse import javax. microedition. mmapi / /tendif / /fendif User lnter'ace Develoomevt - “Flash Lite vs. javaME". Bologna 29701-2007 - http: ."«'v. ¡-4l. ~¡„jmdforçi
  14. 14. Optimize The Application For Different Devices - Preprocessor Elimport javamncroeditionųnidlet. '; '~ import javaxmicroedition. lcdui. *: _ ____ Avdänle Díectwes a" Muhumaa Maksuameti: " p »â dehug Debug next he V 5 ' Õ define Define temporary symbol ' `Ä Ö enddcbug Close . ifmdebug block lüli 9 í Evaluate expression HIDIEC l e Ifdef Check for deflnhon . ųē índef Check for absence ' äelltu! ›„ : aga 9 “ü” MW“ *W (ddųi) E] , Ö Dclmllídowftom PVopcKonfquotion 7 : I l e "debt" Debug "uude has Õ Defaultonfíwration Prmect COnhJUâllOfl *š Indeflnc Undefhe symbol " „anz „emad , buy (m) n' 'Ö JSRITI Undefned anny y O : sun oernea ebay (m) 0 191104 Defhed abity (Lo) ' _ 0 : suzu Undcfnod ahlty ' "IÜO : suzu Undefnedahlty ' O 191230 Defhed ablly (m) 0110 < O uus Deihed eblty (m) Ö 19102 Defhed obity (m) . ' '< O MIDP Defned oblty (2.0) pm 0 mnn Demod abity (m) 0 Mosna: ) Undefned abnily : J „muid z/ .al User lnter'ace Development - “Flash Lite vs. javaMč". Bologna 29701-2007 - http: ma/ viiv. jmdforçi
  15. 15. Õ PlatfoImMaMgerDemo Project Corfqiaatiom loeraucca-tųxaum Category: (3 General CE* Mlribues MIDlets Qrn mm Registry CF» API Permissions - 1"- Buid Saints Fitcmo 1°: camping š' libraieseuResoirces 5 Obfuscaüng ä cueungm E? Swlw a; Generatlnç Javadoc D Rummo 43 Dedowng L-ŠJ innu - - ¡'-L"HIVIIIIMLJ v ß- Maaga Configurations. .. Abicvss: nbilty Vane (opuonä) JSRi79 1.0 WVM 2 . O 157175 1.0 Screerfleujų 3204 Hbcí `1T í/ Mm JŠRZ 1 l 1 . O J5R18§ 1.0 159172 1 0_ Scremvndth í ScreenCobrücptfi AS TTIDPB EB .159177 1.0 lagescieen cclorscrem JSRSZ To I p u; u-. IJH Uulu-ur. 'l Il~ na! I*I"`. '. „l , Il
  16. 16. Optimize The Application For Different Users - Localization - Using the Localization Support Class Localizationsupport. getMessage("PROPERTY_NAME") - The message. pr0perties file PROPERTY_NAME= My Translatable Text string - This techníque uses the microeditionJocale property of the phone to determine which version of the message. properties file should be used - You can force a particular region to be used Localizationsupport. initLocalizationSupport("en_US') User Interface Development- “Fíash Lite vs. javaME". Bologna 29-01-2007 - http: Hwvivr. jnwdforg
  17. 17. Overview of Graphics APIs ÜMDF - LCDUI for MIDP - JSR 184 - Mobile 3D Graphics API forj2ME - JSR 226 - Scalable 2D Vector Graphics API for J2ME User Interface Development - “Fíash Lite vs. javaME". Bologna 29-01-2007 - http: Hwviuv. jmdforg
  18. 18. LCDUI for MIDP - Canvas ÜMDF - Immediate mode API - All drawing done within a paint() callback - Can also draw to an off screen mutable image - Suited for event based interaction - High performance, low system overhead User Interface Development- “Fíash Lite vs. javaME". Bologna 29-01-2007 - http: /.'vvvit~¡, jnwdf.0rg
  19. 19. LCDUI for MIDP - Game Canvas ÜMDF - Immediate mode synchronous drawing - Ideal for "platformer" games - Sprite and tiled background - Well suited for games - Only on MIDP 2.0 User Interface Development- “Flash Lite vs. javaMč". Bologna 29701-2007 - http: ma/ viiv. jnwdforg
  20. 20. JSR 184 - Mobile 3D *JMDF - 3D retained mode and Immediate mode API - Focus is retained mode (display list, scene graph) - Defines standard file format-m3g - Tools available to export graphics models in m3g format - Easier to develop using 3D authoring tools - Some animatíon support - HW acceleration Iikely to be through OpenGL User Interface Development- “Flash Lite vs. javaME". Bologna 29-01«2007 - httpz/ lvlivit-z, jrndf. org
  21. 21. JSR 184 - Mobile 3-0 Graphics API ÜMDF - Description: - Provide an efficient 3D Graphics API suitable for theJ2ME platform, in particular CLDC/ MIDP - Key Features: - Scene graph API (high-level) - Immediate API (low-level, subset of OpenGL) - Importer functions for textures, meshes, animations, and scene hierarchies - Tight integration with MIDP User Interface Development- “Flash Lite vs. javaME". Bologna 29-01-2007 - http: Hwv¡tv, jrndf. org
  22. 22. ~ Dependendes: - CLDC 1.1 (requires floating point support) i Resources: - http: //developer. sonyericsson. com/ site/ gIobal/ newsande vents/ campaigns/ java_3d/ p_java3d. jsp Lp. .. . r-`-J~«Jr T 'n f. .. . . . ,J. _.! J. »I . J . . . J . „ VJ . ..J _, _¡„-~>`£'; -'¡-. .'-Ö g; ”Š Lip, LJ-. .J . „ 4 . u „ a- . _ „ l, l: , - . '._› 97 -a „- ~J_¡ , 41, i_. ¡. J . I__¡_ . , ~` _j, _,__i_ _ l- i. .. I . I ' „g _. <_. -__" f„"". ` Ä -ų 5.. -31! ' S, -„ - 1 “x _ "* ,2} : -~ ' : _`} *'. -r “SA ' L „äia f' * 't-Š“ -. ' ` - : v f : š _ r* sß-“f” "_›__ _. The leading technical resource „ b for Mobile Java JD development › ` ' ›. .„_ * i, -i v*viL-„. n„›i„i. „›. .¡. , ' J , n ~ 4 ~ . i 'I I . . L`-i . Kulli Il ~l ;
  23. 23. Scalable Vector Graphics ÜMDF - W3C recommendation on vector graphics - Scalable - Animated - Interactive - Lossless - Compact User Interface Development- “Fíash Lite vs. javaME". Bologna 29-01-2007 - http: Liivi/ viiv. jmdforg
  24. 24. *MDF - SVG provides functionality handsets need - JSR 226 brings scalability to Java ME apps - JSR 226 allows creation of programmable, dynamic SVG content - User interaction - Real time network data (traffic, weather) - Location-based information - JSR 226 unleashes the power ofjava and SVG User Interface Development- “Flash Lite vs. javaME". Bologna 29-01«2007 - httpz/ livvii-z, jindf. org
  25. 25. - Increasing demand for mobile multimedia (vector graphics) applications r Mobile devices are diverse »äge- C). - Different screen sizes " i l“ s-wa - Want to avoid re-authoring content y : f l r Use cases ~ Map visualization i - Rich animations i: í T - Simple UI applications V. Š . . „ - Enterprise applications a-' l l' I
  26. 26. Simple SVG Application - 1 ÜMDF import javax. microedition.1cdui. Canvas; import javax. m1croed1tion.1cdui. Graphics; import javax. microedition. m2g. *; class Naphpplication extends Canvas { private Scalablelmage myuap; private Scalab1oGraphics gc; public Mapnpplication(lnputstroam stroam) { myuap = Sca1ab1oImago. croatoImago(stroam, null); gc = Scalab1oGraphics. croatoInstanco(); i public void paint(Graphics g) { gc. bindTarget(g); // Bind Target gc. render(0, O, myMap); // Bender SVG docuent gc. rolaasaTargat(); // Raloaao target User Interface Development- “Flash Lite vs. javaME". Bologna 29-01-2007 - http: nlwviuv. jmdforg
  27. 27. Simple SVG Application - 2 ÜMDF / / Create ompty SVG Image, got root <svg> Element SVGImaga mylmaga = SVGImaga. craataEmptyImago(); Document mynoc = myImage. getDocument(); SVGSVGElemant root = (SVGSVGE1ament) myDoc. getDocuentE1ement(); / / Create new SVGElaent SVGElement mykect = myDoc. createEleentNS(SVGNS, "rect"); / / Set attributes and properties myRect. setId("button"); myRect. sotFloatTrait("x", 30.0f); myRect. setF1oatTrait("y", 50.0f); // Also width, height SVGRGBCo1or mycolor = root. createSVGRGBCo1or(100, O, 0); mykect. setRGBCo1orTrait("fill", mycolor); / / Append to document root. appendChi1d(myRect); User Interface Development- “Flash Lite vs. javaME". Bologna 29-01-2007 - http: /.'vvvii~¡, jnidf. org
  28. 28. *JMDF - Netbeans: http: //www. netbeans. org - Sony-Ericsson 3D: http: //developer. sonyericsson. com/ site/ globaI/ newsandevents/ campai gns/ java_3d/ p_java3d. jsp - JSR 184: http: //jcp. org/ en/ jsr/ detail? id=184 - JSR 226: http: //jcp. org/ en/ jsr/ detaiI? id=226 User Interface Development- “Flash Lite vs. javaME". Bologna 29-01-2007 - http: nlwviuv. jmdforg
  29. 29. žJMDF Java ME User Interface Development User Interface Development- “Flash Lite vs. javaME". Bologna 29-01«2007 - http: //ivvii-¡, jmdf. org
  30. 30. Speaker ÜMDF Edoardo Schepis Java ME Tech Lead at Funambol JMDF Founder email: edoardo. schepis@funambol. com weblog: httpz/ Iwwwedschepisnet Java Mobile Developers Forum: httpz/ Iwwwjmdtorg FLJNAfVlBÜL User Interface Development - “Flash Llte vs. javaME", Bologna 29-01-2007 - http: Hwv¡uv, jrndf. org

×