wiki:PLATFORM_DEPLOY_APPLET_R0

Version 16 (modified by tsachev, 16 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=PLATFORM_DEPLOY_APPLET_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

The applet allows reading a book in a browser

  • The applet only runs reader application
  • The applet may be deployed not only on Sophie Server
  • The applet gets as parameters the book path and size

Task requirements

  • Choose which modules are sensible for the applet and load only them
  • Optional requirements
    • Identify the user OS and download natives only for it
    • Identify which of the modules are needed for the chosen book and load only them
    • Make applet deployment automatic with building
  • Write documentation how to deploy applet
  • The applet must be without menus

Task result

  • Code

Implementation idea

  • The applet may have capability for fullscreen (F11 and Esc)
  • The user should be able to copy text from Sophie book.
  • The user should be able to paste text in the search field of the applet or in comment frame.
  • The following functionalities in reader will not be needed in the applet:
    • Menus
    • Drag and drop (but copy will be)
    • All edit operations (excluding copy)
    • Help contents
    • Halos
    • Annotations
  • The following tabs are in Reader, but will not be needed in the applet
    • Config

How to demo

  • Deploy the applet with a sample book in sophie2.org/applet
  • Open the page and show the book in the browser

Design

Open Book on startup

  • The applet will open a specified book provided as applet parameter named 'bookRef' that will contain a valid absolute url to the book.
  • The launcher (AppletMain) will set it as system property 'sophie2.startupBookLocation'
  • The Reader module will check for the system property and if supplied will try to fetch the given url in a temp file created like
    File.createTempFile("startupBook", PersistenceUtil.EXTENSION);
    

and then open it using file.

Deploy applet

  • The applet (launcher and modules) will be deployed on a single place at sophie2.org server the complete url now is
    http://sophie2.org/sophie2-reader-applet/
    
  • On that location will be the org.sophie2.launcher-2.0.jar which contains the launcher and a folder modules which contains all needed modules.
  • To launch the applet in an html page the following snippet is needed
    <applet width="500" height="500" name="sophie2-applet"
            codebase="http://sophie2.org/sophie2-reader-applet/"
            code="org.sophie2.launcher.AppletMain"
            archive="org.sophie2.launcher-2.0.jar">
            <param name="edition" value="reader" />
            <param name="bundlesConfigFile" value="applet.bundles.config" />
            <param name="bookRef"
                    value="absolute_url_to_the_book" />
    </applet>
    
    • edition is the sophie edition to be launched - must be reader
    • bundlesConfigFile is the file which contains modules configuration. applet.bundles.config must be what you need in most cases.
    • bookRef is the absolute ref to the book to be opened.

Implementation

(Describe and link the implementation results here (from the wiki or the repository).)

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)