-
Notifications
You must be signed in to change notification settings - Fork 0
Patterns
Collection of patterns/approaches/recipes for Cappuccino.
In many cases you can find what you want by looking through cocoadev.com. Cappuccino “CP” classes will tend to be very similar to Cocoa “NS” classes.
Cocoadev resource:
http://cocoadev.com/index.pl?NSURLConnection
From #cappuccino,
cratuki: Pilky: An example of something I was thinking about was communication
between UI and the server. I’d guess that this doesn’t really relate to cocoa – is
that fair? But for many things, maybe we could just link to stuff on cocoadev.
Pilky: communication between a “UI” and a server is pretty easy in cocoa
Pilky: it’s pretty much what one of my apps does (though it does cache it)
Pilky: just look up anything to do with NSURLConnection
Pilky: from what I understand, if you treat the Obj-J app as a desktop app
communicating with a web server then it should work fine
Thread about using CPUrlConnection and CPJSObjectCreateFromJSON
There are two great options for working with Rails as a back-end:
This feels like a natural fit and is something to look into. http://couchdb.apache.org
Geoffrey Grosenbach (topfunky) has started a class for directly interacting with CouchDB.
If you want to have some update run only on the next iteration of the runloop, you can add it by sending a performSelector:target:argument:order:modes:
message to the current runloop. If you use some kind of ‘dirty’ flag you can easily make sure it only runs as often as needed.
Note that a new iteration of the runloop doesn’t mean anything as far as the browsers builtin detection for unresponsive scripts is concerned so if you are running into unresponsive script errors, this technique will not fix them.