SPA Design and Architecture teaches you the design and development skills you need to create SPAs. Includes an overview of MV* frameworks, unit testing, routing, layout management, data access, pub/sub, and client-side task automation. This book is full of easy-to-follow examples you can apply to the library or framework of your choice.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
The next step in the development of web-based software, single-page web applications deliver the sleekness and fluidity of a native desktop application in a browser. If you're ready to make the leap from traditional web applications to SPAs, but don't know where to begin, this book will get you going.
About the Book
SPA Design and Architecture teaches you the design and development skills you need to create SPAs. You'll start with an introduction to the SPA model and see how it builds on the standard approach using linked pages. The author guides you through the practical issues of building an SPA, including an overview of MV* frameworks, unit testing, routing, layout management, data access, pub/sub, and client-side task automation. This book is full of easy-to-follow examples you can apply to the library or framework of your choice.
What's Inside
About the Reader
This book assumes you are a web developer and know JavaScript basics.
About the Author
Emmit Scott is a senior software engineer and architect with experience building large-scale, web-based applications.
Emmit Scott is a senior software engineer and architect from Charlotte, North Carolina with over 18 years of experience in creating large-scale, web-based applications. He has an MBA with an emphasis in the management of information systems and is the author of SPA Design and Architecture: Understanding Single Page Web Applications and editor/co-author of Designing Scalable JavaScript Applications.
When he's not programming, he enjoys reading, playing the guitar (was a head banger back in the day), and spending as much time as possible with his children.
A single-page application (SPA) is a style of browser-based application that differs from traditional web applications in that the entire user interface is provided by a single navigable page, rather than as a set of pages which are fetched, on demand, from the server. This approach enables browser-based applications to provide a user experience which is close to that of native applications.
This book covers a variety of topics related to the design and implementation of SPA’s and is structured into two distinct parts. The first part of the book consists of three chapters which provide the necessary background for the technically more substantial second part. Some prior knowledge of web applications and underlying technologies, such as HTTP, HTML, and JavaScript is assumed.
An introductory chapter describes the motivation behind SPA’s as well as their general structure, characteristics and advantages. Since an SPA provides a complete user interface, it is to be expected that layered design and implementation approaches, which separate presentation from data, should form a fundamental part of the discussion.
The author considers model view controller (MVC) and other related approaches, which are generalised as “MV*”, as well as outlining the MV* implementations of three popular JavaScript frameworks, namely AngularJS, backbone.js and knockout.js. The final chapter of the three chapter introductory section discusses the need for modularity in implementing SPA’s and describes a number of techniques that implement modules in JavaScript.
Having laid down the groundwork in section one, the second section of the book goes into detail regarding the design, implementation and testing of SPA’s. This includes a detailed discussion of techniques for navigating SPA’s through client-side routing, as well as communication both between components within the SPA and between the SPA and a server. The second section of the book concludes with a chapter on tools and techniques that may be used to unit test SPA’s.
This book contains a substantial amount of detailed information. Short illustrative working examples are used throughout and the source code for each chapter is available for download from the publisher’s web site. There is a great emphasis on practical learning and each chapter concludes with a “Chapter Challenge” that encourages the reader to explore the material further. There is also an appendix which gives a detailed explanation of a simple example implemented in each of the three frameworks.
One small observation is that with a book that is primarily focussed on JavaScript, it’s not clear why in the section on client/server communication the author chose to implement the server in Java rather than, for example, as a node.js application. Nonetheless, this is an engaging and highly readable book which should be of interest to anyone interested in modern web application development.