BlackBerry Jam: Build a native application in under an hour

David Clayworth
By Alicia Erlich on 17 May 2013 11:31 am EDT

Heading in BlackBerry Live and the subsequent Jam Sessions I was a bit nervous. One of the reasons I made the trek from New York all the way down to Florida was to expand my coding skills and try my hand at learning Cascades. Now I had never used C++ or QML before nor did I have any experience with JavaScript so it did seem a bit intimidating going into the Cascades 101 sessions. However, all that changed when attending the App in Sixty Minutes session hosted by David Clayworth and Mattias ​Öhman. They would be compiling a native Cascades application in less than an hour.

First off, I must say that building a BlackBerry application in under sixty minutes just didn’t seem possible. Throughout the session, David kept reminding us that all coding was live and then continued to make off the cuff jokes on how we probably didn’t believe that. However, as a small disclaimer, all data files that we would be importing into the app were created in advance. It was a tag team effort with David guiding us through each stage of the process while Mattias remained at the computer entering the code.

Diving right into the presentation, they stated the resulting application should be “beautiful, integrated, and social,” which are the three guidelines and requirements that every BlackBerry app should meet. For the purposes of this demo, they would build their restaurant guide completely with QML to demonstrate that C++ was not the only method available to code an application with Cascades. Even with QML it would still offer the full BlackBerry performance without any lag whatsoever (unless more complicated mathematical calculations were needed).

During the first three minutes, David guided us through the process of opening the IDE, starting a Cascades project, and importing the data files into the project. Next, they inserted code to create the page and list item views, all while giving definitions of each one which was appreciated. Having those thorough explanations made things simpler and easier to follow, more so than what was taught in prior sessions.

Once the basics were coded, it was time to load on a Q10 for testing. While the information displayed was just a list, David quipped that it was good enough for BlackBerry World but maybe not one to pay $0.99 for, at least not yet. Following that step, it was time to code the details page so that users could access not only a list of restaurants but their information such as phone number, address and webpage as well. In a matter of minutes, they inserted the QML pages to define the layout. Keep in mind, all of these actions were performed in under ten minutes and fulfilled the first requirement of being “beautiful.”

Stage two involved adding the code for the actual details by linking to the pre-compiled. In turn, and without even realizing it, this made the application “integrated.” So how does one make the application integrated? In this case, with zero lines of code! You heard that correctly, by utilizing Cascades, the ability to link to BlackBerry applications such as the phonebook, browser, and maps is already inherent in the code as is the peek and flow gestures without any additional work on the developer’s part. How this worked is simple. The ability to recognize a phone number, website, or address is built-in and will automatically perform the corresponding action. As a novice developer, the idea that this was part of the backbone blew my mind as it demonstrates how easy it is to create a native application.

For those of us keeping track, we were less than thirty minutes in and already had a working application minus a few features. Note that most of the time was dedicated to David’s explanations. Next up was including the menu items of each restaurant by adding a simple button.

The final stage is the social aspect and being able to share your dining details. In this example they used “I’m eating [insert menu item] at [restaurant name].” To accomplish this task only required the insertion of the context and invoke actions which grants access to the invocation framework for BlackBerry applications and services. Once accomplished, they saved the code and launched on the Q10 to demonstrate. David noted that the system automatically handles this and prompts you which method is available to share (i.e. BBM, Twitter, Email, etc.) unless you specifically code it otherwise.

At this point only thirty two minutes had elapsed since the session began and an entire application was built from scratch that satisfied many, but not all of the Built for BlackBerry requirements: gestures and flow, icons, different form factors, menus and navigation, shortcuts, consistent menus, focus on content, and service integration. Did I mention they included shortcuts for keyboard devices as well? David stressed that BlackBerry is dedicated to one application for all devices. This concept was explained in further detail in other breakout sessions for WebWorks and Cascades. This means that by using only one application, the lines of code meant for the Q10/Q5 is ignored on the Z10 yet is taken advantage of on the keyboard devices and vice versa.

I must say that this was one of the best sessions held this week. Having never been exposed to this programming language before it certainly broke things down into a more digestible format. I still can’t get over what they accomplished in technically under 20 minutes that could be submitted to BlackBerry World. David remarked how in rehearsals they designed it in 16 minutes without the commentary.

While this was held on the final day for BlackBerry Jam, the excitement and passion seen in the room was evident. David was engaging, informative, and showed that Cascades is not as daunting as we first thought. As a side note, it is my opinion that David should moderate other Cascades sessions because of his ease with teaching and his rapport with the audience during the Q&A. My takeaway from this session is that I feel more comfortable with Cascades and I can't wait to get home and apply this new knowledge. 

Reader comments

BlackBerry Jam: Build a native application in under an hour


It is nice that BlackBerry is making everything as smooth as possible for devs since it is the only area in which the platform needs to catch up. 100,000 apps in just 3 months is phenomenal. Have they published some sort of ratio bet native and ports? Would be interesting to know.

edit: they removed my first. T_T

Posted from my Z10

If i'm not mistaken, in one of the Interviews they said around 80% native and 20% Android ports. But you need to take into consideration the amount of RSS feed and HTML5 Apps. So overall it's quite more than i have eber expected.

Fantastic! May have to dabble with cascades...great feedback!

Side note: it's peek and flow, not peak and flow. :)

Posted from my Z10 via CB10

Wish I was there as someone wanting to start developing for BB10, I could do with a push in the right direction.

I wonder then why it seems like it's so hard for some of these developers to build a native app instead of just porting one from another platform. Dare I say it, lazy??

It's all about the money man! Why should I rewrite the code and maintain two code base when I can do it once and increase my platform exposure so easily?

Posted via CB10

This is why app developers are terrible business people. When you design your app do you want to be 1 of 100,000 or 1 of 1,000,000?

If you truly want to make money you want your app to get more exposure, so having developed a native app for BlackBerry where you stand to have less competition will provide you with the opportunity to make more money.

For example there is currently no euchre app in BlackBerry World however if you do a search on apple or android how many do you get? There is an opportunity to be 1 of 1 tell me you won't make money.

Your welcome.

Posted via CB10

As FLachance has mentioned, it all depends on the return on your investment. If going native only generates a small increase in sales and you have to maintain 2 code bases, then is it really worth it?

But as you've mentioned, there are plenty of opportunities for new developers who want to copy what's available and popular on other platforms.

I don't think you can copy an existing app on Android or Ios and making it native on bb10 without violating IP or software copyrights.

Posted via CB10

Sure you can, just look at all the filter and instagram clones you can find on BB World.
Just steal the idea and design it differently.

Name one that mimicks instagram that is as popular...People look for "instagram" not a filler app....mind you I don't care for instagram but many many many people want the "Instagram" brand/name, and skype and a zillion apps whether the quality of the app is any good or whether they will use it.

Pictsory is the perfect example since it's filters + social network, but most users are happy to just be able to toy with pictures, they don't necessarily want to join yet another social network. And for that, you have lots of apps in BBW.

Sure, a lot of people want the big apps, but when big brands are not interested, indie devs fill in the gaps and become success stories. How do you think Blaq or iTunes sync got popular on the PlayBook?

Thanks for the app info, will look for it and add number 353 to my Dev Alpha A. My point is that an app needs to be different enough from a "brand" app to avoid legal issues; one cannot just take/copy the "Instagram" code and port it to BBY 10 OS and label it "Picagram". Uhm, I like this name---maybe I will use it for my own app...The next step for the "Picstory" developer is to port it to Android and/or IOS to have maximum exposure and earn the most $$$ possible.

To be fair, to do a proper analysis of visibility of an app you need to include the number of people using that platform such as IOs or Android and likely to search by keyword for an app and also probably an analysis of the optimum key words for on point hits.

Posted via CB10

I refuse to install Google Android applications on my BlackBerry Z10. If I inadvertently install such an application I remove it as soon as I discover it is Google Android.

Posted via CB10 from the BlackBerry Z10

Go have a look on the BlackBerry site under dev tools, everything you need should be there

Posted via CB10 from my Z10

Great article Alicia, thanks for sharing.
Would have been nice to have some vid from the session so we could have heard the way he explained it as well. But sounds like it was a really good session, good on BlackBerry making genuine concerted effort on every front!

Posted via CB10 from my Z10

I believe BBRY is making all sessions available online sometime in the future. When I don't know, but they probably want to protect the value of actually attending rather than just watch the videos so maybe it will be a few weeks at least.

Alicia you should definitely give us a tutorial on this as I am too trying to get a grasp on Cascades but haven't had a chance to look into the language as i am a bit skeptical... PLLLEEEEASSSSEEE! I'll send you a box of chocolate if you make it :D

Posted via CB10 on the Z10

I just want to make a simple "headless" app so we can adjust individual volumes for notifications since I heard they took that out on BB10... Or is there already one out there for that?

QML and N9 like Flow UI are reasons why I (and most of the community) moved from Nokia to BlackBerry.

Posted via CB10

I'm curious if the coding you have under your belt very similar from Qt for Nokia N9 similar to that for BB10? Also what IDE are you using and what percentage of your code from N9 is directly compatible with BB10?

Thanks Brian. Wish i had went now. Thought the event would be geared toward the already well versed developers. Can't wait to learn more with your assistance.

It's just like you can assemble a phone in less than an hour. Piece of cake when you have everything pre-defined.
In reality, architecturing, debugging, creating assets, packaging, testing, refactoring will take days unless you just want to be like one of the thousands of garbage app already in BBWorld.

Cascades is still great though, just like any QT dev environment or HTML5 framework. Pre-built components will save you time.

Thanks for the wonderful summary and for high lighting how so much of the UI design elements are built into the BlackBerry 10 APIs and Cascade frame work. To follow up with @ofutur's comment or add to it, this is something that should be communicated and illustrated by BlackBerry and or third parties in this kind of exercise more. Making available a list of Cascade, QML and C++ library calls and or functions with simple context or examples of use would go a long way in easing the transition from java for many coders. Do you have the link to the video for this session? It should have been offered every day of the jam.

Posted via CB10

I attempted to find this session online through BBLive, but I don't see it for viewing. Anyone find this session and its material?

Can I watch any of this on webcast on demand? I am a developer but have mostly developed stuff with C#. This cascade thing looks interesting.

I watched the segment when Adams and Kevin interviewed you. It was a lot of fun. They were kidding around about the fact that they weren't invited to be an Elite member. LOL. Thanks for the post Alicia. Very informative. We need more of this kind of post. I'm looking forward to this recording.
@Brian Scheirer - thanks for the link and comments.

Thanks Alicia, that was a great review! Wished I could have caught that one when I was there, but good to get info on the ones I missed.

Posted via CB10

Hope to develop an app soon. Whats the best way to go? Have about an equal share of known how in C++ and Java

Posted via CB10

If it's so fast an easy to make an app why do we have to wait so long for them? Maybe blackberry should spend 60 min and fix the Facebook app for PlayBook and build a twitter app while there at it.

Posted via CB10


Is there any video of this session, and will it be made publicly available on the BlackBerry Youtube Channel? Also is there any books, online documentation that as suggested by the hosts of this session?

Lovely article and hoping to see more of these with video or code samples for the truely new to coding. And I mean those of us that have a desire to learn but are so confused with such proclaimed "learn this code for beginners" yet always assumes you have over 12/24 months of previous coding experience, knowledge or background in comp-sci that heavily taught coding paradigms, principles etc.

When I'm looking for a book or website to learn coding for beginners ... I've yet to find one that is akin to learning a completely new spoken human language from scratch - similar in fashion or the ideal/principle like Rosetta Stone does. It really makes me wonder how ANYONE learned how to code if so many documentation for just about EVERY programming language assumes someone already knows how to do it. Arrgh!

This was definitely the best session format that I attended during BBLive. It made it a lot easier to follow than the sessions where they just post small code snippets here and there. Hopefully, more sessions follow this format next year.

Posted via CB10