12.07.2015 Views

Pro JavaScript for Web Apps pdf - EBook Free Download

Pro JavaScript for Web Apps pdf - EBook Free Download

Pro JavaScript for Web Apps pdf - EBook Free Download

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 2 GETTING STARTEDSummaryAs I mentioned at the start of this chapter, the techniques I used in these examples are simple, reliable,and entirely suited to small web apps. There is nothing intrinsically wrong with using these approachesif the app is so small that there can never be any issue about maintaining it because every aspect of itsbehavior is immediately obvious to a programmer.However, if you are reading this book, you want to go further and create web apps that are large, arecomplex, and have many moving parts. And when applied to such web apps, these techniques createsome fundamental problems. The underlying issue is that the different aspects of the web app are allmixed together. The application data (the products and the basket), the presentation of that data (theHTML elements), and the interactions between them (the <strong>JavaScript</strong> events and handler functions) aredistributed throughout the document. This makes it hard to add additional data, extend thefunctionality, or fix bugs without introducing errors.In the chapters that follow, I show you how to apply heavy-duty techniques from the world ofserver-side development to the web app. Client-side development has been the poor cousin of serversidework <strong>for</strong> many years, but as browsers become more capable (and as web app programmers becomemore ambitious), we can no longer pretend that the client side is anything other than a full-fledgedplat<strong>for</strong>m in its own right. It is time to take web app development seriously, and in the chapters thatfollow, I show you how to create a solid, robust, and scalable foundation <strong>for</strong> your web app.45www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!