Saturday, November 5, 2011

Final Project #1: Application framework

I'm going to start this blog series about the final project. I have to write multiple posts because there are so many things to talk about (and also it's a nice trick to increase the number of posts haha :P). This one is all about the lessons I've learned from developing an app with Sencha Touch.

Our team were quite confused at the first place about whether or not to do a native app. We obviously wanted to develop a mobile app, but we were afraid that the learning curve of native app development would slow down our progress. Also we wanted our app to run on multiple platforms in order to get a large user base. So we chose HTML5 and PhoneGap, which seemed like a perfect solution: learning curve would be significantly reduced since we were all familiar with HTML and Javascript, and also PhoneGap supported both iOS and Android. That sounded like the best approach for us. But reality has proven the opposite...

The first PhoneGap test was fine. PhoneGap worked well with both iOS and Android as advertised. But we didn't realize that the real problem lied in the application itself, not PhoneGap. As suggested by experienced PhoneGap developers, we chose Sencha as the framework for our app. Sencha is a good framework based on ExtJS, which has a really strong community. But the more we used Sencha, the more we became less confident in our choice. Here are the reasons:

-  Poor documentation: Like all other frameworks, Sencha requires time to learn. But the learning curve is much worse than JQuery or Prototype because of poor documentation. For example, the API Docs for Ext.Form.Search says "Wraps an HTML5 search field. See FormPanel for example usage." When I went over to the Ext.FormPanel docs, there's absolutely nothing...It took us too much time to learn things like Panel, Component, Extension, which could be picked up very easily with good tutorials and examples.

- Bugs, bugs, and bugs: Sencha is super BUGGY! We spent hours or even days trying to make something work the way we wanted to just to find out in the end that it was a permanent Sencha bug that was not yet resolved. There are things that can be done with JQuery in 15 minutes but took us 3 hours with Sencha with most of the time being spent on wondering why the heck it didn't work.

- Ugly codes and poor structure: Javascript is a loosely typed language. Sencha is meant to make it more
structure with OOP and MVC. But our attempts to create a well structured javascript application didn't end really well. Most of the time we ended up using tricks and hacks to get around the weird behaviors of Sencha. As a programmer, I'm very frustrated about ugly codes, but there's not much I can do about it...

Sencha has slowed down our progress quite a lot. Our initial aim to release the beta version 2 weeks ago was completely backfired. Now thinking back it's all clear to us that we should have chosen to go native at the first place. The learning curve wouldn't be much different from Sencha, and yet we could enjoy the native look and feel. But as people normally say "Good judgement comes from experience, and experience comes from bad judgement", I'm glad that I've gained such a valuable experience. Sencha did pose a lot of difficulty to us, but we have a great team who can overcome all obstacles and challenges. We'll keep developing with Sencha and creating the best app possible. Only a few days to go...

No comments:

Post a Comment