One of the things I've learned in my experience with Sencha Touch is that it is, well, really cool. And it can do some really cool things. The purpose of this blog post and possibly future posts is to highlight some cool things Sencha Touch can do that some people might not already know about. To get started, here's a few things I think are worth looking at.
I'm all about the web being a big part of application development in the future, so naturally it's exciting to see Sencha Touch on innovative new devices like Google Glass. There's people on both sides of the fence with Google Glass and wearable tech in general, but I'm a huge supporter. Perhaps it might not be until 'Google Glass 2.0' that we start seeing mass adoption (if at all) but I think the potential value to the consumer and the world will be huge. It's one of those things that has the potential to change the way we live completely. Speculation on Google Glass aside, let's take a look at how Sencha Touch plays into this.
At Sencha, we have always stuck by our core belief that HTML5, and the technologies that support it, will always the top choice for any cross-platform mobile development. Google Glass is a perfect example because you’ll quickly find that you don’t need anything more than Sencha Touch to build apps. – Ross Gerbasi
Ross says that development for Google Glass should just come naturally, as the only real differences are a smaller screen resolution and some UI constraints. You can have a look at what Ross has done below:
If you want to try this out for yourself, take a look at the rest of the blog post by Ross.
I've covered this topic in the past but had to include it on this list. The fact that we can now sell pure HTML5 web apps, with no need for any packagers like the Sencha Touch native packager or PhoneGap is a huge step forward. If you want to see how you can sell your application on the Amazon Appstore you should have a look at this post. Currently, this is the best way to sell a HTML5 mobile application.
Typically there are a few commands you will commonly run when building a Sencha Touch application. These usually include the following:
- sencha app refresh whenever the bootstrap file needs to be updated when a class is added or changed
- sencha ant sass or compass compile whenever a .scss file is changed to update the css file (compass watch could also be used instead of doing this manually)
- sencha app build which will perform all build steps and copy resources over if necessary
This is pretty straightforward and not all that time consuming. When you're making a lot of changes and need to constantly update your application to test though, it can become quite tedious and cost you the time you could be spending actually developing the application. sencha app watch is a handy new feature introduced in Sencha Cmd 4 that slipped under my radar until just recently, but I am grateful to have found it. The idea is to take all of these commands and have it all run automatically in the background whenever you make a change to your code. It works in a similar way to 'compass watch' but it watches your entire application rather than just the .scss files. The benefit of doing it this way is that everything is primed and ready waiting in the background, so the updates are applied in seconds – likely before you have time to click refresh on your browser.
It is extremely easy to use this feature, simple change into your applications directory in the command prompt and run:
sencha app watch
And that's it. You should see it run through a normal looking build process and the final line should say:
[INF] waiting for changes...
Go ahead and modify a file and save it – you should see Sencha Cmd run through another build process and again begin waiting for more changes.
If you've done something awesome or can think of anything I've missed, please leave a comment below and I'll try to write up another blog post soon!