Microsoft MVP - Orchard CMS Developer

RSS Twitter Google+

Orchard Web Developer - David Hayden

I develop exceptional websites based on Orchard CMS. I create Orchard Themes, custom Orchard Modules and Widgets, and convert WordPress and HTML Templates to Orchard Themes.


Contact Me: david@sarasota.me

Tweets
Quick tip on using WorkContext.CurrentTheme and Html.ThemePath in Orchard CMS. http://t.co/9M8c4ke9 #orchardcms
JetBrains released dotPeek 1.0, their Free .NET decompiler and assembly browser. http://t.co/O65OqcLQ
Amazon Web Services now supports SQL Server and .NET Applications. http://t.co/nNZSd9Z9
After many hours of KoA and Skyrim, I need to find a new RPG for me and the kids. Thinking an older one - Dragon Age: Origins.
Orchard 1.4.1 Released! Download: http://t.co/KDphWq7U Blog Post: http://t.co/MnVvVhHh #orchardcms
Donating my remaining 103 .NET and Software Development books to local public library today. Hope they make a difference!

JavaScript Web Applications Book Review

I had the pleasure of reading a copy of JavaScript Web Applications by Alex MacCaw from O'Reilly over the summer while it was still in early release. Even in early release form the book was an absolute joy to read. The book not only discusses techniques and patterns for developing web applications using the popular MVC pattern, but it discusses techniques for building your own JavaScript MVC Library, common JavaScript pitfalls and how to avoid them, and popular JavaScript MVC Libraries like Spine.js, Backbone.js, and JavaScriptMVC.

JavaScript Web Applications Book Review

From the Creator of Spine.js

I first found out about JavaScript Web Applications via twitter from Alex MacCaw. I started following Alex on Twitter soon after I adopted Spine.js as my JavaScript MVC Library of choice. Alex is the creator of Spine.js and in amidst all his tweets on traveling, Spine.js, and CSS, he mentioned he was writing a book. As I started reading the first few chapters of JavaScript Web Applications I started seeing a lot of the code, techniques, and patterns that shaped Spine.js. Although I think the Spine.js documentation is excellent, reading similar code, patterns, and techniques independent from Spine.js and in a purely architectural and strategic perspective was refreshing and enlightening. The fact that Alex kept the book focused on JavaScript MVC patterns and did not use the book to sell or market Spine.js is a huge deal. Spine.js gets the same, and possibly even less, attention than backbone.js and JavaScriptMVC in the book.

The Book Review

JavaScript Web Applications starts out with a bang. If you are hoping for a primer or introduction to JavaScript, you won't get it. In fact JavaScript Web Applications warns you up front that you should be comfortable with JavaScript before going any further and recommends JavaScript: The Good Parts or another book to learn JavaScript. It immediately dives into the MVC Pattern as a way to better organize your JavaScript Web Applications and how to create re-usable "classes" in JavaScript as the foundation for Models, Controllers and other objects you will use in your application. The wise would pay attention and re-read this chapter for complete understanding as it dives into object-oriented JavaScript and class inheritance using Prototype that will be key to understanding the later chapters.

After Chapter 1 you get 1 more foundation chapter on Events and Observing. Because your Controllers will be responding to events from the views and your models and controllers will be publishing and subscribing their own custom events, it is critical to understand how events are triggered, canceled, delegated, and how context ( *this* ) works with events. The book will start to discuss proxies which are used quite a bit to maintain proper context with events in JavaScript MVC Libraries like Spine.js, Backbone.js, etc.

After that you're just neck deep into MVC. JavaScript Web Applications dives into creating Models, Views, and Controllers to build web applications. You learn how to extend Models using modules and other common patterns for extending classes similar to Ruby Mixins. One great example here is the development of O/R Mapper Module(s) that can be used to either target HTML5 Local Storage or AJAX to communicate to a web server for your data repository. You'll start to dive into routing, view templating with jQuery Templates, and other techniques for wiring up your JavaScript MVC Web Application.

Once you've learned JavaScript MVC you learn how to manage, maintain and deploy applications. This part is not so much about development, but using tools, libraries, and techniques to move your application into the real world with proper dependency managment, testing and debugging, performance optimization, etc. Various libraries, concepts, and standards are mentioned like CommonJS, Yabble, RequireJS, LABjs, Node.js, Socket.IO, QUnit, Jasmine, CDNs, Gzip, etc. If you are not familiar with these techniques, libraries and concepts you'll get a nice introduction to them as well as the problems they solve.

Last, and maybe where those new to JavaScript MVC may want to start reading, is a tour of 3 popular JavaScript MVC Libraries: Spine.js, Backbone.js, and JavaScriptMVC. As mentioned above, Spine.js was built by Alex and you'll see how Spine.js uses the techniques mentioned throughout the book. The chapter walks you through snippets of what it would take to create a Task Manager, but at the end you can download and run a contact manager application written in Spine. The book walks through a similar introduction to Backbone.js ( and its famous ToDo Sample ) and JavaScriptMVC. For more code goodness, you can find a number of examples on the web for Spine.js, Backbone.js and JavaScriptMVC. Again, if you are completely new to JavaScript MVC and how you can use it to build web applications, you may want to read the chapters on Spine.js, Backbone.js, and JavaScript MVC first before you start to read from the beginning of the book. It may provide you more context to those initial "gettting-started" chapters.

Who's This Book For?

This book is for people who want to move away from jQuery and JavaScript spaghetti code. It's for those that want to add structure, common patterns and best practices to shape their JavaScript web applications. It's for those who have an interest and desire to take advantage of object-oriented JavaScript and prototypal inheritance in their applications and need a step in the right direction. And, it's obviously for those interested in building JavaScript Web Applications using MVC and popular libraries like Spine.js, Backbone.js, and JavaScriptMVC.

If you do not have a solid background in JavaScript, you will probably want to take the author's advice and read a good book on JavaScript before reading this book. It assumes an intermediate knowledge of JavaScript and does not provide a primer or introduction. The book does provide a primer on jQuery and information on CSS at the end of the book, but that's not going to help you much with the JavaScript concepts leveraged in the book.

Highly Recommended

I highly recommend JavaScript Web Applications if you fit the profile mentioned above. It's a whirlwind tour of not only the theory behind developing JavaScript MVC web applications, but it contains a lot of enlightening code, examples, and strategies to move you from theory to execution. The walkthrough and comparison of Spine.js, Backbone.js, and JavaScriptMVC will provide you a nice introduction to those popular libraries, the problems they solve, and their similarities and differences for building JavaScript Web Applications.

JavaScript Web Application is available today!

TOP! © Copyright Sarasota.me
FOLLOW ME:
TWITTER