
Sencha Touch 2.0 - creativityhurts
http://www.sencha.com/blog/announcing-sencha-touch-2
======
unoti
I've been using PhoneGap and JqTouch. I tried using JqueryMobile, but I had
trouble getting some things working, and found that jqTouch just worked easier
and faster for what I was trying to do.

But then I found that I'm kinda having to roll a lot of my own UI elements,
using old school CSS and Javascript. I'm combining iScroll (a javascript
scroller for touch drag scrolling). It's all very interesting and exciting,
but it certainly feels like more of a "Research" project and less of a
"Development" project, because there are no real models of how things are done
to look at. I feel like I'm constantly blazing a trail of semi-undiscovered
country.

It looks like Sencha is taking a different approach, and implementing some of
these UI elements in native code, with different implementations on different
platforms, rather than it being just a traditional DOM app?

~~~
Joeri
There's no native code. The themeing is done using different stylesheets based
on sass.

~~~
clavalle
unoti probably means 'javascript' by 'native code'. So, yes, the structure and
behavior is defined through javascript (working in tandem with the appropriate
stylesheets, of course), as opposed to defining a scaffolding of HTML and
manipulating the DOM as needed as with JQMobile.

Both are nice. Sencha Touch expects certain conventions be followed which can
be great if you don't trust your (or your team members') discipline. But it
can also be a bit full of magic if you don't know your way around the
ecosystem. Luckily the documentation is pretty great, the team is responsive
to their forums and the community is pretty engaged and helpful. Also, the
Designer is wonderful!

JQMobile is wonderful for teams that are used to more 'traditional' (read:
more server side heavy) web apps and/or know JQuery like the back of their
hand (which is many of us these days) and that can put together disciplined
code without much supervision.

I use them both and I like them both. I am looking forward to developments on
both sides.

------
raimondious
Looking at the source code of the example projects, it seems that Sencha Touch
continues to use HTML/JS/CSS as a development environment for native apps, not
to be used on the web in any other way than as mobile apps. For instance, a
search engine cannot read any content presented by a Sencha app, unlike a
jQuery Mobile app. To me, this makes their description of Sencha Touch 2.0 as
an HTML5 framework disingenuous. All attacks that have been made against Flash
for compromising the accessibility of content for a slick user interface can
be levied against Sencha Touch. Can this be avoided?

~~~
ilija139
You can pretty easily add a print page and point the search engines to that.
They use this for JsDuck - <https://github.com/senchalabs/jsduck>

------
Joeri
I'm currently working on an offline web app based on ST2. So far the
experience is positive. Since the framework is easy to add into a html5
appcache manifest, it's relatively easy to turn it into an offline app. The ui
components are very high quality. I'm also really digging the mvc architecture
with device profiles, which let you adjust your views for tablets or phones
with common models and controllers.

Ofcourse it's not a native app, and you can tell. Fidelity is the downside of
using ST2 instead of native. The upside is easier deployment (it's just a web
app), and ios, android and blackberry support from a single codebase (windows
phone is coming, but not ready yet).

------
dreamdu5t
A bloated, poorly documented, needlessly abstracted 300KB mess with slick
marketing.

Don't waste your time: Grab iScroll and roll your own mobile webapp.

~~~
ideamonk
Bloated - yes a bit. I tried doing a custom build removing classes I didn't
need manually, I could go down about 220KB and still have my app run. Similar
things can be done to the css. It would be great if their jsbuilder could also
pick and reject used/unused sencha classes to produce optimal build.

Choice of sencha touch also depends on where the majority of your user base
lives. If I've to deliver something to India, 300KB in a webapp would be
impossible given the great connectivity over phones here.

Poorly documented - well not exactly, in fact they've made a great effort to
produce useful guides. API docs let your own add comments within the docs too.

Themeing - delightful, I get great control over how my app looks. I've built a
nice abstraction atop their scss code that enables me to produce new themes
for my app with 10-15 lines of code and deliver it to new customers. Thx to
scss/compass.

Frequency of Pain in the Ass while working with it for 2+ months - very less
compared to most other frameworks.

Amount of code you write over about the 300KB - quite less, unless your UI is
completely completely different (mine is).

Integrating with your backend's APIs - smooth as silk, thanks to the awesome
data store and model classes. They've been there since 1.1. They've been there
since pre-backbone era.

Now they've got scaffolding tools to produce skeletons too, in case you were
confused about the MVC approach which was unclear for quite some time.
Studying examples helps a lot. My app has become too heavy - 20+ views, 15+
custom UI components, 8+ stores, 20+ controllers. Their MVC & the new class
system results in a very maintainable code. Though I'm in the phase of re-
architecturing my app and implement a view cache as seen in kitchen sink. I
also feel putting in many sencha classes is heavy, I plan to reduce the views
and controllers as much as possible. Our initial UI was done by a graphic
designer in photoshop, it didn't care much about sencha touch's existing
components. In turn trying to replicate the photoshop work as much as
possible, has also resulted in some slow performance (translucent backdrops,
shadows)

I'm heading on for a re-write with performance in mind. Been using sencha
touch 2 right from alphas in Nov/Dec AFAIR. It's gone through some really
sweet changes from 1.1. Kudos to sencha team for knowing what exactly their
user-base needs.

------
navs
Painfully slow on my Samsung Tab 10.1 running Android 3.2. It even crashes on
the stock browser.

Also, for some weird reason I can't view the main content on Sencha's site.
<http://dl.dropbox.com/u/2664274/SC20120307-203127.jpg>

------
phzbOx
About performance.. or more importantly "feeling", how does it compare with
native iphone app? I.e. does it have a 2 secs lag on everything that is
clicked, etc.

~~~
nickpresta
At least on Android, it "feels" fast enough. However, it breaks navigation
when you use the Back button (in the interface) and the Back button (part of
Android).

This alone, makes the app clunky.

~~~
ideamonk
Not if you use routes properly. I've been able to get the browser back and
device back button on android work right for my work.

On "feeling fast enough", let's pick a jquery mobile case, I tried
<http://www.jqmgallery.com/2012/02/11/sharksfrenzy/> on galaxy s2 (dual core,
etc) and iPhone 4s. The list (notice its translucent, and overly decorated)
scrolls like snail on the android phone. While it flows very smoothly on
iPhone 4s.

A similar list would do better than that on Android if done in Sencha Touch 2.

~~~
nickpresta
I don't experience the sluggishness on my Galaxy Nexus in Chrome Mobile Beta
(16.0.912.77). It scrolls very smooth (no lag, or jitter), although the
refresh button is a little off (square corners on the bottom).

------
evanm
Good stuff. We use ST for everything and have anxiously been awaiting this
release.

~~~
ideamonk
Yup it was a joyful evening :) We were just talking about some core issues
with our apps and poof! there comes the tweet announcing the release. They've
been rolling out updates pretty fast when you look at Beta1,2,3 and RC1,2
dates.

------
CptCodeMonkey
So far been fairly happy with SC2, my client has built a proof of concept app
that probably pushed the limits of the framework for
controllers/models/views/etc but it's still performent on most of the
iOs/apple devices.

------
krmmalik
Anyone here who has used both PhoneGap and ST? How do they compare?

~~~
whamill
They're not mutually exclusive.

I've used Sencha Touch before to provide a nice fat-finger-friendly version of
Sencha's Ext-JS user interfaces on the iPad and it's a nice framework for
providing rich UI components and also helps you segregate your UI itself into
models, views and controllers.

I've used PhoneGap to wrap web-based projects for native device access to APIs
you can't get a hold of using plain javascript or that wouldn't be exposed via
Sencha Touch - PhoneGap provides an app shell, a UIWebView to execute your web
app inside and a lot of nicely wrapped device level APIs accessible to your
javascript code.

If you just want the web app stuff, Sencha Touch is really nice but a little
heavy compared to options like jQuery Mobile so I'd use it in future for
things that are very custom-component heavy like grids and complex forms, and
for bigger applications where compartmentalisation is more important - whereas
I'd stick to something like jQuery Mobile for just mobile-friendly UI elements
like buttons and basic form controls or for a more simple app.

Sencha Touch has a bit of a learning curve compared to typical web app work,
as the entire interface is typically declared within Sencha and UI elements
instantiated and passed around, whereas with jQuery Mobile or the likes you
can get away with just making it up mostly in HTML and throwing in JS
components as and when you need them. To me, Sencha Touch is a slightly bigger
all-or-nothing approach.

PhoneGap I would use in general any time I had to get access to device level
APIs that ST v2.0 hasn't provided or anything else in bespoke native code that
can't be done within a web app.

~~~
krmmalik
Thank you for the detailed response. I really appreciate that, and it's helped
me better understand the intended purpose of these frameworks.

------
jstsch
Using ST2 for one of our apps, running within Phonegap. Performance is so-so.
No match for native. Pretty easy development though.

~~~
ilija139
You can get great performance (at least for iOS) if you develop it right.
Besides much of the performance cost is due to CSS3 and not Sencha Touch in
particular. Put $include-highlights : false in the SASS file and you'll see
the difference.

------
5vforest
I wanted to try using "The Watch List", one of the new example apps Sencha
developed, but lo and behold, "Sign in with Facebook" is the only option. When
will the madness end?

~~~
m_st
Yes I usually have the same problem. Unfortunately people like us seem to be a
minority by now...

------
petenixey
Nice work John ;)

------
patja
What is up with the use of the font "klavika-web-1" on their site for <h2>
styling? It renders pretty ugly in Chrome.

~~~
tvon
Looks okay here (in both Safari and Chrome on OSX):

<http://civicit.com/~tvon/sencha-heading-font.png>

