Posts tagged development
Posts tagged development
For about 2 weeks I’ve been having some fun with Linux development, mainly using Ruby to build command-line applications. My decisions, to create command-line applications using Ruby instead of GUI applications, were made because of a simple factor: GUI development for Linux is a nightmare, since there isn’t at least one good GUI prototyping tool available to help you design your UI without having to do everything manually.
First I tried Glade which is just a nightmare. It’s extremely complicated to deal with and you have no clue about which control you should use or how to arrange things, and most importantly there’s not a lot of tutorials and documentation for new users to learn how to use it, and how to integrate with other languages.
When I started playing with the Designer one of the first things that I noticed was the lack of simple controls like Buttons, this was pretty strange and I thought I haven’t installed all the things needed, but when I searched for it I got this tutorial from Qt itself, which explains how to create a button in QML (from scratch!!). QML is one of the most awesome things I ever seen to build the GUI logic, it’s simple and flexible, the problem is that there isn’t any kind of controls to create real world desktop applications with it.
After that I took a look at wxWidgets, which lacks good documentation and a decent GUI designer. Then after all this horrible nightmare I thought about creating all my UIs using HTML5 and wrapping everything around a GTK WebKit window, but I don’t think this is a good approach since my apps would look like an alien to the system.
Where are the Delphis of modern computing? I remember how easy it was to design UIs using Delphi and with a right-click on the control you could easily attach an event to it’s logic. It’s this kind of IDE that I’m expecting, one that focus on the fact that you don’t need to struggle to create a UI, but instead that you should be able to create the UI fast and easily enough, so you can focus on the most important thing that is your application logic.
Linux is a awesome OS, I’ve been using it since 2007, and it needs/deserves better tools to create awesome GUI applications, this is one of the reasons that developers aren’t porting their apps to Linux. On Mac OS X we have the awesome Xcode that includes a incredibly awesome GUI designer, and on the Windows side we have Visual Studio with a designer that is the best one in my opinion, since it’s easy, flexible, and powerful. Isn’t this the perfect time for a great Linux GUI designer?
I started playing a bit with BlackBerry development these days and since I’m not the best at Java (also hate how it’s difficult to do simple things with it) I choose their awesome framework for HTML5 native web development called WebWorks. I really loved it because it’s like PhoneGap, but a lot easier to build plugins (extensions on WebWorks) for it to make your native WebApp feel a lot more native.
After it’s processed by the library and shown to the user it will look like this:
Hopefully we can easily manipulate our screen elements and other things before and after it’s processed by bbUI. This is done with the bb.init() function (you can always read more at their documentation). This will be called when the application starts and can be used to listen to events like when a screen is loaded. The main ones are onscreenready and ondomready.
ondomready: This event will be fired when the screen finished loading and it has been already processed by bbUI and shown to the user. Here you can put things like alerts and other things that will be used to interact with the user, also some little editing to the screen’s source like renaming a field grabbing some information from a field and etc.
Here is a example of a bb.init() call:
The code is almost self-explanatory. The id is the name, second argument, you gave to a screen when you call it to be processed, for example bb.pushScreen(“screen/main.html”, “main”). And element is the screen source code, which is used to be manipulated before the screen is loaded.
A little problem that some developers might come across while using bbUI for the first time is that when you want to append or change the HTML of the screen before it’s processed by bbUI you might write your code like if the HTML was already loaded onto the screen, but it’s not. Here is an example of a code that won’t work, used to populate a image-list and then show a button that was hidden (using jQuery):
The main problem here is that it’s using document as the source to be manipulated. Since bbUI still hasn’t appended the screen into the document it will give you an error. In order to correct this you should replace document with element, that is passed by the onscreenready event. If you have any jQuery code, just add element as a context argument as shown below in the corrected code:
That’s it! Now you know how to use the onscreenready and ondomready events to dynamically insert or modify your bbUI screen’s. Any questions or suggestions just leave a comment and I’ll reply as soon as possible.
Today I revived my hope on Microsoft as I received the news that they released their brand new “product” for their fellow developers. The release I am talking about is the official Metro theme for jQuery Mobile. The awesome mobile framework finally got some Microsoft love.
In December of last year I got a new device to develop for, a HTC Titan, running the latest Windows Phone 7.5 Mango build. I loved the OS UI and how the applications were information-centric and not just eye-candy, but there was one problem, the same way C# is a incredible language for a lot of things, it’s parsing functions, for JSON specifically, are very difficult to learn and the articles about it were made for senior C# developers, which makes it difficult for beginners like me to understand them, at least I now can develop using the technology I love most for mobile development: Cordova (aka PhoneGap).
I always wanted to use Cordova for my WP7 projects but the Metro interface was way too complex to build from scratch and since the WP7 build of Cordova was on it’s early stages there were some features still to be implemented, for example there was no way to prevent the app from scrolling and some other things. Now there are plenty of plugins to make the app as native as possible and with the latest help from Microsoft, the Cordova development community has another great platform with almost full support of the native web app framework.
As you might have heard of Google included a Dart VM on the latest Chrome Tech Preview. As they said on their blog post:
Today’s release of the Chromium + Dart VM integration is another step forward for the open source “batteries included” Dart platform. Our goal is to help you build complex, high performance apps for the modern web
This is a great thing for Amazon, they are needing more developer support for their App Store or maybe some big announcement is coming, but on the other side this is terrible/a complete failure for Microsoft.
I have a Windows Phone sitting on my desk, along side with an iPhone an iPad and some other Android phones/tablet. I love the Metro interface and the experience it gaves, you can easily get to your information without having to do much, but WP7 isn’t going very well on the phone market, mainly because of the lack of apps, which is why I always bring my iPhone with me when I want get out with my HTC Titan.
I tried to develop some apps for Windows Phone on my Mac running Windows inside a VM, which was a terrible experience because Visual Studio was slow as hell, but the first problem I had was the lack of simple tutorials to know how to integrate C# and Silverlight for beginners, things like how to retrieve and parse a RSS feed and then populate a list with the info.
Microsoft needs to get the attention of developers fast. RIM is at least trying and they maybe get a good amount of developers to develop apps for their platform too.
Knowing what Steve Ballmer is like, he’ll probably just blow up and shout “That F****ng Amazon” like that time a certain employee moved to Google and went crazy at them…
Apart from that this is not good for Microsoft since they already lack having a lot of developers to back the WP7 platform (which don’t get me wrong is an amazing OS, but once again lacks having lots of Apps). So therefore Microsoft is going to have to speed up the competition before Amazon ‘snatches’ their small market-share in the Smartphone and Tablet Industry away from them.
Just 4 weeks ago the Windows Phone Marketplace reached the 50k applications milestone, but there’s still a very long way that Microsoft should go until they reach a good place in the “App Store wars”. A lot of must-have apps on iOS and Android aren’t available for Windows Phone, simple things like a oficial Read it Later client or a decent free Twitter app (The oficial one doesn’t include notifications). I’ve been using my HTC Ultimate (aka Titan) for 4 weeks and I’m loving the OS, but missing a lot of apps from my Android phones and iPhone, that’s why I constantly take them with me along-side with my Windows Phone.