ICEmobile
  1. ICEmobile
  2. MOBI-134

Refactor Blackberry Container for ease of reuse

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 Beta
    • Fix Version/s: 1.0 Beta
    • Component/s: None
    • Labels:
      None
    • Environment:
      Blackberry Container

      Description

      In porting the code from the container project into one for debugging MOBI-128, I found the codebase contained numerous references to ICEmobileContainer. Some of these references were to publicly exposed methods on the main class that provided functions necessary to interact with the Document, and some were convenience Logging methods, since Blackberry logging calls makes for poor looking code.

      It would be better if the publicly exposed methods were defined in an interface so that people doing this type of work in their projects don't have to rename everything, as well as being used as a measure for how appropriate the names and features exposed actually are. Also, I moved all the logging convenience methods into a Static Logger class.

      There remain a few very rare variables tied to ICEmobileContainer.java, which relate to the HOME_URL, etc, which we wanted to have visible at the top of the main class. ICEmobileContainer implements the ContainerController interface, and passes itself into the constructor of all the scripts and menus that use the methods. Anyone wishing to redo the Container main application entry point now only has to implement the methods of the interface (or copy them) and the script and menu classes wont have to be changed everywhere.

        Activity

        Greg Dick created issue -
        Greg Dick made changes -
        Field Original Value New Value
        Assignee Steve Maryka [ steve.maryka ] Greg Dick [ greg.dick ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26780 Thu Dec 08 11:21:21 MST 2011 greg.dick MOBI-134 Refactoring and cleanup for final
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/http/HttpRequestHandler.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/http/CountingOutputStream.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26781 Thu Dec 08 11:21:33 MST 2011 greg.dick MOBI-134 Refactoring and cleanup for final
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/menu/ResetPushMenuItem.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/menu/ReloadHomeMenuItem.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/menu/BackMenuItem.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/menu/HistorySubMenuItem.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/menu/URLEntryMenu.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/menu/ReloadCurrentMenuItem.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26782 Thu Dec 08 11:22:08 MST 2011 greg.dick MOBI-134 Refactoring and cleanup for final
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/options/BlackberryOptionsProperties.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/options/BlackberryOptionsProvider.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26783 Thu Dec 08 11:22:32 MST 2011 greg.dick MOBI-134 Refactoring and cleanup for final
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/scan/QRCodeScanner.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/upload/AjaxUpload.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/camera/WidgetCameraController.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/upload/ScriptResultReader.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/camera/VideoController.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/test/ScriptableTest.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/audio/AudioRecorder.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/debug/JavascriptDebugger.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26784 Thu Dec 08 11:23:18 MST 2011 greg.dick MOBI-134 Refactoring and cleanup for final
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/blackberry-interface.js
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/utils/HistoryManager.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/ICEmobileContainer.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/utils/ImageManipulator.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/utils/FileUtils.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/ApplicationScreen.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/utils/UploadUtilities.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/FieldErrorHandler.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/EulaManager.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26787 Thu Dec 08 11:33:57 MST 2011 greg.dick MOBI-134 Changed label for options entry appearance for final GA application
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/options/BlackberryOptionsProvider.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26791 Thu Dec 08 14:13:33 MST 2011 greg.dick MOBI-134 Changes for recreating camera objects each time the camera is invoked
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/blackberry/container/src/org/icemobile/client/blackberry/script/camera/WidgetCameraController.java
        Hide
        Greg Dick added a comment -

        Finished. I introduced a ContainerController interface which defines the methods that are supported by the ICEmobileContainer class. References to the publicly available methods of this interface now can be ported to a new impl without any recoding. I also introduced a static Logger convenience class which allows removing those references to the container from all code wishing to log messages.

        Show
        Greg Dick added a comment - Finished. I introduced a ContainerController interface which defines the methods that are supported by the ICEmobileContainer class. References to the publicly available methods of this interface now can be ported to a new impl without any recoding. I also introduced a static Logger convenience class which allows removing those references to the container from all code wishing to log messages.
        Greg Dick made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Greg Dick made changes -
        Fix Version/s 1.0 Beta [ 10290 ]
        Migration made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Greg Dick
            Reporter:
            Greg Dick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: