Enterprise and Mobile Development
Join the DZone community and get the full member experience.Join For Free
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
Published at DZone with permission of Ekkehard Gentz, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.