Multiple devices, multiple environments, and the Web has to work across all of it. Responsive Web design offers a saner path through the maze.
If you can make it work on mobile, you’re that much closer to presenting it everywhere. Mobile first is the place to start.
As developers create ever more intricate interfaces for the front-end, build tools have become a key solution to the challenges of cross-compatibility. Managing them, however, brings its own challenges.
Programmers adding data to documents rarely create the entire document any more. Templates make it much easier for designers to figure out the structure and the look, and for programmers to fill in the blanks.
Angular and React take very different approaches to building Web apps, but from the outside they both look like frameworks. Figuring out what’s in which box will help you make choices you can live with for the long term.
Angular does so many things for you and with you. Start your projects with a broad orientation.
The Model-View-Controller (MVC) paradigm dominates development, but every framework uses it a bit differently. Whether you’ve used MVC before or not, it’s best to get Angular’s perspective.
Angular includes a huge library of components and directives, but you’ll use a few of them constantly.
Angular provides the logic, but not the formatting. If you’re looking for a framework to help with formatting, Bootstrap can be an excellent complement to Angular.
Controllers are at the core of Angular logic, but they’re easy to tangle when you mix different needs in an app. Start with these best practices, and it will be easier to keep things thin and smooth.
As you develop more complicated Angular applications, you’ll need to move logic away from controllers to keep them thin. Services give you a clean on-demand way to handle a wide variety of program needs.
Is React for you? Smaller and simpler can be great, but React also (deliberately) does much less than its competitors. Take a tour and decide if React fits your needs.
Components are at the core of React development. Mastering basic component development is the key first step into applying React effectively.
Do your components work the way you expected? Unit tests can help you establish a baseline for monitoring what works and what doesn’t, giving you the confidence you need to put code into production.
While React’s primary mission is on the front end, you may want to move it to the server side to handle situations where bandwidth or processing power are limited, or to create a faster initial load.
React handles views, but you need more than React to establish a fully functioning and communicating application. The Flux pattern offers a clear path for managing data flow through your React-based applications.
Your front-end looks awesome, and it does everything. But does it work well beyond a local desktop? Developing for performance will force you to make some different decisions.
Simon St. Laurent is Senior Editor at O’Reilly Media, Inc., focusing primarily on JavaScript and Web-related projects. He is co-chair of the Fluent conference. He’s authored or co-authored books including Introducing Elixir, Introducing Erlang, Learning Rails 3, XML Pocket Reference, 3rd, XML: A Primer, and Cookies. You can find more of his writing on technology, Quakerism, and the Town of Dryden at simonstl.com.