OpenBaseMovil
Welcome at » OpenBaseMovil – portable J2ME database applications

OpenBaseMovil – portable J2ME database applications

OpenBaseMovil is a free, Open Source platform for developing powerful J2ME business and consumer applications.

OpenBaseMovil is comprised of several libraries.

What is included in OpenBaseMovil:

OpenBaseMovil-core
This library is the first one we have released, as all the rest depend on it. It contains many services: internationalization, task control, serialization, encryption, compression, floating point support, properties files support, an MVC framework, an event framework, files over RecordStores, and more.
OpenBaseMovil-db
This is a database engine that supports hundreds of tables, with even hundreds of thousands of rows per table. It is a relational database engine, with tables, which in turn have fields. This is not an object persistence framework as some that are around there, you don’t have to care about serialization and deserialization of objects, you have a database like MySQL or any other RDBMS. Tables can have multiple indexes on one or more fields, even full-text-like indexes, so finding data is a really simple task. By now, it is not a SQL database nor an ACID system, we might implement that kind of things in the future. But you must not loose focus, we are talking about a cellular phone like a Nokia N70 or a SonyEricsson K610 dealing with many thousands of rows with search times of around 50-100ms for direct search indexes and abut 300-400ms for full-text searches. Phones are more powerful each day, but you can not ask them things like parsing complex SQL queries.
The database engine provides a simple API, very similar to that of JDBC, so you can manage your data easily. There are four main objects that you will deal with: Database, Table, Row and RowSet. You use the Database to hold Tables, and the Tables to create and handle Rows and also to search them. RowSet is, as you have already guessed, a set of Rows for a given search over a Table, and you use it almost as you would use a JDBC ResultSet.
OpenBaseMovil-script
This is one of our latest creations, a scripting engine for JavaME (J2ME). We still consider it release candidate version, but it is very functional and powerful now. Many of our future plans have this engine as their basis, so we have built it with some clear goals:

  • It must be easy to code
  • The language must be very easily extended
  • It must have a core library of tools that must be also easily extensible, so the scripts can interact with any current or future element.
  • It must be very fast

We have called the language simply “bmScript”. It is an object oriented language, with a syntax close to the C family (Java, C#, C++, etc.) but easier. It is compiled to a binary, optimized format, and that can be done at the mobile phone or you can compile the scripts and then send them to the device.
The core library has just some tools by now to be able to create maps (like arrays) and to interact with the basic system utilities (the console and so on). But, the database engine has some classes that when plugged into the engine let you access the database, just like you could do with Java. The same applies to the ui libraries.
This is the next library that we will upload to SourceForge, along with the proper documentation and examples.

OpenBaseMovil-storage
The storage library is a pluggable library used by the database. It acts as a proxy to the underlying storage mechanism, currently the only one available: RecordStores. It also provides useful services on top of that to improve performance and ease of use.
Some devices do not impose limits on RecordStore sizes, some others do. Most of them have bugs, some very important, others not so. This pluggable library is designed to overcome that kind of things, releasing the database engine of that burden.
OpenBaseMovil-ui
After years of dealing with the user interface, we’ve come to some important conclusions:

  1. The MIDP interface has some advantages, but also many shortcomings, many bugs and many differences between devices. It’s a nightmare to deal with them all. At some points, the specification is too loose, and each manufacturer decides how to do it. And the bugs, the nasty bugs. For example, the latests Nokia phones with Symbian 3rd edition get hanged very often with forms with edit boxes. And they might fix it, but the truth is that they probably won’t. The reason is very simple: J2ME is targeted to games, so their effort in the “text” interface is clearly smaller.
  2. As it comes from the first point, the graphical interface is much more powerful and less error prone.

And since we want a consistent interface through different models, simple to design, database aware, and user friendly we built the ui library.
This library lets you define your application views with a simple xml file, and has a lot of powerful different views: grid menus, list menus, forms and list browsers. For example, with a list browser you just give it a name, the fields you want to be displayed, and then you bind it to a RowSet and it shows the user a graphical list that shows information about the number or rows, the current one, and shows a single line for unselected rows and a extended view of the selected one. It handles all of the database navigation and data fetching for you.
We plan to evolve this library into a window toolkit, so the interface can became fully consistent. One of the drivers is the bug mentioned on the Symbian 3rd platform, but it imposes some challenges: dealing with user input in text fields is not easy and has it’s drawbacks. For now, the forms are built with the standard MIDP forms, but enhanced with data binding and zero-code design.

Helper tools: resource packing and checking, view compiling, and others.
These tools are simple helper tools in the development process. For example, the resource packer takes your resource files (properties files) and checks that all resources are defined in all files (no missing resources in any language). It also packs many bundles (each library has it’s own set) into a single bundle, which is easier to handle from an application.
BlogLines del.icio.us Digg Facebook Google Google Reader Yahoo! MyWeb Newsgator Newsvine reddit SlashDot StumbleUpon Technorati

7 Responses

  1. Nik




    Hi.
    Sorry i dont understand: where i can download OpenBaseMovil-ui, OpenBaseMovil-storage, OpenBaseMovil-db?
    Thank you.

  2. Narciso Cerezo




    Hi Nik,
    Thanks for your interest.
    I suggest that you subscribe to the RSS feed in order to be notified of the upcoming releases of these libraries.
    We are working hard to release all of them, along with documentation (reference and quick start guides), examples, templates, and everything you need to build applications quickly.
    Currently just core and script have been released, but we expect to release the rest during December 2007 and January 2008.
    We will release them as soon as possible, and we will publish here when they are ready for download.
    We expect also to release OpenMidsets during February 2008. OpenMidsets is an application built on top of OpenBaseMovil that acts as a host for pure script applications, like Nokia widsets but way more powerful, free and open source.

  3. aruna




    Hi,
    I am trying develop application to download a zip file from our server and decompress it in a location on Pocket PC, PDA and mobiles. Is your tool supports directly to decompress or unzip the zip with j2me.

    Thanks,
    Aruna.G

  4. Narciso Cerezo




    Hi Aruna,
    Our openbasemovil-core library contains a mobile optimized port of jzlib (in turn a port of zlib to Java).
    This means that you can compress and decompress streams, but not directly zip files.
    That is, it is compression but not archiving. In *nix you use tar to pack multiple files in one and then you compress that file with gzip (or bzip2 or whatever). The zip format has both things integrated.
    As you know, you have full support for zip files in Java SE, but not in Java ME.
    You might find an open source zip implementation that can run on Java ME.




  5. Hi

    Sorry if this is a dumb question, but I’ve been looking for sometime for a way to get persistent storage from a database on a Nokia mobile phone. I’ve checked out DB4O and other dbs but none seem to work on MIDP/CLDC devices yet. So I appear to be stuck with RMS, which is not that great for accessing data.

    I’ve stumbled across your site and am not clear whether your product provides an on-board database on a mobile phone or is it just linking to a database on a server? If it provides an on-board database sounds just like what I’ve been looking for – amazing. If that’s the case does it work on Nokia S40 devices?

    Thanks

    Paul

  6. Narciso Cerezo




    Hi Paul,
    The answer is yes, it is an on-device/on-board relational database engine for any CLDC 1.0 / MIDP 2.0 mobile device, that stores data over the RMS system.
    And, yes, it works with Nokia S40 devices.
    Though with this kind of phones the current version 3.0.1 has some limitations due to the device limits. Nokia S40 devices, like BlackBerry or Motorola impose a limit on the size of a single RecordStore. This size varies from 32Kb up to 512Kb, depending on the phone model.
    The current version detects this situation and applies compression, but it still is limited.
    The next version that we plan to release on June will override this limit so you can create tables as large as needed.

    In any case, OpenBaseMovil-db is one (important) of the many things you can find in OpenBaseMovil. It is a development framework with many utilities for making your mobile development a lot easier.
    Take a look at the Quick Start Guide and the PasswordKeeper sample application in the downloads section.




  7. That sounds good – I’ll try it out

Leave a Reply

You must be logged in to post a comment.