September 2011 - Posts

Introduction

Serving files from a website is easy just link to them and you're done.
Serving files from your website in the most optimal way isn't that easy, first you have to think about things like making sure that the caching is right and if the files are being used a lot on other sites.

If files are being used a lot on other sites then it could be that the user already has a copy of this file lying around, let's say you use jQuery on your site. You're not the only one using this library there are a lot of other websites that are using this library which means that the people coming to your site might already have jQuery running, to make sure these people don't need to get yet another copy of jQuery this can be

The advantages

Localized delivery: people in America will get it from local servers and so will people from Europe or Asia

Cached delivery: people who already have gotten the CDN version of that library won't need to download it again.

It's free: it actually costs your server a bit of time to handle the requests, it also costs you a bit of bandwidth it costs you nothing to use a CDN.

The players

Google Libraries which has:

Chrome Frame
Dojo
Ext Core
jQuery
jQuery UI
MooTools
Prototype
script_aculo_us
SWFObject
Yahoo! User Interface Library (YUI)
WebFont Loader

Microsoft Ajax Content Delivery Network has:

ASP.NET Ajax 
jQuery  
jQuery UI  
    jQuery Validation
    jQuery Mobile
    jQuery Templates
    jQuery Cycle
    Modernizr
    Ajax Control Toolkit 
    ASP.NET MVC 

CDN JS has even more libraries out there which the other ones don't have examples:
coffee-script
json2
less.js
require.js

Exceptions

There are a couple of reasons not to use a CDN in specific circumstances.

Local applications hosted on a network: it's always good in these cases to use local files because you don't need the internet to run this application.

When combining compressing your JavaScript files: if you have a lot of JavaScript files then it is best practice to combine and minify these files in some cases this can render better results than using a CDN.

Conclusion

It's almost always good to use a CDN, above is a list of CDN's which are widely used and reliable so there is no excuse not to use these.

 

 

 

 

 

 

 

 

with no comments
Filed under: ,

I just read:  Version Control by Example

It's a free printed book which can be shipped to your home for free by filling out a page full of questions. 
If you want the details on how to get it shipped to your home or have any questions about it find out the details here.

Quick review of the book:

Introduction

The book gives you a quick intro about version control systems, it tells you about the history of version control systems and how they got here. 

What the different commands are for the version control systems and how they work in the specific version control systems examined in the book. 

It then goes into how you can use the different version control systems through the command line interface, so that you can see the differences on how to handle increasingly complex situations. 
The version control systems it gives the examples for are:

- Subversion
- Mercurial
- Git 
- Veracity (SourceGears product) 

There is also a bit about the differences between DVCS and CVCS, distributed version control systems and centralized version control systems. 

My Opinions 

I really like the way the book looks, it's pretty so it leaves a good first impression. 

In talking about the differences between DVCS and CVCS I think it goes a long way to take away a bit of the fear surrounding DVCS.

By focusing on the command line clients of the different VCS systems you're looking at the basics which are great because it gives you the feeling of actually knowing what you're doing. 
The reality for a developer like me working with VCS is someone not working with command line clients but mostly using IDE  / Explorer integration to get the job done.  
So the quality of integration and the tooling available around the VCS'es becomes very important to the way I use VCS, still not talking about this makes perfect sense to me because the tooling landscape is very adaptive and will change over time and the VCS which is on top now can easily be on the bottom when the next generation comes.

The book has quite a bit of depth where it is needed, but it also manages to keeps it short and simple in the examples.

There is a bit of humor in the book, I like it and it keeps the book from getting a bit dry.

Conclusion

The book does its job in educating about VCS and also providing a reference.

Nowhere in the book does it come over as a too much of a sales pitch for the product that the writer has created which is a very impressive thing because of the bias one has when talking about the product that he has created.

So go get it, it's free :)

Disclaimer

I'm not associated with SourceGear in any way.