Cross Platform Mobile Applications
 
Developing with mBricks
 

To develop applications with mBricks you do not need to change your current Integrated Development Environment (IDE). The class libraries from mBricks should just be imported as external libraries. Please refer to the documentation of your current IDE.

Wireless toolkit

To be able to build and debug client applications you need to install a Wireless Toolkit, for example the reference implementation from Sun. Most of the different mobile manufactures also provide toolkits for their different handsets. It is a good idea to also test your mBricks application on these emulators. Even though mBricks is designed to run on all handsets there could be issues that you need to address from your client code, e.g. having a screen layout that also looks nice in landscape and portrait mode.

Building

You can either build in your current IDE using its custom build system or you can use Ant /Antenna or Maven. In the mBricks sample projects we provide both Ant/Antenna and Maven build files. The Maven build system can create Eclipse or a Netbeans project. In the future we plan to setup a Maven repository for partners to get access to the latest mBricks versions.

Debugging

The mBricks libraries is provided in both release and debug editions. In the debug edition there is logging that will help you to debug your application. mBricks also have a client on screen debug that is useful to debug client specific issues.

Setting up the project - Best pratices

The best architecture for sofware layout depends of course a lot on the type of project, but in the general case one should divide the source code into a common, client and server part. The best way of doing this is to use namespace filtering. This method is supported by most of the commonly used IDEs. The projects for building and debuging should be localed in a separate directory so that the source code is not affected by IDE specific files. We recommend using a directory structure inspired by Maven:

/
+- src/
| +- main/
| | +- java/
| | | +- .../
| | | +- .../server
| | | +- .../client
| | +- resources/
| | +- .../
| | +- .../server
| | +- .../client
| +- test/
| +- java/
| | +- .../
| | +- .../server
| | +- .../client
| +- resources/
| +- .../
| +- .../server
| +- .../client
+- project/
| +- common/
| +- client/
| +- server/
+- target/
| +- .../
+- project.xml
+- README.txt
+- LICENSE.txt

(Common part is placed directly under the namespace)

 


mBricks  © 2010. All rights reserved