Difference between revisions of "DSDP/MTJ/Discussion/Refactoring/api"

From Eclipsepedia

< DSDP‎ | MTJ‎ | Discussion‎ | Refactoring
Jump to: navigation, search
(New API structure)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
     org.eclipse.mtj.core
+
== New API structure ==
         + build [ all classes and interfaces related to build tasks ]
+
 
 +
* After analyzing the current API, it was found that most of classes that are public are not necessary and can be moved to the internal api package.
 +
* Some refactory should be done to remove MIDP methods and attributes from the more common interfaces, for example IDevice, and make them more generic,
 +
 
 +
 
 +
     '''org.eclipse.mtj.core'''
 +
         + build <font color="#960018"><b>[ all classes and interfaces related to build tasks ]</b></font>
 
             + preverification
 
             + preverification
 
                 + MIDP
 
                 + MIDP
Line 7: Line 13:
 
                     - StandardPreverifier
 
                     - StandardPreverifier
 
                 - IPreverifier
 
                 - IPreverifier
            + preprocessing
+
                + preprocessing
                - ISymbolDefinitionSetChangeListener
+
                    - ISymbolDefinitionSetChangeListener
                - SymbolDefinition
+
                    - SymbolDefinition
                - SymbolDefinitionSet
+
                    - SymbolDefinitionSet
                - SymbolDefinitionSetRegistry
+
                    - SymbolDefinitionSetRegistry
            + sign
+
                + sign
                + MIDP
+
                    + MIDP
                    - midp especific classes and interfaces
+
                        - <font color="#960018"><b>midp especific classes and interfaces</b></font>
                - ISignatureProperties
+
                    - ISignatureProperties
                - SignaturePasswords
+
                    - SignaturePasswords
                - SignatureProperties
+
                    - SignatureProperties
            + deploy
+
                + deploy
            - IBuildConsoleProxy
+
                - IBuildConsoleProxy
            - BuildConsoleProxy
+
                - BuildConsoleProxy
            - MTJBuilder
+
                - MTJBuilder
         + persistence [classes managing persistence]
+
         + persistence <font color="#960018"><b>[classes managing persistence]</b></font>
            - IPersistable
+
            - IPersistable
            - IBundleReferencePersistable
+
            - IBundleReferencePersistable
            - IPersistenceProvider
+
            - IPersistenceProvider
            - PersistableUtilities
+
            - PersistableUtilities
            - PersistenceException
+
            - PersistenceException
         + project [ all classes and interfaces related to a MTJ project ]
+
         + project <font color="#960018"><b>[ all classes and interfaces related to a MTJ project ]</b></font>
 
             + MIDP
 
             + MIDP
 
                 - IMidletSuiteProject
 
                 - IMidletSuiteProject
Line 40: Line 46:
 
             + device
 
             + device
 
                 + MIDP
 
                 + MIDP
                     - IMIDPDevice [ Extend IDevice and add MIDP specific aspecs ]
+
                     - IMIDPDevice <font color="#960018"><b>[ Extend IDevice and add MIDP specific aspects ]</b></font>
 
                     - ILaunchConstants
 
                     - ILaunchConstants
 
                     - LaunchEnvironment
 
                     - LaunchEnvironment
                 - IDevice [ Create a basic device spec, with out the MIDP aspects]
+
                 - IDevice <font color="#960018"><b>[ Create a basic device spec, with out the MIDP aspects ]</b></font>
 
                 - IDeviceImporter
 
                 - IDeviceImporter
 
                 - ILaunchEnvironment
 
                 - ILaunchEnvironment
 +
            - ISDK <font color="#960018"><b>[ Some information available in each device are replicated and refers to the sdk info]
 +
                    [ this informations could be added to a SDK class that would aggregate all devices ]</b></font>
 
         - IBaseModel
 
         - IBaseModel
 
         - IEditable
 
         - IEditable
Line 56: Line 64:
 
         - IResourceFilter
 
         - IResourceFilter
 
         - IWritable
 
         - IWritable
         - JavaMECore - follow the same concept as JDT, and externalize some aspects by this facade, instead of so many classes
+
         - MTJCore  <font color="#960018"><b>[ follow the same concept as JDT, and externalize some aspects by this facade, instead of so many classes ]
                      For example, check if a certain nature is available.
+
                  [ For example, check if a certain nature is available.]</b></font>
   
+
       
     org.eclipse.mtj.toolkit.uei [ No API needed could turn it into internal ]
+
     '''org.eclipse.mtj.toolkit.uei''' <font color="#960018"><b>[ No API needed could turn it into internal ]</b></font>
   
+
 
     org.eclipse.mtj.core.library
+
     '''org.eclipse.mtj.core.library''' <font color="#960018"><b>[ Implementations can be moved to internal, they are not necessary to be public ]
        + security
+
                [ only models need to be public but must use API Restrictions such as @noimplement ]</b></font>
            Permission
+
        + security
            PermissionList
+
            Permission
            SecurityInfo
+
            PermissionList
        - MidletLibrary
+
            SecurityInfo
        - ProtectionDomain
+
        - MidletLibrary
        - ILibrary
+
        - ProtectionDomain
        - Visibility
+
        - ILibrary
   
+
        - Visibility
     org.eclipse.mtj.ui
+
 
        + editors
+
     '''org.eclipse.mtj.ui''' <font color="#960018"><b>[ Most of packages are not really an API, can be moved to internal ]</b></font>
            + device
+
        + editors
            + jad
+
            + device <font color="#960018"><b>[ required by implementors of device importer E.P ]</b></font>
 +
            + jad <font color="#960018"><b>  [ required by implementors of jad vendor specific  E.P ]</b></font>
 +
 
 +
== Other Options, Opinions, etc ==
 +
 
 +
<font color="#960018"><center><b>[ Please, contribute with this discussion ]</b></center></font>
 +
 
 +
* [Craig] I'm fine with reducing the visibility of any class that we can "get away" with to avoid usage where we don't want it.  It is far easier to add access later than to remove it.
 +
* [Craig] I agree with the idea of splitting the MIDP-specifics out in the model.  I think that makes a lot of sense.
 +
* [Craig] I think we might still want to mark some of these classes that are public as provisional until we get more feedback from other vendors.
 +
* [Craig] ProjectConvertionException should be ProjectConversionException

Latest revision as of 16:08, 2 February 2009

[edit] New API structure

  • After analyzing the current API, it was found that most of classes that are public are not necessary and can be moved to the internal api package.
  • Some refactory should be done to remove MIDP methods and attributes from the more common interfaces, for example IDevice, and make them more generic,


   org.eclipse.mtj.core
       + build [ all classes and interfaces related to build tasks ]
           + preverification
               + MIDP
                   - StandardPreverifierFactory
                   - StandardPreverifierParameters
                   - StandardPreverifier
               - IPreverifier
               + preprocessing
                   - ISymbolDefinitionSetChangeListener
                   - SymbolDefinition
                   - SymbolDefinitionSet
                   - SymbolDefinitionSetRegistry
               + sign
                   + MIDP
                       - midp especific classes and interfaces
                   - ISignatureProperties
                   - SignaturePasswords
                   - SignatureProperties
               + deploy
               - IBuildConsoleProxy
               - BuildConsoleProxy
               - MTJBuilder
       + persistence [classes managing persistence]
            - IPersistable
            - IBundleReferencePersistable
            - IPersistenceProvider
            - PersistableUtilities
            - PersistenceException
       + project [ all classes and interfaces related to a MTJ project ]
           + MIDP
               - IMidletSuiteProject
               - IMidletSuiteProjectListener
               - MidletSuiteFactory
           - IMTJNature
           - MTJProjectConverter
           - MetaData
           - ProjectConvertionException
       + sdk
           + device
               + MIDP
                   - IMIDPDevice [ Extend IDevice and add MIDP specific aspects ]
                   - ILaunchConstants
                   - LaunchEnvironment
               - IDevice [ Create a basic device spec, with out the MIDP aspects ]
               - IDeviceImporter
               - ILaunchEnvironment
           - ISDK [ Some information available in each device are replicated and refers to the sdk info]
                   [ this informations could be added to a SDK class that would aggregate all devices ]
       - IBaseModel
       - IEditable
       - IModel
       - IModelChangedEvent
       - IModelChangeProvider
       - IModelProvider
       - IModelProviderEvent
       - IModelProviderListener
       - IResourceFilter
       - IWritable
       - MTJCore  [ follow the same concept as JDT, and externalize some aspects by this facade, instead of so many classes ]
                  [ For example, check if a certain nature is available.]
       
   org.eclipse.mtj.toolkit.uei [ No API needed could turn it into internal ]
   org.eclipse.mtj.core.library [ Implementations can be moved to internal, they are not necessary to be public ]
                [ only models need to be public but must use API Restrictions such as @noimplement ]
        + security
            Permission
            PermissionList
            SecurityInfo
        - MidletLibrary
        - ProtectionDomain
        - ILibrary
        - Visibility
   org.eclipse.mtj.ui [ Most of packages are not really an API, can be moved to internal ]
        + editors
            + device [ required by implementors of device importer E.P ]
            + jad    [ required by implementors of jad vendor specific  E.P ]

[edit] Other Options, Opinions, etc

[ Please, contribute with this discussion ]
  • [Craig] I'm fine with reducing the visibility of any class that we can "get away" with to avoid usage where we don't want it. It is far easier to add access later than to remove it.
  • [Craig] I agree with the idea of splitting the MIDP-specifics out in the model. I think that makes a lot of sense.
  • [Craig] I think we might still want to mark some of these classes that are public as provisional until we get more feedback from other vendors.
  • [Craig] ProjectConvertionException should be ProjectConversionException