a work on process

Viewing posts tagged: jquery

Reviewing The Definitive Guide To Django a few months ago I noted that the key place that book lacked was in examples. As befits the work of the creators of a framework, it did very well at explaining the underlying philosophies and working through all manner of implementation details, but it wasn’t the book for those who just want to dive in and build something. If that’s how you like to use technical books, then Learning Website Development With Django may be more what you’re looking for.

Following the iterative development of a delicious/digg hybrid social bookmarking application, Ayman Hourieh’s book moves quickly through a range of Django features, from setting up your initial models, and using the built in user and admin sections, to supporting AJAX with jQuery, speeding up your app with caching and (briefly) writing automated tests. The pace is fairly measured and Ayman Hourieh does a good job of explaining what’s going on at each step. An experienced web developer should find most of the information they need to get up and running with django, ready to get to work on their own apps.

Perhaps appropriately, where this book is lacking is in explaining how the different parts of the framework fit together. There’s plenty you can pick up by inference, but there are no detailed explanations of, say, the routing system that maps URLs to code. This book’s weaknesses are the former volumes strengths, and while you’ll find much repeated between them a combination of the two is likely to be a good way to get a fully rounded sense of what django is and how you can use it.

Disclaimer: I was sent a copy of this book for review by the publisher. You can find it at packt, amazon US, amazon UK and all sorts of other places.

Recommend this post:

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

 

Project Launch: New Greenbelt website

13 April 2008 (9:14 am)

By James Stewart
Filed under: Notes
Tagged: , , , , , , , , , ,

One of the numerous projects I’ve been juggling over the past few months has been a redesign of the Greenbelt Festival website. That redesign went live late last night.

Working from Wilf’s designs I initially built new HTML and CSS templates and began to establish some rules for how we’d handle the new image management requirements for a site that is now very photo-heavy. When it came time to apply the new designs to the CMS, however, it became apparent that there was a much bigger job ahead.

That CMS (a bundle of custom PHP that I had inherited) has grown over time and within some quite onerous server configuration constraints to a point where it was due a significant overhaul. Sticking with PHP was a fixed requirement as we’re relying on various APIs and a server architecture that wouldn’t be happy with me shifting to, say, rails, but already having the problem domain mapped out and the opportunity to radically simplify a few things meant I got to enjoy the feeling of stripping out a lot of code without impairing functionality.

One note that Derek Sivers made in his controversial blog entry last year about switching from Rails to PHP was that working with Rails had made him a better PHP developer. I’ve found a similar effect. I have no intention of leaving the world of Rails (I still prefer it by orders of magnitude), but tackling projects like this in PHP are a reminder that working for a while with really good tools is likely to encourage you to seek out best practice in whatever environment you end up in.

Ruby developers who occasionally work on PHP projects as I do may be interested to note that we are using capistrano for deployment, and I intend to use rspec for some testing. I’ll try to write that up once it’s in place.

With a refreshed CMS, new templates, and some standardisation of our many javascript files on top of a jquery foundation, Paul, Greenbelt’s was able to manage the photos and copy to turn that new look into a vibrant and content-rich new site. You can see a few notes he wrote about the redesign on the site.

There’s still a fair way to go. I’ve got a lot of tests to write in order to make it easier for us to make further changes, and various aspects of the site are more than ready for a more fundamental rethink that will let the festival open up its archives better, but all concerned are very pleased to present the fruit of our labours.

Recommend this post:

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

 

As a rails developer most of my experience with javascript libraries has been with prototype and scriptaculous, but I’ve never been quite happy with them. The helper methods built into ActionView make simple tasks a breeze, and I’ve played with the UJS plugin to improve the separation of content and behaviour, but even then the weight of the libraries and the comparable simplicty of tasks like iteration offered by jQuery has always made the grass over there look quite a bit greener.

So when Karl told me that he and Jonathan Chaffer were working on a book about jQuery and offered to send me a copy that seemed like the perfect opportunity to begin making the switch. (that comment should be taken as a disclaimer, by the way.) In the end the timing was fortuitous as I’ve ended up working on a couple of drupal projects (jQuery is included with drupal from version 5 onwards) and having to integrate some jQuery code into a rails project, so I’ve needed to take the lessons learned from the book and quickly put them into practice.

The book takes a gradual pace, introducing the library, and how it handles selectors, events and effects, before moving into DOM manipulation, AJAX and handling forms. Standardistas will be pleased that there is a strong emphasis on progressive enhancement, always starting with pages that achieve their basic intent and then using jQuery to improve the user experience. The authors place considerable emphasis on the importance of providing all users with a solid basic experience and show how jQuery makes it very easy to do so.

More experienced javascript developers may find the pace of the book a little slow (and might prefer to look out for the companion reference volume). The core audience is likely to be those who may have dabbled with the odd snippet, or perhaps used tools that generated javascript for them, but want a step-by-step tutorial that shows how to use jQuery to do things cleanly while building general understanding. Nevertheless, the coverage of more advanced topics like closures is solid and a good reminder even for the more experienced developer.

There were a couple of areas that could have done with a little more exposition, such as the fairly cursory coverage of the difference between GET and POST in HTTP requests (being a purist, I was really looking for mention of PUT and DELETE too), and the fact that without more work one of the shopping cart examples could leave the user thinking their updates had been saved when there was no mechanism to actually make the updates on the server-side. That said, hopefully by that point in the book most readers will be alert to such things and know that the examples are not necessarily production code.

If you’re looking to consolidate your javascript skills and like the look of jQuery, or, like me, you find that sometimes sitting down and reading a book is the best way to familiarise yourself with something, Learning jQuery is well worth your time and money. You can find it at packt, amazon US, amazon UK and all sorts of other places.

Recommend this post:

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

 

Learning jQuery

17 October 2006 (11:11 am)

By James Stewart
Filed under: Notes
Tagged: ,

jQuery keeps picking up speed. The lightweight (but with its plugins, apparently not feature light) javascript library is to be included in the next version of drupal and there appears to be some effort to provide rails helpers that will use jQuery rather than prototype.

That project will probably need to provide a drop-in replacement to convert me. Rails makes prototype use so very easy. But if it does, I’m sure I’ll be making use of my friend Karl’s recently announced Learning jQuery blog, which seems a great source of tutorials.

Recommend this post:

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]