top | item 935210

Just One File with Cappuccino 0.8

75 points| sant0sk1 | 16 years ago |cappuccino.org | reply

23 comments

order
[+] milestinsley|16 years ago|reply
This is the sort of fantastically elegant solution, to a tricky problem, that we have come to expect from 280North and Cappuccino.

The killer feature here is that "you won’t have to change a single line of code". I love how seamless this is to implement! Oh, and that the images are sent as encoded text - pure awesome.

[+] pohl|16 years ago|reply
This sounds exactly like the ImageBundle feature in GWT: automatic spriting, no configuration files, works on IE6 and above... it's a great feature.
[+] boucher|16 years ago|reply
I believe the GWT thing requires you to specifically create a bundle subclass, and put all the image files in that bundle (as methods with or without annotations). Please correct me if I'm wrong.
[+] gcv|16 years ago|reply
Very cool, but Base64 encoding produces results rather larger than the original image binaries, no? I guess the benefits outweigh the drawbacks?
[+] milestinsley|16 years ago|reply
Yes, that's true. I think, generally speaking, base64 encoded images will result in more bytes than the original. I guess it's probably around 10%-20%.

I think, in the case of spriting, it would be fair to say that the overhead of loading many images/http requests (and their individual headers) pretty much nullifies the effects of bloating from the encoding.

[+] zefhous|16 years ago|reply
I don't see this as a problem since this is for user interface elements. Pictures and larger graphics probably wouldn't be a part of this and would be handled separately.
[+] mcav|16 years ago|reply
I wonder how they're handling caching.
[+] boucher|16 years ago|reply
Typical cappuccino apps are cached all at once with far future expires. Simply changing the URL (in an automated way) is enough to break the cache for new versions.

The caching tradeoff is there for any spriting technique, it will always be a tradeoff between reducing HTTP requests and increasing caching granularity.

[+] jobenjo|16 years ago|reply
Any way I can do this in Django? (Or--how hard is this to do by hand?). Seems really promising.
[+] mnemonik|16 years ago|reply
Someone asked a similar question in the comments and this is the reply he got:

The code is all part of Objective-J and the tools, which don't require the framework itself. You could always use those in your project without using Cappuccino.

[+] delano|16 years ago|reply
Is "Just One File" a reference to Ministry?