4 ms·
First off, congrats to the team. Has anyone on HN used the framework extensively to give an opinion and compare experiences with other frameworks?
by locnguyen 17y ago
First off, congrats to the team. Has anyone on HN used the framework extensively to give an opinion and compare experiences with other frameworks?
- joubert 17y agoI started using it to build our app's web UI. Really like it, but because of maturity switched over to Flex for the time being.
- tumult 17y agoI'm using it for my current project, currently ~6k semicolons. Stream of thought time! Forgive the sloppy writing, which will be full of interjections. Obj-J is more verbose than regular JavaScript. More use of objects and method selectors than callback functions. I usually prefer callbacks to delegate objects. It's easy to just make a catch-all object and use that with an anonymous function if you'd rather not specify a class for something that requires a delegate method, though it's not idiomatic Cappuccino/Cocoa. Cappuccino is almost identical to Cocoa. If you have experience with Cocoa you can just switch off the part of your brain that wonders how you should be doing something and just do it like you would have with Cocoa, and it'll just work, as they say. Not terribly exciting, but it works – and frighteningly well. I spent over a month working on my app, testing exclusively in WebKit and Firefox. Lots of what would be called advanced behavior "for a browser app" (but nothing that would be called advanced for a desktop app from 5 years ago) and making it work in IE required just a few tweaks, most of which were unrelated to Cappuccino (comet longpolling library I was using, Orbited.) Good stuff: Awesome, responsive, feels-right GUI stuff. Can't break objects by clicking and dragging around. No weird jumping around behavior. Stuff doesn't get dislodged, misaligned, etc. Don't have to work with the DOM. At all. This is a huge deal if you have a background in desktop GUI stuff – if all you've ever used is the DOM you have no idea what you're missing. It's pretty terrible for anything except vertically scrolling pages of text. Working with the DOM was like having someone beat on your shins with a baseball bat. "No I want the box to go there. There! THERE! ARGHOSOIJSD" Built-in serialization for Cappuccino classes. Canvas/vector abstractions. GUI building in Apple's Interface Builder. IE, WebKit, Opera, Firefox all work from the same code without apologies. Much more finessed event handling. Bad stuff: Awful debugging. Worse than regular JS debugging. Usually can't even easily tell what line a syntax error is on. Still has tons of stupid JS problems – implicit globals, type coercion everywhere (with JS primitives), slow as molasses. About a 10% performance hit on tight loops if you use Obj-J message sending in them. Mostly non-existent documentation. Still in rapid development, things change a lot. If you don't already know how to use Cocoa, expect to be totally lost. Other stuff: Has its own event loop. Allows for more flexibility than only DOM events, but it might cause problems if you use other JS code that uses events. Building Cappuccino in Linux had a few hiccups, but I got it working (they were related to Ruby 1.9.) Just Works in OS X without any tweaking necessary. Best reason to use it: Cocoa is not perfect by any measure, but we know it works for GUI apps. Cappuccino is like Cocoa; it works. A lot of effort has gone into Cappuccino. Behind the scenes, a lot is going on to maintain the transparent layer of browser compatibility that you get to work with. There are warts and issues, but you can absolutely build something with it right now and it will work.
- antonovka 17y agoSome comments; I'm focusing on the negatives below, but I'll note that Cappuccino is a truly fantastic idea and exactly what web development should be. Obj-J is more verbose than regular JavaScript. More use of objects and method selectors than callback functions. I usually prefer callbacks to delegate objects. It's easy to just make a catch-all object and use that with an anonymous function if you'd rather not specify a class for something that requires a delegate method, though it's not idiomatic Cappuccino/Cocoa. I have to agree here -- delegates are a really poor replacement for closures, which is one thing JS can do pretty well. Delegates are definitely idiomatic Objective-C (although, Obj-C now has blocks), but it'd be nice if the standard libraries embraced closures. Awful debugging. Worse than regular JS debugging. Usually can't even easily tell what line a syntax error is on. I found this to be an enormous issue, especially due to the fact that without a compiler, I tended to have stupid type errors cropping up that took way too long to debug. Mostly non-existent documentation. Still in rapid development, things change a lot. If you don't already know how to use Cocoa, expect to be totally lost. The lack of stable releases, a clean binary installation (don't clutter up my system), proper documentation, et al, makes the project fairly difficult to approach -- especially without a type-checking compiler and poor debugging support. It's a bit of a moving target if you're going to try and use it, and there's a lot of gotchas that will require you to go to the source to figure them out.
- boucher 17y agoNot sure what you mean by lack of stable releases. Are you saying that the releases are not stable, or that the release schedule is not stable? I believe our releases have been fairly solid, but I do admit they don't follow any predictable schedule. We'd like that to change, but there are higher priority problems for us at the moment. We also do offer a clean installer. First, all of cappuccino works without installing anything. It's self contained in a single app folder. Second, the tools all come bundled in one installer, which puts files wherever you like, defaulting to /usr/local/share/objj. We ship the documentation with the same download. And as for the type-checking compiler part, we actually have an experimental type-checking runtime available on github. Improvements are, as always welcome. But not having a type-checking compiler is certainly par for the course in the JavaScript world, so I don't quite see how it counts against Cappuccino. All that being said, yes it is young, yes it is a moving target, and yes there's a lot of work left to be done.
- koenbok 17y agoWe (madebysofa.com) are using it for an upcoming product. The most important lessons we learned are: - We can really bring near-desktop-class-user-experience to the web, and that's amazing. - Cocoa programmers pick it up fast. In our case a week or so, and one more for all the tools around it (press, nib2cib). - Some stuff is missing/broken in the framework, but you can look at the source and fix it! We're not used to that with regular Cocoa where we have to basically guess what is happening inside.