Editor’s Note: Today we present Part One of our three-part series on developing enterprise applications for BlackBerry 10, written by Richard Balsewich and HyunJun Jung, both Senior Enterprise Developers at BlackBerry. Click here to read the introduction.
Welcome to Part 1!
Since our introduction contained a spoiler alert as to what we’re building, Part 1 focuses on breaking down the application into the 5 main parts and providing the exact samples used to <code+paste> from to create this masterpiece.
- Clever User Interface
- Networking (ala Web Services)
- Data (Show and Save)
- Platform Features (BBM, Ads, Payments)
- Ecosystem Interaction (With Other things)
Clever User Interface
Have you ever heard an END USER say: “Wow your code looks AMAZING! Great job!”? If you answered “Yes”, you are kidding yourself. “Never” is the correct answer, because an end user could care less about the plumbing of your application. They only care about a clean and snappy user experience that makes their job/life EFFICIENT and FAST. We choose a carousel UI because who doesn’t love continuity?
Check out this sweet Carousel UI Sample available on our GitHub repository. It was created during a “Stump the Experts” session and our BlackBerry experts delivered anything but a stumped look. This is going to be our starting point for our <code+paste>. And like every application in the world, you’re going to need some simple dialog windows to interact/communicate with your user. (at minimum to at least let them know what’s up) Since this is common we created a Dialogs Sample that we will borrow from to save time and confusion.
An enterprise application that doesn’t connect to anything, or has no dynamic content is what I classify as a “Cr@p App”. Any good application will retrieve content from several different places and maybe using several technologies. This keeps your application smelling flowery fresh versus of stale old data. So why would we expect you to write all this code boiler plate stuff from scratch? We don’t! There is an example for everything.
Has your organization finally caught on to WebServices and now expose data your apps would love? Then you’re probably going to need an example for SOAP and XML based services, and one that shows REST in action. You can <code+paste> from our WebService SOAP and XML example for those services that require state or use our Twitter Timeline sample to cover REST and JSON.
Got oData (Open Data Protocol)? Well the BlackBerry library has been recently accepted to the oData.org library and implementation Working with oData sample has been posted to GitHub. Or maybe you just need to understand how to make basic HTTP Get or Post transactions, the Network Access Sample provides you with everything you need.
I’ll admit for this piece of the <code+paste> project we’re cheating and just using embedded URLs, our “amazing” Invocation Framework and a WebView to cover networking. Why not use a core feature instead of re-inventing the wheel? Our Invoke Client Sample shows you how to interact with the Invocation Framework. Yes there is more than one way to do something WAAwesome!
Everyone and everything wants to use the device flash memory for storing all their stuff. Memory space is a playground and everyone has to get along and share. This means your applications will no doubt be working with data, in all aspects. Retrieving, Storing, Showing, Sharing, you name it.
For this example we are taking advantage of Cascades QSettings example since it’s quick and easy for storing our “Settings” value. What is QSettings and why does it matter? Well, users expect your application to remember their settings, user preferences, etc. Since different operating systems have different standards, we will use Qt’s API since Qt is a soon to be cross-platform development option. (5.1 in beta supports iOS and Android now)
For our database and SQL fans, don’t sweat it because we do offer examples too.
Each platform offers a set of features or functions that can be easily incorporated into your enterprise application. Whether you need analytics, in-app purchase capabilities, or location based services, the BlackBerry 10 solution offers tons of these features which means some of the stress and strain is taken off the developer’s shoulders.
Have you heard about the always-on encrypted, bi-directional, VPN tunnel that is the BlackBerry Connection service? (Available to the BlackBerry 10 Balance Work Perimeter and available to iOS and Android devices through BlackBerry Secure Workspace) This one feature gives enterprise grade application unparalleled access to behind the firewall resources, no extra code required. So for the example, you don’t need a code sample BOOM! But at least here is a pretty picture to explain what I’m talking about:
This is such a vague category since these are usually the features that hit the cutting room floor when schedule and scope creep occur. The good thing is that there are so many cool integration points, be it other applications, other users or communities, which can be considered the “Ecosystem”. For our example, we’re going to interact with the device email client application. The world still relies heavily on email so why not include contact information right there in your app? Since the BlackBerry invocation framework handles the interactions for you, all that you need to do is supply a few parameters to a request and “Wah-lah” email interaction. Our email invocation documentation shows you the required and optional parameters you can use to enhance the user experience.
So far we’ve covered the creation of a clever user interface, networking, data, platform features, and ecosystem interaction – complete with samples that you can check out for yourself. It’s important to us that you have the tools that you need to not only learn and grow your skills, but also to apply them to your work as an enterprise developer and create outstanding mobile applications. In the next post of our series, we’ll be “sewing it all together” and covering a carousel sample, alert dialogs, starship settings (that’s right), and an invocation client. Stay tuned, and be sure to follow us on Twitter @BlackBerry4Biz to stay in the know before everyone else.
What samples do you find the most useful for BlackBerry 10 enterprise app development? Start the discussion by sharing in the comments below.