Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!
HTML5 Zone is brought to you in partnership with:

Ed Spencer is the lead architect on Sencha's SDK products including Sencha Touch and Ext JS. He is responsible for bringing MVC and advanced data handling capabilities to the frameworks and has a passion for beautiful code. Before Sencha he ran a consulting firm specializing in Ruby on Rails and JavaScript technologies. Ed is a DZone MVB and is not an employee of DZone and has posted 2 posts at DZone. View Full User Profile

Sencha Touch 2 PR4: Big Improvements in Data and MVC

02.02.2012
Email
Views: 3317
  • submit to reddit
The HTML5 Microzone is presented by DZone and Microsoft to bring you the most interesting and relevant content on emerging web standards.  Experience all that the HTML5 Microzone has to offer on our homepage and check out the cutting edge web development tutorials on Script Junkie, Build My Pinned Site, and the HTML5 DevCenter.

Today we released Sencha Touch 2.0 PR4 – the fourth and final preview release before we hit beta. While we’re technically calling this one a preview release, we’re pretty happy with the performance, stability and overall quality of this release and consider it exceptionally close to beta quality.

As well as a good number of enhancements and bug fixes PR4 brings a couple of long-awaited improvements to two of the most important parts of Sencha Touch – the data package and the application architecture.

First up, the data package has been ported to use the new config system, which normalizes all of the configuration options for every class in the data package, providing a clean and predictable way to configure and update your data classes. We’re still cleaning up some of the data package documentation and given the scope of some of the changes we’re expecting a few bugs to appear as a result but overall we’re very happy with the improved capabilities of Ext.data.

MVC Improvements

The second big improvement in PR4 is to the application architecture. The MVC classes have also been upgraded to use the new config system, again yielding big improvements in the API and general flexibility of your code.

History support has been baked directly into Controllers, enabling you to easily define routes that your Controller cares about, as well as the functions that handle those routes right there in your Controller file. The Kitchen Sink example has been upgraded to use routes out of the box – try it on a mobile device or desktop browser and watch how it reacts to the back/forward buttons.

Equally important, Device Profiles have been upgraded to make creating apps that adapt to different screen sizes much simpler than ever before. Once again the Kitchen Sink has been upgraded to take advantage of device profiles. If you load it on a tablet device you’ll see a split screen view with the menu on the left and the content on the right, whereas the phone version employs a nested list to save screen space.

To cap it off the deep linking support means you can navigate to any view on a phone, send the link to a friend on a tablet and they’ll be taken to the same view customized for their screen size. As an example, try opening http://dev.sencha.com/deploy/sencha-touch-2-pr4/examples/kitchensink/#demo/forms on a tablet and a phone to see it show the Forms demo specialized for each type of device.

As PR4 is the first time we’ve exposed this expanded functionality to the public we expect that there will be bugs and edge cases that crop up. We’ll be keeping a close eye on the bug forums and addressing any issues as quickly as possible, as well as creating additional MVC-driven examples for you to learn from. For now, the kitchen sink is the best example of Sencha Touch 2 MVC in action.

Docs

We’ve made a huge push over the last couple of years to radically improve our documentation, and I think that even in the pre-beta PR4 release Sencha Touch 2 has the best docs we’ve ever created. While there are still holes to be filled in, we already ship with 20 guides on how to use the framework, including 4 brand new guides for PR4:

As well as the guides, most of the classes now contain generous documentation explaining their function and the context in which they operate. As we move to beta and then to GA we’ll be shifting our focus onto producing great demos and examples to showcase the framework’s capabilities and provide realistic sample code to draw from.

There’s a full set of release notes explaining the improvements in PR4 and the important known issues. We expect to be shipping regular releases from now until GA so be sure to keep an eye on the forums, twitter and the sencha blog for more details.

 

Source: http://edspencer.net/2012/01/sencha-touch-2-pr4-big-improvements-in-data-and-mvc.html

Published at DZone with permission of Ed Spencer, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

HTML5 is the most dramatic step in the evolution of web standards. It incorporates features such as geolocation, video playback and drag-and-drop. HTML5 allows developers to create rich internet applications without the need for third party APIs and browser plug-ins.  Under the banner of HTML5, modern web standards such as CSS3, SVG, XHR2, WebSockets, IndexedDB, and AppCache are pushing the boundaries for what a browser can achieve using web standards.  This Microzone is supported by Microsoft, and it will delve into the intricacies of using these new web technologies and teach you how to make your websites compatible with all of the modern browsers.

Comments

dev danke replied on Sun, 2012/02/05 - 3:04am

Be aware, Sencha Touch uses the business-unfriendly GPLv3 license. They also offer a so-called "Free Commercial License" (as of 5-Feb-2012). But that license is deceptively named and probably not what you want.

Sencha's "Free Commercial License", will Not allow you to get security patches and bug fixes for Sencha Touch. Here's an excerpt from the license:

You are not entitled to receive major version updates (i.e. X.Y, X+1.Y) or bug fix updates to the Software (X.Y.Z, X.Y.Z+1). Major version updates and bug fix updates to the Software are available separately for purchase.

It's quite clear, the Sencha company just wants to lock-in you (or your company) to their proprietary product, so they can charge you for it. Sencha is counting on people not reading the fine print in the license.

If Sencha wants to avoid being deceptive, they'll rename the license to "Version Locked - Free Commercial License". This will alert everyone that this so-called "free" license is severely restricted and effectively useless in a commercial product.

Once you realize that the Sencha company doesn't mind using a little trickery to lock-in customers, you may be looking for alternatives to Sencha Touch. Truly free-and-open, cross-platform, standards compliant, mobile develop frameworks exist now. As a starting point, consider jQuery Mobile and PhoneGap.

http://jquerymobile.com/
http://en.wikipedia.org/wiki/PhoneGap

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.