Sproutcore 1.6 or 2.0

405 Views Asked by At

I'd like to start developing a new project using sproutcore. Since 2.0 seems quite different to 1.6 and there are already three betas out (and so I expect and RC soon?) I wonder if it'd be a good decision to start directly with sproutcore 2.0 intead of 1.6.

The sproutcore app will be backed by a rails app which exposes a rest json api.

3

There are 3 best solutions below

0
On BEST ANSWER

Sproutcore 1.x and 2.x are indeed targeting different types of applications. So, the decision to choose 1.x or 2.x mainly boils down to the question which application type you are going to develop.

Choose 1.x if you need a set of predefined components, e.g. if you plan to develop an internal CRUD-like application. You might use the new template-based approach in some places but your main application will be composed with predefined components. SC 1.x clearly targets desktop-like applications.

On the other hand if you plan to build the next twitter or github or stackoverflow, you should use SC 2. It's easier to embed into webpages and you are in control over the complete layout, html and css but it is clearly more work to do in regards to html/css. If you've to implement your own design it's probably easier with SC2 because you are in full control. If you've already profund jQuery knowledge you can use this with SC2, it's no problem to combine the two, in fact since SC2 fully builds upon jQuery it's already included ... where SC 1.x only uses a special stripped down embedded jQuery version. If you plan to use certain plugins this might be a problem.

The programming model for your model and controller parts is nearly the same and it is very easy to transfer those parts from SC 1.x to 2 (and vice versa), the main difference is the view part.

1
On

I have to partially disagree with the above comment. The goal of the SproutCore framework is to help create near native user experiences using the web technology stack. That goal has not changed from 1.x to 2.x. What has changed is that SC 2 was built from the ground up to be modular (and thus lighter weight... important for mobile apps) and to allow developers to more easily integrate with other frameworks and tools they've already invested in or may want to use in the future.

Yes designing the view layer of a 1.x and 2.x app are in most ways completely different but implying that you shouldn't or couldn't use SC 2 to create desktop-style applications or that SC 2 is only for creating web-style apps like Twitter and Stack Overflow is just not a correct assumption to make. Just about all of the apps we create at my company are desktop-style apps and we've been using SC 2 with builds of either jQuery UI or Twitter-Bootstrap for controls, theming, and layout support for months now. We've actually found that the apps we create in SC 2 are more feature rich with less development effort than with 1.x since the amount of already built controls that can easily integrate with SC 2 is massive (we haven't found a jQuery plugin that couldn't work with SC 2 yet).

My recommendation, just use SC 2. Don't even bother with 1.x.

1
On

Ok, seems Sproutcore 2.0 is now called Amber.js because of all the confusion:

http://yehudakatz.com/2011/12/08/announcing-amber-js