Part one of our end-of-term blog posts was dedicated to some tips on using bbUI.js. For this post, let’s hear from John Yan of UBC, who worked on BlackBerry WebWorks Native Extensions and also learned Cascades for his final project:
“The past two months have definitely been busy times yet also they have also been a highlight in my four years of university studies. Not mentioning the various school projects that I had to make, I had the honor of working as an open source developer for RIM and for the new BlackBerry 10 device. While learning how to properly use the various SDK’s and programming tools has been time consuming (at least for me), it was thoroughly satisfying to see the app I designed or the extension that I have implemented slowly evolving into something I am proud of. Despite the various tools that I attempted to master in the past two months, I would like to write a little bit specifically about the Native SDK that I had used.
The Native SDK contains a set of tools that greatly aided in my quest to write code for apps or native extensions for the BlackBerry WebWorks SDK. It might sound strange to use one SDK to write code for another SDK, but that is how awesome the program is.
Focusing on the app writing component, the Native SDK contains QNX Momentics, which is an Integrated Development Environment. Momentics has a very user friendly GUI. Based on the open Eclipse IDE, developers who are familiar with Eclipse will find Momentics very simple to master, which is certainly the reason that I chose it to write several testing apps for my native extension and a gaming app.
A few words of advice when integrating C++ with QML:
- Don’t forget to add Q_INVOKABLE in the header file for methods that will be called by your QML code.
- If you do decide to write C++ code, be sure to create your QML Page, NavigationPane, or any AbstractPane that you decide to use, in C, or else your C code would not be able to have a pointer to such page.
- <QmlDocument variable>->setContextProperty(“<Name You Give To Your C++ Class>”, this); is a line in C++ which is needed for your QML side to access the c side.
- ObjectName is a field required for your containers. ID field is only for QML access while ObjectName is used for C++ access.
- And remember to have always fun when creating an app for your new BlackBerry device!!!”
And now, I promised a summary of what we accomplished during the term and what’s being planned for next term. This term was our first time being involved with UCOSP and it was definitely a learning experience. The six students we had participate were all exceptional, and even though they were new to BlackBerry development, they learned fast and are all creating applications to release in BlackBerry World before the launch. One of the greatest challenges we faced was in getting familiar with Git. I told the students that Git is “intentionally hard”, but for next term I intend to put together a getting started guide that will be of use to all our new Open Source contributors, so they get over the initial learning curve easier. Once you get going with Git, it really is pretty great, but at first glance it’s quite daunting.
Our students writing BlackBerry WebWorks extensions were able to create five extensions, which is really outstanding, especially given the short amount of time they actually had to work on them and never having done Extensions before. The students writing for bbUI.js had similar results, getting several updates into the bbUI.js framework as part of version 0.9.5. Most of their updates were in adding dynamic APIs to bbUI.js controls, which is very important for making bbUI.js capable of taking on more advanced application needs.
Finally, our plans continue into next term. We will be working with students from across Canada again on BlackBerry 10 WebWorks projects, and I’m currently investigating some project options. We may do some more extensions and bbUI.js work, but we might tackle a significant project for the benefit of all WebWorks developers. One thing is for sure: I can hardly wait to meet the new and returning students at the kickoff sprint in the New Year and get to work with them.