Hacker News new | ask | show | jobs
by chubs 5601 days ago
I've always been honestly curious... why Objective-J ? Is it simply so that mac developers can start using cappucino and feel comfortable?
4 comments

Cappuccino and Objective-J will certainly be extremely comfortable for those coming from a Cocoa or GNUStep background. But even for traditional web developers, Objective-J allows you to do some extremely powerful things that just wouldn't be possible otherwise. That said, it is still a strict superset of Javascript, so any valid Javascript is still valid Objective-J, and vice versa.

You can read more about it here: http://cappuccino.org/discuss/2008/12/08/on-leaky-abstractio...

Vice versa? :-)
While I don't think that making Mac developers feel comfortable was the Cappuccino team's primary motivation, the knowledge reuse that this enables is one tremendous advantage.

Developers well versed in Mac development have years of accreted knowlege of design patterns, common mistakes, and best practices, a great swath of which apply also to Cappuccino development.

I'm not talking about trivial things like how buttons clicks trigger functionality, or how to show a dialog; those can be learned in a short time in just about any language/framework.

I mean things such as: how to do robust undo/redo involving complex object graphs, how to build performant UIs that manipulate tens or hundreds of thousands of data records, or how to design complex interfaces with dozens of windows and model-view-conroller sets that avoid tight coupling and remain reasonable to refactor and maintain over time.

Building up this type of knowledge really does tend to take months, if not years, in just about any development environment you care to name. So the fact that Cappuccino leverages the experience that you or your team already has--in addition to doing the work of providing a framework and toolkit for UI and app logic, and abstracting away the DOM--is a tremendous advantage.

This is true only for some people, obviously; it's not a benefit if you don't already have that kind of experience (although IMO cap should still be on your short list of things to evaluate for new web apps). But if you do have significant Mac development experience, and especially if you're working on a short 8 or 12 month development cycle (say some company's internal HR admin app, or something like that), it can be the difference between hitting your deadline or being months late because of an accumulation of unforeseen issues and learning experiences along the way.

So I, for one, am heartily thankful to the Cappuccino team.

As was previously mentioned, Objective-J is a strict superset of JavaScript, which means it only adds things. Basically, we took features that are repeatedly added by other JS libraries (and that we believe are really better served as language features) and made them language features. A good example of this is classical inheritance. Just about every JS framework or library implements classical inheritance in one way or another using functions. We believe its much more intuitive to just have a keyword. For a really in depth explanation of our thinking, check out this blog post:

http://cappuccino.org/discuss/2008/12/08/on-leaky-abstractio...

My experience of Objective-J is that is really makes writing large applications in (essentially) Javascript manageable. It's a fantastic asset.