Enterprise and Mobile Development
If you’re following my blogs from last years, you know that I’m developing in the domain of Enterprise Applications – in reality I’m designing and developing Enterprise Business Applications much longer then blogging about: will be around 30 years
many years I was no friend of mobile phones until the iPhone comes out – now I don’t want to miss it any day – its more like a 2nd computer then a mobile phone to me. Using all these nice Apps I thought that time will come to develop some Apps for the iPhone and already bought some books …but never find the time besides my work as Software Architect and all my work on Open Source around Eclipse and managing own Open Source projects redView and red-open.
but in April this year one of my ERP customers needs to integrate mobile devices and from beginning it was clear that he’ll use BlackBerry.
Why BlackBerry ?
Why not my beloved iPhone ? …and if not iPhone why not the Open Source Android ? …its because BlackBerry fits best into the business requirements of my customer:
- data transported between server and mobile devices should be use a secure encrypted way. BlackBerry platform together with BES – BlackBerry Enterprise Server will provide this
- all devices should be controlled from a central Server, because there are many restrictions what the users (Truck Drivers in the domain of waste & recycling per ex.) are allowed to do with their mobile devices. BES again solves this.
- it must be possible to control Pushing of Data to devices so you exactly know at what time a specific device per ex. received a new order. BlackBerry PushServices – weather using BES or BIS – BlackBerry Internet Services – allow exactly this.
- the device must be robust to survive in waste & recycling environments: there are jackets available for BlackBerry Bold where you can drop the device from 3 m without any damage
- devices should be available from more then one provider, because then its easier to deal for best conditions
… so the decision was to use BlackBerry as mobile devices and this was the starting point for me to join the new world of mobile development. And because I can only make good decisions as Software Architect if I know how it works I decided to write the first applications by myself and develop the framework to be used from the team.
What does it mean to develop BlackBerry mobile solutions ?
BlackBerry uses Java
- thats great, but wait: no Collections, only Vector, Array and HashTable, no Annotations and so on. BlackBerry uses Java ME, but RIM added own Libraries you have to use if you want to write great applications. This means you’re not compatible to other platforms using ME or to Android Apps. So as an Architect you have to design your applications carefully to be able to switch to other platforms later with less work. Rethink your API, compare with Android and iPhone Applications – many concepts are identical.
If you follow my blogs you know that I’m a fan of Logging using LogBack / SLF4J. There’s no Logging Framework available out-of-the-box for BlackBerry Java Development. Logging from a BlackBerry Device means sysout println where the messages are only visible if running the Debugger. So I developed a small Library sending LogEvents through TCP Socket Connection to Lilith LogMontior in LogBack format. (will blog about this later)
BlackBerry uses Eclipse
… as IDE and provides a PlugIn – but attention ! At the moment you’re bound to Eclipse Galileo (3.5) and also to Windows, because the Simulators are only running on Windows. And you have to use 32-bit Java SDK even on Windows 7-64 bit. I blogged about HowTo setup Windows 7-64 bit in Parallel VM on top of OSX for BlackBerry Development.
BlackBerry == Smartphones with GB of RAM
…yes – but be aware: there are some limits not really understandable today. The max size of a BlackBerry Application is:
8 MB Application Code + 8 MB Resources !
Yes MB – not GB … and in real its something around 7.5 MB max app / res size. These limits have a huge impact of the application design: You want to integrate a Video or some great looking Background Images ? On Android no problem, but on BlackBerry you cannot distribute them – you have to implement an extra step after installing to download resources from servers.
The good thing: BlackBerry not only has Applications – you can also write Libraries. Your Applications can have dependencies to other Libraries or Applications, so you finally will end with a modular structure. Per ex. the product suite I’ve written for my customer has 8 Libraries and 6 Applications – some Libraries are Resource-only-Libraries.
You have to carefully watch the Versions you’re using to be able to install the Apps successfully on the device.
Oh – did I mention I miss OSGI ? Its really a big step backward to manage all dependencies by yourself, not working with target platforms or plug-ins
BlackBerry UI and Navigation
looking at the documentation about UI elements and Navigation I noticed a lack compared with UI elements you expect from an iPhone per ex. So I developed an UI Library to provide complex lists with colored lines, tabbed folders etc. I also developed Controllers and Views to create good looking Wizards. I’ll blog later in detail.
BlackBerry UI Elements (Fields, Managers) can be extended and overwriting Graphics context, paint methods and using Listeners you’re open to do what you want. The result looks nice, but the learning curve is high.
You also have to solve the problem of Devices with TrackWheels, TrackPad, Touch… to react for all events correct – also automatically resizing the layout if User changes orientation on BlackBerry Touch (Storm) isn’t easy to solve.
The new BlackBerry OS 6 provides many new UI elements to create really good looking Applications, but at the moment there’s no Provider (in germany) selling BlackBerry Devices with OS6, so this will be an option for 2011 – it makes no sense for me at the moment to develop nice Apps only running from Simulator
Cross-Platform, Web Widgets or native
There’s not THE answer what’s best: develop native Java Applications as I’m doing or using WebWidgets or trying to cross-compile applications. I want a deep integration into native Apps, so from my POV the best way is to develop native Java. But if you’re familiar with Web Widgets, then perhaps you should go this way. Using Cross-Compiling – from what I’ve seen till today – you’re only using the 70% common use-cases and UI elements of each platform. If you can live with the feature set those solutions provide, then its an easy way to create Apps for different Platforms.
At Eclipse Summit Europe 2010 there’s a Mobile Development Symposium where we can discuss this. (see below)
BlackBerry, Open Source, Community
After working nearly 100% with Open Source Software last years it was something like a shock now only have JavaDoc instead of the sources. I also miss the open discussions with committers, but must say that RIM is doing a good job. There are Forums where you find other developers to discuss and helping with problems.
What I’m missing are Open Source projects around BlackBerry Java Development – there are source code fragments at the forum, example code inside the Knowledge Base Articles and some Blogs providing some code. But at the moment I didn’t found ‘real’ projects extending BlackBerry Development with Open Source Projects. But I’ll provide my Logging Framework and UI Library as EPL and then will see what happens
Curious to attend the BlackBerry DevCon next week in SFO. Some things work different compared with Eclipse conferences per ex. you have to select the sessions in advance you want to visit – otherwise no seat is guaranteed. This conference is the first one since a long time where I’m not as a Speaker – perhaps this will change next year
BlackBerry and MDSD (my goal)
So you know: I’m missing Open Source Projects, Logging, OSGI – but I also miss the spirit of model-driven development. The best to change this is to provide something
Next months I’ll extend red-open to also generate code and other artifacts for BlackBerry Applications.
Also – from my POV – it would be the best to have a mobile DSL (Xtext) from where you can generate native applications for Android, BlackBerry, iPhone.
Perhaps APPlauseDSL is a good starting point, Peter and Heiko have done a great work what I’ve seen at some Democamps. … have to try it out next weeks. Would be great if I can provide something to use APPlause for BlackBerry Applications.
Enterprise and Mobile: Riena, RAP, Equinox, BlackBerry and more
at the end all should fit together:
- one development process model-driven
- UI Designer Riena RCP/RAP using redView
- UI and Navigation defined by Xtext DSL for mobile Apps
- Equinox – OSGI – Riena – Server providing Services to push to devices and listen for incoming requests
- Riena RCP Desktop Clients
- Riena – RAP Web Clients
- BlackBerry Java Clients
- other mobile platform Clients
…think next months again won’t be boring
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)