So it is time to start the debate on a DB API for JavaFX. Lets say hypothetically a DB API was to be designed for JavaFX. This DB API would have the following design considerations:
- Provide a consistent API that can provide basic features across all hardware platforms (desktop, mobile, TV)
- Allows advanced DB features to be accessed by desktop JavaFX applications only
- Minimises its footprint and provides as many features as possible, without using too many resources on mobile devices
- Allows seamless conversion between JavaFX Script and DB data types
- Provides reasonably good performance (including on mobile devices)
- Can easily allow syncronisation of data between the JavaFX application and the database in very few steps
- Provides the cabability of querying the DB for internal information without requiring the JavaFX developer to describe the DB structure beforehand
Database API Advantages
- Can use a database with a CLDC profile device (mobile JavaFX uses CLDC as the base)
- Can easily use all JavaFX Script and JavaFX features (eg binding, triggers, functional programming)
- Provides an opportunity for JavaFX to gain a major advantage over its RIA rivals
- Can take advantage of Oracle's excellent DB design expertise (when the acquisition of Sun goes through)
- A single DB API that can be used across all hardware platforms (desktop, mobile, TV)
- Able to populate JavaFX controls (both visual and non visual) quickly and easily with very few steps
- Seamless conversion between DB and JavaFX Script data types
- Reasonably good performance with JavaFX having direct access to the DB
Database API Disadvantages
- Will require JavaFX developers to learn a completely new API
- Generics and reflection will not be available to incorporate into the design of the DB API
- DB API will require existing DBs to supply new drivers
- A new DB may need to be created from the ground up to work accross all hardware platforms (incl with CLDC profile devices)
- May require existing DBs to adjust their design/implementation in order to be compatible with the DB API
- Very challenging to design and implement an effective DB API (may take at least a year before it is ready for production use?)
Now the "should there be a DB API for JavaFX" could very well become one of the biggest JavaFX debates of the year. Currently the DB API for JavaFX should not be considered a high priority at the moment, since JavaFX is mainly aimed at creating graphical applications. Therefore stuff like 3D support is a much higher priority for inclusion in JavaFX.
I intend to make it very clear that I am not a member of the Sun JavaFX team. What I have mentioned above is my own opinions and in no way reflects the opinions of the Sun JavaFX team.
Hi,
ReplyDeleteWhy not jdbc?
Best regards, Eugene.
Hi,
ReplyDeleteWhats about JavaFX Storage API?