JavaScript Application Design: A Build First Approach
introduces JavaScript developers to techniques that will improve the
quality of their software as well as their web development workflow.
You'll begin by learning how to establish build processes that are
appropriate for JavaScript-driven development. Then, you'll walk through
best practices for productive day-to-day development, like running
tasks when your code changes, deploying applications with a single
command, and monitoring the state of your application once it's in
production.
ABOUT THE BOOK
The fate of most applications is often sealed before a single line of
code has been written. How is that possible? Simply, bad design assures
bad results. Good design and effective processes are the foundation on
which maintainable applications are built, scaled, and improved. For
JavaScript developers, this means discovering the tooling, modern
libraries, and architectural patterns that enable those improvements.
JavaScript Application Design: A Build First Approach
introduces techniques to improve software quality and development
workflow. You'll begin by learning how to establish processes designed
to optimize the quality of your work. You'll execute tasks whenever your
code changes, run tests on every commit, and deploy in an automated
fashion. Then you'll focus on designing modular components and composing
them together to build robust applications.
This book assumes readers understand the basics of JavaScript.
WHAT'S INSIDE
- Automated development, testing, and deployment processes
- JavaScript fundamentals and modularity best practices
- Modular, maintainable, and well-tested applications
- Master asynchronous flows, embrace MVC, and design a REST API
ABOUT THE AUTHOR
Nicolas Bevacqua is a freelance developer with a focus on
modular JavaScript, build processes, and sharp design. He maintains a
blog at ponyfoo.com.
contents
foreword
preface
acknowledgments
about this book
about the author
about the cover illustration
Part 1 Build processes
- 1 Introduction to Build First
- 1.1 When things go wrong
- 1.2 Planning ahead with Build First
- 1.3 Build processes
- 1.4 Handling application complexity and design
- 1.5 Diving into Build First
- 1.6 Summary
- 2 Composing build tasks and flows
- 2.1 Introducing Grunt
- 2.2 Preprocessing and static asset optimization
- 2.3 Setting up code integrity
- 2.4 Writing your first build task
- 2.5 Case study: database tasks
- 2.6 Summary
- 3 Mastering environments and the development workflow
- 3.1 Application environments
- 3.2 Configuring environments
- 3.3 Automating tedious first-time setup tasks
- 3.4 Working in continuous development
- 3.5 Summary
- 4 Release, deployment, and monitoring
- 4.1 Releasing your application
- 4.2 Predeployment operations
- 4.3 Deploying to Heroku
- 4.4 Continuous integration
- 4.5 Monitoring and diagnostics
- 4.6 Summary
Part 2 Managing complexity
- 5 Embracing modularity and dependency management
- 5.1 Working with code encapsulation
- 5.2 JavaScript modules
- 5.3 Using dependency management
- 5.4 Understanding package management
- 5.5 Harmony: a glimpse of ECMAScript 6
- 5.6 Summary
- 6 Understanding asynchronous flow control methods in JavaScript
- 6.1 Using callbacks
- 6.2 Using the async library
- 6.3 Making Promises
- 6.4 Understanding events
- 6.5 Glimpse of the future: ES6 generators
- 6.6 Summary
- 7 Leveraging the Model-View-Controller
- 7.1 jQuery isn’t enough
- 7.2 Model-View-Controller in JavaScript
- 7.3 Introduction to Backbone
- 7.4 Case study: the shopping list
- 7.5 Backbone and Rendr: server/client shared rendering
- 7.6 Summary
- 8 Testing JavaScript components
- 8.1 JavaScript testing crash course
- 8.2 Testing in the browser
- 8.3 Case study: unit testing the MVC shopping list
- 8.4 Automating Tape tests
- 8.5 Integration, visual, and performance testing
- 8.6 Summary
- 9 REST API design and layered service architectures
- 9.1 Avoiding API design pitfalls
- 9.2 Learning REST API design
- 9.3 Implementing layered service architectures
- 9.4 Consuming a REST API on the client side
- 9.5 Summary
-
-
- appendix A: Modules in Node.js
- appendix B: Introduction to Grunt
- appendix C: Picking your build tool
- appendix D: JavaScript code quality guide
-
index