10 Things I Love (And Dislike) About BB10 Development August 24, 2013
I haven't found much time for BB10 development in the last few months, so it has been wonderful to get about 35 hours of it in over the last three weeks. I had a very enjoyable hour today and am inspired to share some aspects of BB10 development that I really like.
1.
The UI looks great! The UX team at Blackberry did a wonderful job on all of the widgets and various UI features of Cascades, and it makes it a real pleasure to create apps. BB10 is perhaps my favorite mobile OS in terms of appearance and UI functionality. I'm not sure the UI always lives up to 60 fps like the designers had hoped, but it runs well, and UI interaction is typically nice a smooth.
2.
QML: Being able to quickly put UIs together using a declarative language like QML is great, and being able to call into C++ fairly simply is also great.
3.
QML preview: Being able to get a real-time preview of the UI you're working on is super helpful and makes building a UI so much more efficient. (The unfortunate limitation is that this doesn't work with custom controls -- I wish there was a way for that to work)
4.
Qt: Building Cascades on top of Qt was a pretty good choice, I think, if you're going to build on C++. Qt has a good set of classes, plus their signals/slots mechanism, which make building apps much more straightforward than raw C++.
5.
IDE: Building the IDE on top of Eclipse was a good idea, and the IDE has gotten noticeably better with 10.2.
6.
Sample code: Having a rich set of sample apps that are fun and well-written is always helpful. BB has done a great job with their sample apps. Thank you!
7.
Documentation: BB's website for BB10 documentation is well laid out and looks great, making it a joy to use.
8.
Developer relations and forums: BB means business when it comes to helping developers. They're on the opposite end of the spectrum as compared to Google... if you have any serious issue, just send them an email and they're right on it. This is frankly amazing. Good work developer relations!
9.
Blogs: It's helpful that BB maintains a good developer blog. This makes it fun to continue to learn and be motivated by
10.
Events: BB's "jam" events have been fun to attend, and a good way to meet people and get excited about Blackberry's vision.
Now, to be fair, I'll also list the things that are painful about BB10 development.
1.
Developer productivity with Cascades (for me, right now) is about 2x-3x slower than it was with Adobe AIR. Part of this is my own fault for being rusty on C++ and new to Qt, whereas I had relatively more experience with JavaScript upon which AIR is built, and partly it's because I write more polished code (and more substantial apps) when doing Cascades work, whereas I was happier to hack things together in AIR, but all this said, that makes a huge difference. Some of my top-grossing apps for PlayBook took 8 hours, 2 hours, even 1 hour, to create, whereas my BB10 efforts have been more in the 30 hour range to create something. What this means for hobbiest developers is that it's harder to "focus" on an app, because you might have a week or two where you have some free time, and that only gets you started on an app, it doesn't start and complete the app. Then you lose focus and forget what you created, and you get out of the groove of BB10 development, and it feels like starting from scratch when you pick it back up a few weeks later. I hope that as I progress my productivity will increase. Part of the issue here is C++/Qt. They're good languages, but they're just not as productive as languages like C#, Java, or JavaScript. Qt hags a fair bit of "cruft". Having to maintain .h and .cpp files slows you down. Adding methods is more painful, etc.
2.
My first big time investment in a Cascades app took about 25 hours of my time and 25 hours of a friends time to get close to completion. Then, the app started crashing randomly if I repeated an action. Ugh. The stack trace didn't even involve my code. I must have been doing something wrong in terms of Qt and its memory management, or something, but after staring at the code endlessly I couldn't come up with any solutions to the crashing. This was super-disheartening, and frustrating for a seasoned developer. Writing programs in languages like C++ carries with it this added risk over languages like C# and Java... if you screw something up which has a very indirect affect later on in the execution of the program, and it might take you eons to solve it. This obviously makes development much less fun. I still have yet to solve my issue, and I'm low on patience to go back and spend hours trying to figure it out. Solving those kinds of issues isn't really what someone wants to be doing with their hobby time.
3.
I find QML + C++ to be quite a compelling combination, but it also feels a bit "brittle" at times. If you want to do the common things, it's fairly straightforward, but sometimes I'm trying to do something that seems slightly out of the ordinary, and I'm just clueless how to pull off the plumbing to make it happen. For example wanting to send a pointer to an object from QML to C++, and it gives some cryptic answer. It seems so simple! I think the answer I found on the web was that your method should accept a QObject*, not the actual pointer type you're trying to send. Uhhh, OK, whatever. That's the joy of using a rich, built-up framework, but not having a depth of experience with it. ie. Steeper learning curve. Again, nice when hobby development isn't a steep learning curve.
4.
I really wish deployment to the device was faster. Not including compile time, it takes about 10 seconds to deploy and run the app over USB. This seems silly to me. Surely that shouldn't take more than 1 second if optimized: The app isn't very large -- what takes so long!? Having to wait this long slows down development time and scatters my concentration.
5.
The IDE can feel buggy at times. Currently, if I press "Run" too quickly after the compile finishes (and it is done), it gives me a NullPointerException in the IDE as a popup. Super annoying. Also, it can't currently find the simulator, even though it was working fine previously, and I haven't made any changes to the simulator. And sometimes it can't see the device over USB even though it is connected, or can't see if over Wi-Fi, even though it is there. Little bugs and unreliabilities make developers cranky. I've also had headaches with the keys that RIM issues you to sign your apps -- using them, managing them, etc.
I'm having a hard time thinking of anything else to complain about, so that's a good sign :)
Getting simple BB10 AIR apps to compile August 16, 2012
I've created about 30 PlayBook apps over the last year and a half and it has come time to start getting them up and running on BB10, especially since RIM now allows them to be submitted to App World.
Unfortunately, I haven't been able to get even very simple apps to compile, such as:
[SWF(width="1024", height="600", backgroundColor="#FFFFFF", frameRate="30")] public class Example extends Sprite { public function Example() { var alert:AlertDialog = new AlertDialog(); alert.title = "Debug"; alert.message = "Hello, world!"; alert.addButton("Ok"); alert.show(); } } }
I have attempted to compile this with:
set JAVA_HOME=E:\Program Files (x86)\Java\jre7 set PATH=%PATH%;E:\Program Files\Research In Motion\blackberry-tablet-sdk-3.0.0\bin
cd E:\Users\Daniel\Dropbox\Apps\ExampleBB10\ amxmlc Example.as
But get the errors:
Loading configuration file E:\Program Files\Research In Motion\blackberry-tablet-sdk-3.0.0\frameworks\air-config.xml E:\Users\Daniel\Dropbox\Apps\ExampleBB10\Example.as(13): col: 14 Error: Type was not found or was not a compile-time constant: AlertDialog.
var alert:AlertDialog = new AlertDialog(); ^
E:\Users\Daniel\Dropbox\Apps\ExampleBB10\Example.as(13): col: 32 Error: Call to a possibly undefined method AlertDialog.
var alert:AlertDialog = new AlertDialog(); ^
E:\Users\Daniel\Dropbox\Apps\ExampleBB10\Example.as(14): col: 16 Error: Call to a possibly undefined method AlertDialog.
alert = new AlertDialog(); ^
E:\Users\Daniel\Dropbox\Apps\ExampleBB10\Example.as(6): col: 27 Error: Definition qnx.fuse.ui.dialog:AlertDialog could not be found.
This is a call to RIM to please provide adequate instructions for how to compile BB10 AIR apps via the command line.
I have searched the forums and found evidence of others having issues. There are some hints on how to get things working, but those hints are mostly with respect to the IDEs that some people use to develop AIR applications.
It's really a sad state of affairs that a person like myself can't even get a simple BB10 AIR app to compile in August 2012!
I've posted to the forums in hope of an answer. Hopefully this will all be clarified soon.
Update: As recommended by someone on the forums, deleting the SDK directory and reinstalling seems to have fixed this issue. (I did notice that the version I re-downloaded was "beta 2", so it's possible that this issue was fixed at some point)
BB10 Jam Interview July 2, 2012
Hey cool, I just noticed that the interview I did with RIM's developer relations at BB10 Jam is live on YouTube!