100 likes | 232 Views
Extending Instant JChem 2.0 Architecture & API. Petr Hamernik. June , 200 7. Architecture goals. Rich client with modern user interface Extensible to multi-tier architecture Data definition/manipulation abstract layer Reuse proven and stable software components
E N D
Extending Instant JChem 2.0Architecture & API Petr Hamernik June, 2007
Architecture goals • Rich client with modern user interface • Extensible to multi-tier architecture • Data definition/manipulation abstract layer • Reuse proven and stable software components • Componentized and extensible design • Tidy and clear Application programming interface (API)
NetBeans Platform – key features • User interface management • Data and presentation management • Graphical editing • Wizards • Settings management • Internet-based update delivery • Utilities • Lot's of various plug-ins
IJC Architecture overview • IJC is implemented as set of plugins into NetBeans platform • IJC consists of: • DIF • IJC Core • Other plugins: • Form designer • Grid view • UI Widgets
Discovery Informatics Framework (DIF) • Abstract non-visual layer on top of data sources • Provides data model and its persistence • Independent on most of NetBeans • The basic functionality/API: • Data definition operations • Data manipulation operations • Common utilities and support classes • Security • Extensive usage of JavaBeans patterns
Instant JChem Core (IJC Core) • IJC Core = User interface framework and its basic implementations • Three levels of visualization: • 1. View windows definition (gridview, formview) • 2. Widgets definition • 3. Renderers definition • Definition of contracts between the levels • Persistence support • Basic context descriptions objects (in NetBeans known as Cookies) • Implementations of basic context sensitive actions based on Cookies • The basic wizards implementation
Other extensions included in IJC 2.0 • Gridview • Form designer • The basic widgets – table, molecule pane, text field, date field • The basic renderers – numeric, text, structure • Chemistry tools extensions • more is coming...
IJC Key extension points • Field types • URL resource field, range field, … • Including new operators for search • Data convertors • Table entity types • Visualization widgets usable in form designer • Graph widgets • Renderers (standalone widget vs. table column) • Context sensitive actions (active table, column, row, widget, ...) • Data processing, Chemistry tools
Widget/Renderer example • To add a new renderer you need to write: • Renderer class (IJCWidgetRenderer, IJCWidgetTextRenderer, TableCellRenderer) • Renderer's beaninfo to publish appropriate properties • Renderer factory class (RendererFactory) • Register the factory into xml configuration file • To add a whole new widget you need to write: • Widget class (AbstractSingleFieldWidget / IJCWidget.DesignerHandle) • Widget factory class (IJCWidgetFactory) • Provide icons • Register the factory into xml configuration file
Resources • IJC 2.0 Developers docs, including API javadocs and examples: • http://www.chemaxon.com/instantjchem/ijc_2_0/docs/developer/api/index.html • API stability levels based on packages or classes • API is still under development, please consult us first • NetBeans APIs: • http://platform.netbeans.org/tutorials/index.html • http://www.netbeans.org/download/dev/javadoc/