SproutCore vs Cappuccino

Besides the differences in Javascript and Objective-J languages, what are the benefits of Cappuccino for SproutCore and vice versa in your experience?

In terms of long-term forecasting, is SproutCore more “supported” than Cappuccino because it is supported by Apple?

I am trying to choose between them. I am familiar with JavaScript and Objective-C.

+46
javascript model-view-controller sproutcore cappuccino objective-j
Nov 26 '10 at 19:10
source share
5 answers

This is an interesting question that quite often pops up to different groups of messages, twitter and even IRC. There are several ways to evaluate SproutCore and Cappuccino, but perhaps some of the immediate considerations that people watch are as follows:

1) Their respective feature set 2) Ease of use
3) Support and community documentation

Let's look at the first point - the corresponding set of functions. Under the "feature set" there are several ways to look at it. From the number of user interface widgets; fundamental support for connecting things and communicating with some kind of appearance; a skeleton general architectural approach, although not necessarily a “feature”, but still important; and, yes, even a language that you can use.

Regarding the language, I find it important that you do not reject what is used (JS vs Obj-J). What for? Due to acceptance and where you came from. SproutCore came from the point of view that JavaScript is indeed the language of the Internet, so you use it for programming against the framework. In cases where JavaScript lacks completeness in the OO language (proper inheritance of the object object, etc.), this is compensated within the framework (for example, MyApp.Foo = SC.Object.extend ({...})). Cappuccino comes from a different angle. They use Obj-J as a major language improvement for JS to implement language features not found in JS; it is instead of introducing these language functions directly into the structure (Cappuccino). Of course, as people at Cappuccino have already pointed out, you can still use JS to program directly with Cappuccino, but then you miss out on what Obj-J provides. Pay attention to the Cappuccino community: Please correct me if I am wrong :-). Finally, if you are already familiar with Obj-C, then Obj-J may be more than your cup of tea. Hey, even Sony, apparently, is now jumping on the entire winner of Obj-C to evolve against his mobile platform: -P.

Looking at the architecture of the two frameworks, they both looked at the structure of Apple Cocoa for guidance / inspiration in one form or another. Cappuccino took Cocoa to heart and basically ported the Cocoas API. Again, if you intend to develop applications with Apple using Cocoa, then you will probably feel right at home. SproutCore, on the other hand, took inspiration from Cocoa, where he felt good. As far as pure architecture is concerned, they both follow MVC, they both use Cocoa-style bindings, they both have a data storage mechanism, and both have their own visualization and layout style for widget / user interface views.

Presentation is a special area of ​​importance for me. Both structures have some level abstraction to remove you from interacting directly with CSS and HTML, although in the end they should display what the web browser ultimately understands.

On the Cappuccino side, they completely abstract CSS and HTML from you. Instead, you use the framework of various rendering primitives to "draw" your views. Because of this level of abstraction, Cappuccino may use a better rendering approach rather than linking you to some extent with CSS and HTML.

As for SproutCore, you are closer to the metal, so to speak. When you perform pure rendering of a view, you use a rendering context object that provides a certain degree of abstraction, but ultimately you directly embed the HTML and add class names to apply CSS. Even after your view has been displayed, and you want to manipulate certain parts of the view based on the event, you can directly access the DOM elements and manage their properties. Depending on where you came from, this may sound good or bad. Good for those who are used to working with CSS and HTML, and as more direct control over how views are rendered and styled. It’s bad if you want to generally render the view in order to use the best rendering approach based on what the browser allows (HTML / CSS, SVG, HTML5 canvas, etc.). But note that there are plans for the future to make SproutCore a more abstract way of rendering, but still let you work directly with HTML and CSS if you want to. Thus, you will end up with the best of both worlds.

Now, as for the stock widget / widget views, which includes two frames: they both have a lot of options to get you started. Buttons, tags, lists, segmented views, switches, scrollers, etc. - they are all there. Therefore, we can say with confidence that everything is in order in both camps.

Going back, let's discuss ease of use. For me, ease of use is based on your own personal experience with JavaScript, HTML, Obj-C, Cocoa, other MVC frameworks, documentation, and community support. If you've never worked with Cocoa, or never built a decktop or iPad app, it's fair to say that you will have a bit of a learning curve, no matter which structure you choose. This, as they say, what you do not know and want to know can be obtained through each structure corresponding to the community and documents. Both have active communities in one way or another, so you won’t stay in the cold if you get stuck somewhere. Regarding the documents, Cappuccino admittedly has the upper hand. There are not enough documents for SproutCore, but the code base is at least fully commented. The SproutCore community is fully aware of the documents that need updating, and this is currently under review, so keep checking.

Finally, you mentioned the long-term forecast for the two structures. It is well known that Motorola bought the Cappuccino platform, so you certainly have a big company that supports its growth and longevity, or at least it looks like that now. As for Apple and SproutCore, I personally cannot speak for them, but Apple does not own this card. There are many companies and different people who all use and contribute to the framework. This may cause some people and companies to pause or discomfort for those who are looking at SproutCore because of the more organic nature of the framework development, but I don't see a problem in this. I feel that both structures will work for a long time, especially now, when they are looking more at developing next-generation desktop and iPad applications using open source frameworks. And, hey, the competition between the frameworks is good - it keeps everyone on its fingers :-).

We hope that this information will help you make your decision!

Greetings

Mike

+65
Nov 26 '10 at
source share
— -

I would like to touch on comments made about lens-j Michael.

You won’t lose anything if you switch to JavaScript instead of lens-j. In all reality, this distinction is difficult to make, especially in cases where we have free bridge classes (more on this in more detail).

Objective-j is actually just a thin shell over js. It provides classical inheritance, which is traditionally implemented as a language function, which sproutcore implements as a structure function, it also provides code import, access generation, static binding and nil messaging support.

Objective-j instance variables are accessible through the traditional point syntax if you want ... I like to think of it this way: as soon as you start writing a method, you basically write JavaScript. That is, loops, variables, functions, closures, etc. is just javascript. You don’t lose anything by going down, just like a language is designed.

We take one more step: the “free bridge” of some of our classes CPDate, CPArray, CPException, CPString and, possibly, more, which I cannot remember. Toll free bridging just means that CPArray IS is a native js array, and js native array is a CPArray, so you can use the methods and functions of both worlds interchangeably.

So, for example, one could do:

var foo = []; [foo addObject:"bar"]; foo.push("2nd push"); var value = foo[0]; var value2 = [foo objectAtIndex:0]; alert(value === value2); //true 

As you can see, I use object-j syntax and js syntax together ... You can imagine the power, if that.

The last thing I want to release is just to make sure there is no confusion: target-j is parsed in the browser. It does not need to be compiled in advance (although we provide compilation tools when you are ready to deploy your application).

I think that some people use lens-j uselessly, as if it’s some kind of monstrous beast that takes time to learn, and although lens-j adds a lot of good js functions to actually learn them, actually will not take over most of the day if you are already familiar with object-oriented programming, and obviously if you are going with cocoa, you can jump straight.

+16
Dec 02 '10 at 7:12
source share

I wrote a blog post specifically about "cappuccino vs. sproutcore". This is not a technical comparison, but a comparison of other interesting data.

http://elii.info/2010/11/cappuccino-vs-sproutcore/

+4
Nov 29 '10 at 10:52
source share

On the Cappuccino website:

“At the other end of existing frameworks, there are technologies like SproutCore. Although SproutCore is similar to Cappuccino’s goals, it takes a different approach. It still relies on HTML, CSS, JavaScript, Prototype and a completely new and unique set of APIs, as well as special software development software and a cumbersome compilation step, which we believe is the wrong approach.

With Cappuccino you do not need to know HTML. You will never write a CSS string. You never interact with the DOM. We only ask developers to learn one Objective-J technology and one set of APIs. In addition, these technologies are implementations of well-known and well-understood existing ones. Developers can use decades of collaborative experience to truly accelerate the pace of building rich web applications. "

So, it seems that Cappuccino does not / need any build tools and completely abstracts the browser from the developer. If you get build tools in Sproutcore (for example, a development server), and the developer should know what the DOM is.

+3
Nov 26 '10 at 20:08
source share

Michael Coens almost completely covered everything because he was extremely detailed.

I struggled with a solution in the last 3 weeks. I read everything on the Internet about both frameworks, and I wrote a lot of initial samples with both and still can not make a decision. The following problems forced me to move from one framework to another and continue to make my decision tougher.

  • Sproutcore has a better api datastore than one cappuccino.

  • Sproutcore uses bindings better than cappuccino. Cappuccino also has kvc / kvo support, but the bindings are not yet complete. For example, in sproutcore you can implement incremental loading with bindings and ArrayController is very easy, where, on the other hand, in cappuccino it is not so simple. Of course, cappuccino offers a CPTableView DataStore api, which is pretty clean and can achieve similar results, rather than with bindings. Its that cocoa was executed before the master data. Bindings are constantly processed in cappuccino though.

  • Cappuccino has the best api performance according to my personal taste. Although I'm used to developing html and DOM, I prefer the idea of ​​completely abstracting the DOM and getting rid of css.

  • One important issue for me is the lack of a good TableView in sproutcore. SC.TableView is currently in alpha and does not work at all. I do not know the timeline for the table in sproutcore. I tried asking for the channel sproutcore irc, but did not get a satisfactory answer. Cappuccino, on the other hand, has an excellent and optimized table look.

  • I found more real world cappuccino apps than sproutcore. There is also a pretty nice full-blown app that is provided by cappuccino as an initial example and is very useful. Check out http://githubissues.heroku.com/ .

Although I have no experience with objective-c and prefer pure js syntax, I will probably go with cappuccino to my current project and hope that sproutcore will come out with a better table view in the future.

+3
Nov 27 '10 at 1:01
source share



All Articles