As the well-known saying goes, “A journey of a 1000 lines of code starts with a single import statement”… Oh, wait that’s not a saying at all is it? Well here's something that is well known for many new developers, it is often difficult to figure out how to get started. And the second biggest challenge is what to do next after getting started. The first is a relatively easy question to answer and for the second, while there is no single correct answer there are definitely better paths to choose than others.
So, here I hope to dig back into previous Weekend Coder posts and put them into an order that should help new developers progress through Cascades.
Step 0: Before Starting
Even before you install any programs or write a line of code there are a few things you should take into consideration. In the app making process article, I explore the fundamental workflow you should expect to take when making an app. This should give you a good frame of reference of what you are getting yourself into. To paraphrase a developer friend of mine (who codes a very popular app for BB10), “What people often fail to realize, writing an app is the same as writing ‘real software’” and by real software he means things you would normally expect on a desktop. More to his point, there is often a misconception that small screen means small effort when it comes to app development versus traditional software. I am not trying to scare/discourage anyone, rather just trying to inform you.
Knowing what kind of resources that are available to you as a coder is another important item before starting your app journey. Although you will probably use help docs and tutorials all throughout your coding life, researching along with your plan will be invaluable as you progress. Research will uncover things like what platform is best for your idea, if what you are trying to do is even possible, have others already done what you are trying to do, etc. Note, the rest of this article will be from the point of view of Native/Cascades, but there’s no reason you can’t apply the ideas to any software language.
Step 1: Getting Started
This is usually the number one question everyone has, while the previous two paragraphs are the actual answer that is not what you usually want to hear. So here’s the answer you are looking for. During your research, you’ll have discovered for Native/Cascades the most popular option for a developing environment is Momentics which is provided to you for free by BlackBerry. Once you have downloaded and installed, here is a video walkthrough of the interface. And once you know what all the buttons on the IDE do, you are ready to build your first app. I once again have a video showing how to do this.
Step 2: Foundation
There are plenty of tutorials that will get you to this point and they all pretty much end with “now you have built Hello World, go make something awesome!” However, there is a big jump between having two words appear on the screen and having a fully functional app that users will want. Possibly other tutorials stop here because like I said above there is no single correct path. And since there isn’t one the best I can do is help guide you from here. (Better than nothing, right?)
I think the best next step is deciding on a navigation plan. This is what will provide a good foundation for everything that will go into your app. Think of navigation as how users will go through your app from various presses/selections and what content will be displayed on each “screen”. I have a few write ups of some options:
Navigation and Tabbed Pane (easy): These are the two built-in types provided by BlackBerry in Cascades. I go a bit deeper into TabbedPane, but this is a specific somewhat advanced topic which you may want to hold off on until you are a bit further in your app knowledge.
Custom (advanced): One of the beauties of coding, especially design, usually if you can dream it up it can be coded. There isn’t much can’t be implemented into a design. I have mimicked a Cascades style TabbedPane and I have come up with something completely custom. The point is you can do anything you want.
Step 3: Independent Topics
Now from here, it is really just a matter of what you in your app. How do you want to style it? How do you want it to behave? So the best I can do is group a handful of my tutorials as either “easier” or “harder” topics.
These next two topics have nothing to do with each other but easy to implement. Text styling lets you change the color, size, and in 10.2+ the font of text. And you can define the style once and use it everywhere. The asset selector makes it easier to support various devices by reusing/managing code. And by the looks of the 10.3 roadmap there will be some new goodies surrounding this feature.
Step 3b: “Advanced” Topics
Next, I have done some tutorials on more advanced topics. And please don’t confuse that you need to have everything in the easy topics implemented into your app first, rather it is best to understand the more fundamental features you can add prior to jumping into more advanced ones.
One of the most popular, if not most popular, style of app is a list of “news” and there is a great set of tools to get lists into BlackBerry10. And a popular thing to add to a list (or any app really) is the ability to have the share card pop up so you can have users share something from the app to their friends via email, text, social media, etc. Another advanced topic is implementing payment services into the app for in-app purchases. Personally I think “freemium” apps are the best model to generate income.
My last two advanced topics I believe are the hardest but for separate reasons. First, I have what I dubbed “Fancy Transitions”. While the code isn’t particularly hard to understand here, the method behind the madness is a bit tricky. What I am doing here is having a few tools working together to do something no single tool or object could do on its own. I couple this is the same bracket as the custom navigation types I discussed above. And finally, active frames and more specifically dynamic active frames is the most advanced topic I have written about. Luckily, you can grab the code I show in the example and slightly tweak for your own purpose. I definitely don’t recommend this topic until you have a good understanding of Cascades and how QML interacts with C++.
Step 4: Finalizing
Regardless if you made something super simple or the most complex app in the world, the last few steps are the same. Prior to building the app for release, you need to create a name and icon and should create a splash screen. While I don’t have a Weekend Coder article on building a final .bar file, I have a tutorial on this subject I wrote for my personal website. Lastly, you will want to get your app on BlackBerry World. So I leave you with one more video showing you how to do just that.
Finally, your apps are never "final." You can always improve, add new features, or connect your app to other apps. Be sure to go back and make updates to your apps. You may love what you end up adding without even knowing prior to updating plus users always love updates.
I hope my 4 (or 5 or 6) steps give aspiring app developers a bit more of a roadmap on how to start writing apps and ultimately get you through all the steps to completion. Along the way I have referenced about 20 tutorials, 4 videos, and pointed you to read 7 or so sites that have thousands of pages of information (especially the official docs page). So to recap, app developing is most certainly real software development that requires real work. After all, for some it is a career and for many others it is very rewarding hobby (monetary or otherwise).
Let me know if I missed anything or if there is something you’d like me to include in future Weekend Coder posts.
CrackBerry is in no way Affiliated with BlackBerry. We take pride in our unbiased content, however do occasionally receive free products from vendors that we review or discuss. For more info click here.