JavaScript Web Applications
Author: Alex MacCaw
Publisher: O'Reilly
Pages: 280
ISBN: 978-1449303518
Aimed at: Proficient JavaScript developers
Rating: 4
Pros: Tackles a difficult topic
Cons: Niche and not necessarily the right way to tackle it
Reviewed by: Ian Elliot

This book has an intriguing subtitle - Guide to Moving State to the Client. What does this imply?

Author: Alex MacCaw
Publisher: O'Reilly
Pages: 280
ISBN: 978-1449303518
Aimed at: Proficient JavaScript developers
Rating: 4
Pros: Tackles a difficult topic
Cons: Niche and not necessarily the right way to tackle it
Reviewed by: Ian Elliot

This book has an intriguing subtitle - Guide to Moving State to the Client. This is a idea I can sign up to if only to reduce the load on the server and make all those lazy clients do something for their living.

The book is also jQuery based and promotes the MVC model at the right way to do things. While I like jQuery and approve of its use I am not so convinced about MVC in this context. Neither am I convinced by the authors all too common attempt to make JavaScript fit into the traditional class based programming style. This is an attempt to make JavaScript look more like Java complete with class like definitions and inheritance. JavaScript doesn't do strong typing so what the point of imposing a class structure on it is I'm not sure. Given that inheritance isn't well thought of in by many practicing programmers why struggle to implement it in JavaScript where it isn't needed. Of course you may not agree and welcome forcing of the language to fit in with the standard paradigm.


Banner

 

The book opens with a look at MVC and the imposition of a class system on JavaScript. Although the author attempt to explain things simply at first he very quickly forgets that many readers aren't used to the amazing things that JavaScript can be coaxed into doing. Chapter 1 is a mini-overview of advanced JavaScript and many will find it far too difficult to follow because it just isn't explained.

From here we move on to an implementation of an event handling system. Then on to the MVC components Models and data including JSON and JSONP as inputs to an ORM. Next we look at controllers and state and then views and templating.Chapter 9 looks at dependency management using the Common.js module approach.

From this point on the book looks at many more basic tasks. Chapter 7 is about working with files including the jQuery drag and drop file uploader. Chapter 8 is on web sockets, chapter 9 is on testing and debugging and chapter 10 is on deployment - caching, minification, CDNs etc.

The final three chapters are on the Spine library, the Backbone library and the JavaScriptMVC library all of which make implementing a class based MVC app much easier.

This is a difficult book to review because for the right reader it will be an interesting read. Even if you don't agree with many of the convoluted ways of achieving results you will find much to exercise the brain and a lot of examples you can use to discover more about how you think things should be done. However, it is important that you don't simply read and accept what is said as being best practice and the only way to do things. Many, if not all, of the ideas are simply imports of the standard class based way of working and they often struggle to make JavaScript behave like Java or C#.

There are also some practical problems in that the book doesn't pay too much attention to the problems of having to support a range of browsers. It is all very well to assume that all browsers support HTML5 features, but in practice they don't. Turning the ideas described into something practical is going to take a lot of work. Again, it could be that a simpler overall design might make this easier.

Don't even bother considering this book if you aren't reasonably good at JavaScript programming. This isn't for the beginner and ideally you need to be a bit of an expert. Finally the biggest problem with this book is that it doesn't give you any help to become a JavaScript expert - you either figure out how things work on your own or you don't.

An enjoyable book for the advanced JavaScript programmer.


Banner


Killer ChatGPT Prompts (Wiley)

Author: Guy Hart-Davis
Publisher: Wiley
Pages: 240
ISBN: 978-1394225255
Print: 1394225253
ASIN: B0CF3WFTWM
Audience: Everyone
Rating: 5
Reviewer: Ian Stirk

This book aims to get optimal answers to your questions from ChatGPT, how does it fare? 



WordPress Plugin Development, 2nd Ed

Author: Brad Williams, Justin Tadlock, John James Jacoby
Publisher: Wrox
Pages: 480
ISBN: 978-1119666943
Print: 1119666945
Kindle: B0899MW9CP
Audience: WordPress developers
Rating: 4.5
Reviewer: Kay Ewbank

The authors of this book are well-known in the WordPress world, with more than 100 published plug [ ... ]


More Reviews

Last Updated ( Wednesday, 26 October 2011 )