Information Technology Reference
In-Depth Information
Figure 13-3. Viewing the compressed, obscured, and alien-like jQuery code in Adobe Dreamweaver 5.5
One might ask why we want to obscure code—after all, don't we want others to see our
neat tricks? Well, in a book like this we sure do, but in real life it can become very
important to keep a few things “close to the vest.” While obscuring code isn't going to
stop intrepid code-readers from figuring out all of your secrets (hence, don't ever rely on
obscured code to guard things like passwords, credit card numbers, nuclear launch
codes, etc.), it will stop those with a small amount of knowledge from stealing code
you've worked long and hard on just to re-use your neat transition or cool layout.
Compression Tools and Utilities
There are plenty of programs out there and available on the trusty ol' Internet to help you
make your production-ready code smaller and less hefty on your servers' and users'
resources. One of the most popular is Yahoo!'s YUI Compressor (Figure 13-4). Unlike some
other compression solutions, YUI Compressor is an application written in Java that will have
to be run on your development workstation. After running the application and giving it the
options you desire from your command line, the application will take your code, compress it
as we have discussed, and even combine your many different JavaScript or CSS files into
one super-compressed document, ready to be uploaded to your server. You can find the
YUI Compressor at http://developer.yahoo.com/yui/compressor/ .
 
Search WWH ::




Custom Search