background preloader

Blogs

Facebook Twitter

Learning JavaScript Design Patterns. Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language. One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve.

Design patterns also provide us a common vocabulary to describe solutions. This can be significantly simpler than describing syntax and semantics when we're attempting to convey a way of structuring a solution in code form to others. In this book we will explore applying both classical and modern design patterns to the JavaScript programming language. Target Audience This book is targeted at professional developers wishing to improve their knowledge of design patterns and how they can be applied to the JavaScript programming language.

Acknowledgments Credits Reading We already use patterns everyday. Building Single Page Applications With jQuery’s Best Friends. Hey guys.

Building Single Page Applications With jQuery’s Best Friends

Today we’re going to take a look at how you can build a single-page application (SPA) supporting graceful degradation using some of jQuery’s Best friends; DocumentCloud’s Backbone.js, Underscore.js, LAB.js and jQuery templating to name but a few. Alex Sexton has been giving a great presentation highlighting these tools in few recent conferences and I thought it would be useful to write up a tutorial to compliment their use. The SPA application we’ll be building today is a three-level bookmarkable image gallery. Before we get started, please feel free to check out the demo below or download the sources for the tutorial. Building Large-Scale jQuery Applications. Today we're going to look at the end-to-end tools and options you have for building large-scale enterprise jQuery applications.

Building Large-Scale jQuery Applications

Although jQuery is an excellent JavaScript library and provides a well-designed set of tools for development, it's focus on staying compact and making the DOM easy to use has meant that it doesn't provide a significant infrastructure for building large-scale apps. jQuery does however normalize things across browsers and serves as a great way of doing DOM manipulation. Using it to it's strengths, you can select some excellent tools to use along-side it as a toolkit for your larger-scale app development.

Some developers have argued in the past that building RIAs using Dojo, MooTools or YUI may be more suitable for large-scale JavaScript applications than simply opting for jQuery, however, I believe you can implement a solution using it that is equally as good without too much extra effort. 1. Options: 2. MVC With JavaScript & jQuery How does the MVC Pattern work? 3. Building JavaScript Web Apps With MVC & Spine.js. JavaScript developers wishing to add more structure to their code often look for simple ways to apply the popular MVC architecture pattern to their applications.

Building JavaScript Web Apps With MVC & Spine.js

Utilizing a client-side MVC framework can be useful for such code organization and today we’ll be looking at Spine.js, a recently released solution that assists with this task. You may be familiar with some existing projects that provide a similar solution – for example Justin Meyer’s JavascriptMVC – which is perfect for larger projects (and addresses more concerns), SproutCore, Rebecca Murphey’s dojo MVC template and Jeremy Ashkenas's Backbone.js – a worthy solution to achieving this for small to middleweight projects, in particular when creating SPAs (single-page applications). I've been quite an avid fan of JMVC and Backbone for quite some time and for any developers that have yet to try Backbone out, I recommend it or new alternative Spine.js, which we'll be looking at in more detail today. An Introduction to Spine.js. Get that job at Google. I've been meaning to write up some tips on interviewing at Google for a good long time now.

Get that job at Google

I keep putting it off, though, because it's going to make you mad. Probably. For some statistical definition of "you", it's very likely to upset you. Why? Because... well, here, I wrote a little ditty about it: Hey man, I don't know that stuffStevey's talking abooooooutIf my boss thinks it's importantI'm gonna get fiiiiiiiiiiredOooh yeah baaaby baaaay-beeeeee.... I didn't realize this was such a typical reaction back when I first started writing about interviewing, way back at other companies. See, it goes like this: Me: blah blah blah, I like asking question X in interviews, blah blah blah... You: Question X? Me: So in conclusion, blah blah... huh? You: Aaaaaaauuuggh!!! Me: That's it. It doesn't matter what X is, either. And then nobody actually does anything, because we're all afraid of getting stabbed violently by People Who Don't Know X. Caveats and Disclaimers This blog is not endorsed by Google.

Coding Horror.