Your SlideShare is downloading. ×
0
Multi-Configuration Support for MTJ (Mobile Tools for Java)  Feng (Marvin) Wang Gang (Allen) Ma Gustavo de Paula
Agenda <ul><li>DSDP MTJ Overview </li></ul><ul><li>Device Fragmentation Problem </li></ul><ul><li>Possible Solutions </li>...
DSDP MTJ Overview <ul><li>Glue between the Eclipse IDE and the JavaME SDKs (emulators) </li></ul><ul><li>MTJ does NOT prov...
Device Fragmentation Problem 1 Billion JavaME Devices Hardware Software Carrier <ul><li>Display size, color </li></ul><ul>...
Possible Solutions <ul><li>Standardize everything </li></ul><ul><li>Almost  impossible  to happen </li></ul><ul><li>Everyo...
MTJ Approach:  Live with the Problem and Adapt <ul><li>Antenna  preprocessor </li></ul>MTJ Java Code Preprocessor Multi-Co...
Antenna Preprocessor <ul><li>Antenna is a open source project created on 2002 ( http:// antenna.sourceforge.net / ) </li><...
Multi-Configuration   Concepts: Devices <ul><li>The DeviceImporter knows how to “ talk ” to one SDK </li></ul><ul><ul><li>...
<ul><li>A  Symbol  is a pair <name; value> </li></ul><ul><li>Symbols are organized in  SymbolSets </li></ul><ul><li>Each S...
<ul><li>A MTJ project has a list of MTJRuntimes </li></ul><ul><ul><li>Each project has a current  active Runtime </li></ul...
Multi-Configuration   Use Cases: Manage Configurations <ul><li>Create Project Wizard </li></ul><ul><ul><li>Add, Remove, Ed...
Multi-Configuration   Use Cases: New/Edit Configuration <ul><li>Select SDK/Device associated to this configuration </li></...
Multi-Configuration   Use Cases: Switch Configuration <ul><li>Switch active configuration or manage current configurations...
Multi-Configuration   Use Cases: Build Project <ul><li>All configurations are build on the same time </li></ul><ul><li>Exp...
Content Assist   Preprocess <ul><li>Help user to input preprocess code in Java Editor </li></ul><ul><li>Preprocess code fo...
<ul><li>All available  directives  are presented </li></ul><ul><li>Brief  description  of each directive </li></ul>Content...
<ul><li>All symbols provided by all  configurations registered  on the project are presented </li></ul><ul><li>Each symbol...
<ul><li>Propose preprocess template for the user. </li></ul>Content Assist   Templates After apply:
<ul><li>Manage current templates </li></ul><ul><ul><li>Create new templates </li></ul></ul><ul><ul><li>Edit current templa...
Demo & Thanks! DSDP MTJ Web site:  www.eclipse.org/dsdp/mtj DSDP MTJ Wiki:  http:// wiki.eclipse.org /DSDP/MTJ Newsgroup: ...
Wish list… <ul><li>Preprocess Resources </li></ul><ul><li>Preprocess full java files </li></ul><ul><li>Preprocess JAD file...
Upcoming SlideShare
Loading in...5
×

Multi-Configuration support in MTJ

692

Published on

EclipseCon 2009 presentation

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
692
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Hello everyone, I am Wang Feng from Sybase. I will talk about the multi-configuration support for MTJ – the Mobile Tools for Java.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Transcript of "Multi-Configuration support in MTJ"

    1. 1. Multi-Configuration Support for MTJ (Mobile Tools for Java) Feng (Marvin) Wang Gang (Allen) Ma Gustavo de Paula
    2. 2. Agenda <ul><li>DSDP MTJ Overview </li></ul><ul><li>Device Fragmentation Problem </li></ul><ul><li>Possible Solutions </li></ul><ul><li>Java preprocessing </li></ul><ul><li>Multi-Configuration Concepts & Use cases </li></ul><ul><li>Code assist </li></ul><ul><li>Demo </li></ul>
    3. 3. DSDP MTJ Overview <ul><li>Glue between the Eclipse IDE and the JavaME SDKs (emulators) </li></ul><ul><li>MTJ does NOT provide the SDKs </li></ul><ul><li>Each vendor provides their own SDKs </li></ul><ul><li>MTJ provide the basic developer workflow </li></ul><ul><ul><li>Import JavaME SDK (each SDK has several devices associated to it) </li></ul></ul><ul><ul><li>Create MIDlet Suite Project </li></ul></ul><ul><ul><li>Build Project </li></ul></ul><ul><ul><li>Create Deployment Package </li></ul></ul>Eclipse Platform JDT MTJ SDK Extens. Vendor A JavaME SDK Vendor B JavaME SDK Vendor C JavaME SDK UEI Vendor Proprietary Protocol UEI
    4. 4. Device Fragmentation Problem 1 Billion JavaME Devices Hardware Software Carrier <ul><li>Display size, color </li></ul><ul><li>Number of keys </li></ul><ul><li>Accelerometer </li></ul><ul><li>Different APIs </li></ul><ul><li>APIs with optional </li></ul><ul><li>Components </li></ul><ul><li>Proprietary APIs </li></ul><ul><li>File name </li></ul><ul><li>Requirements </li></ul><ul><li>Localization </li></ul><ul><li>MIDlet Requirements </li></ul>Hard to do Professional JavaME Development Fragmentation
    5. 5. Possible Solutions <ul><li>Standardize everything </li></ul><ul><li>Almost impossible to happen </li></ul><ul><li>Everyone wants to be different </li></ul><ul><li>Applications want to use device specific features </li></ul>Live with the problem and adapt <ul><li>Old and good preprocessing </li></ul><ul><li>Not available in standard Java </li></ul><ul><li>There are some external preprocessing solutions </li></ul><ul><li>Device Database </li></ul><ul><li>There are databases on the internet (proprietary and GPL) </li></ul><ul><li>MTJ can import databases </li></ul>
    6. 6. MTJ Approach: Live with the Problem and Adapt <ul><li>Antenna preprocessor </li></ul>MTJ Java Code Preprocessor Multi-Configuration Preprocessor Code Assist <ul><li>Each project can have multiple runtimes </li></ul><ul><li>Each runtime defines preprocessor tags (Symbols) </li></ul><ul><li>Symbols are used on the code assist </li></ul>
    7. 7. Antenna Preprocessor <ul><li>Antenna is a open source project created on 2002 ( http:// antenna.sourceforge.net / ) </li></ul><ul><li>Defines several JavaME build related tools </li></ul><ul><ul><li>Build, Obfuscate, Package, Sign, Deploy and Preprocess </li></ul></ul><ul><li>Preprocessor defines </li></ul><ul><ul><li>Preprocessor language </li></ul></ul><ul><ul><li>Input  java code with preprocessor symbols </li></ul></ul><ul><ul><li>Output  preprocessed java code </li></ul></ul>//#if ScreenWidth>100 && ScreenHeight>120 do something; //#else do something else; //#endif
    8. 8. Multi-Configuration Concepts: Devices <ul><li>The DeviceImporter knows how to “ talk ” to one SDK </li></ul><ul><ul><li>Returns all Devices that one SDK have </li></ul></ul><ul><li>Each device has a DeviceClasspath associated to it </li></ul><ul><ul><li>... and a list of APIs </li></ul></ul><ul><li>Devices are persisted on the DeviceRegistry </li></ul>
    9. 9. <ul><li>A Symbol is a pair <name; value> </li></ul><ul><li>Symbols are organized in SymbolSets </li></ul><ul><li>Each SymbolSet has a name and a list of Symbols </li></ul><ul><li>i.e.: </li></ul><ul><ul><li>Symbols: <screen.width;240>, <screen.height;320> </li></ul></ul><ul><ul><li>Symbol set: <MOTV3; <screen.width;240>, <screen.height;320>> </li></ul></ul><ul><li>SymbolDeviceFactory can import devices database and same them on the workspace </li></ul>Multi-Configuration Concepts: Symbols
    10. 10. <ul><li>A MTJ project has a list of MTJRuntimes </li></ul><ul><ul><li>Each project has a current active Runtime </li></ul></ul><ul><li>Each Runtime has </li></ul><ul><ul><li>A Device </li></ul></ul><ul><ul><li>A project symbol set (created based on the device properties) </li></ul></ul><ul><ul><li>A list of workspace SymbolSets </li></ul></ul>Multi-Configuration Concepts: Runtimes
    11. 11. Multi-Configuration Use Cases: Manage Configurations <ul><li>Create Project Wizard </li></ul><ul><ul><li>Add, Remove, Edit </li></ul></ul><ul><li>Select one to be the active </li></ul>
    12. 12. Multi-Configuration Use Cases: New/Edit Configuration <ul><li>Select SDK/Device associated to this configuration </li></ul><ul><li>SymbolSet associated to chosen Device </li></ul><ul><li>Workspace level SymbolSets (imported from device database) </li></ul>
    13. 13. Multi-Configuration Use Cases: Switch Configuration <ul><li>Switch active configuration or manage current configurations </li></ul>
    14. 14. Multi-Configuration Use Cases: Build Project <ul><li>All configurations are build on the same time </li></ul><ul><li>Export antenna build files to be called externally </li></ul><ul><li>One build for each configuration </li></ul><ul><ul><li>JAR/JAD </li></ul></ul><ul><li>Code is preprocessed </li></ul><ul><li>Build files and symbol files for each configuration </li></ul>
    15. 15. Content Assist Preprocess <ul><li>Help user to input preprocess code in Java Editor </li></ul><ul><li>Preprocess code format </li></ul><ul><ul><li>Directives </li></ul></ul><ul><ul><li>Symbols </li></ul></ul><ul><ul><li>Operators </li></ul></ul><ul><ul><li>Values </li></ul></ul><ul><li>All preprocess code starts is “//#” </li></ul>//#ifdef mmedia //#ifdef nokia //#if s60_ver==&quot;1.0&quot; import com.nokia.mmapi.v1 //#elif s60_ver==&quot;2.0&quot; import com.nokia.mmapi.v2 //#else import com.nokia.mmapi.def //#endif //#else import javax.microedition.mmapi //#endif //#endif
    16. 16. <ul><li>All available directives are presented </li></ul><ul><li>Brief description of each directive </li></ul>Content Assist Directives
    17. 17. <ul><li>All symbols provided by all configurations registered on the project are presented </li></ul><ul><li>Each symbol has </li></ul><ul><ul><li>Name, Value, if active, provider information </li></ul></ul>Content Assist Symbols
    18. 18. <ul><li>Propose preprocess template for the user. </li></ul>Content Assist Templates After apply:
    19. 19. <ul><li>Manage current templates </li></ul><ul><ul><li>Create new templates </li></ul></ul><ul><ul><li>Edit current templates </li></ul></ul>Content Assist Templates
    20. 20. Demo & Thanks! DSDP MTJ Web site: www.eclipse.org/dsdp/mtj DSDP MTJ Wiki: http:// wiki.eclipse.org /DSDP/MTJ Newsgroup: news:// news.eclipse.org/eclipse.dsdp.mtj Developer List: http://dev.eclipse.org/mailman/listinfo/dsdp-mtj-dev
    21. 21. Wish list… <ul><li>Preprocess Resources </li></ul><ul><li>Preprocess full java files </li></ul><ul><li>Preprocess JAD file </li></ul><ul><li>Sign based on configuration </li></ul><ul><li>Improve error handling </li></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×