Last modified 16 years ago
Last modified on 04/14/09 12:18:07
Analysis
Overview
The goal of this task is to decompose and restructure currently available plugins. All of this is important for modularizing the project and working easily with the modules we have(later enabling/disabling them) and the new ones that will come(their naming, extensions and module classes).
Task requirements
- The modules which provides too many different functional things should be decomposed.
- Some of the modules should be restructured so that they represent:
- core library
- base library
- well-defined functionality
- implementation of the base library
- Some of the modules should be renamed. Create convention in the design section so the next newly created modules should be named using it. (i.e. there can't be module named x.y if there is already a module with name x.y.z)
- There should be separation between modules used in author edition and modules for the reader edition. This is connected with GROUP_READER_R0.
- Create new modules for text, reader, resources(main.func.resources). Consider what more has to be separated in a new module in the design.
- Preview org.sophie2.proto.project and make it more comfortable for using.
- Preview pom.xml, remove the dependencies which are not needed (they are shown as warnings when building with maven) and add more brief descriptions of the modules.
- If there is time left update PLUGIN_MODULE_STRUCTURE page.
Task result
- Descomposed, restructured, renamed and new modules.
- Created distribution with assembly plugin.
- updated wiki page
Implementation idea
- One part of the convention is that there couldn't be module with name x.y if there is already module named x.y.z.
- Functional modules should be separated to [modulename].viewer and [modulename].editor
- There should be new org.sophie2.main.app module which will contain classes for the whole application(for example left and right flap, main window, app view, etc)
Related
PLUGIN_MODULE_STRUCTURE
PLUGIN_EDITIONS_STRUCTURE
PLUGIN_DECOMPOSITION_R2
How to demo
Show the new module decomposition and the new convention for naming the modules.
Design
- The naming convention(or the rules - there can show some exceptions so convention may be is not the right word):
- It is recommended not to have module with name x.y if there is already module named x.y.z.
- Modules for the reader ends with .viewer and for the author - with .editor. (i.e. org.sophie2.extra.pdf.editor, org.sophie2.extra.pdf.viewer, etc..)
- When you write module which provides specific functionality you have to add .func before its name.(For example org.sophie2.main.func.file, org.sophie2.main.func.config - functional modules are always with org.sophie2.main prefix)
- If you want to write a module which is not concrete implementation of base library or concrete functionality(and is not core logic or base library), name it with org.sophie2.main. prefix before the module name. You can name an engine implementation using this rule(i.e org.sophie2.main.scene.vldocking).
- Add .commons and .util suffices when needed so the first rule is respected.
- Note: write in comments section for more ideas about naming convention.
- Remove:
- org.sophie2.main module
- org.sophie2.messy module
- Rename:
- view.halos/layout/menus to app.halos/layout/menus
- org.sophie2.main.view to org.sophie2.main.app.commons and remove the Main class there
- org.sophie2.extra modules to org.sophie2.extra.func
- org.sophie2.base to org.sophie2.base.commons
- org.sophie2.main.media to org.sophie2.main.func.media
- org.sophie2.main.model to org.sophie2.main.app.model
- org.sophie2.main.model.book.format.r1/r2 to org.sophie2.main.persistence.r1/r2
- Create:
- org.sophie2.reader module with FakeReaderMain and with reader.bundles.config file
- org.sophie2.main.func.resources and move resource manipulation and view classes there
- org.sophie2.main.model.text with text model.
- org.sophie2.main.func.image with image functionality.
- new legacy package in main.app, main.model, with legacy views and logic.
- org.sophie2.core.prolib
- org.sophie2.core.testing
- org.sophie2.main.app.dialogs and move the dialogs from main.app.view and main.func.file there
- org.sophie2.main.func.hottext
- org.sophie2.main.app.reader - provides the sophie reader functionality
- org.sophie2.main.app.author
- Move:
- BookExtra in main.app module
- mvc.logic in core.mvc under legacy package
- org.sophie2.main.dialogs.input to org.sophie2.main.app.dialogs
- Run mvn clean install command, see the unused dependencies and remove them.
- Write more brief descriptions of the modules(optional).
- Update PLUGIN_MODULE_STRUCTURE diagrams(optional).
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.)