Foreword

Table of Contents

1. Why is JavaScript a Good Choice for Building Web Apps?
2. Run the Apps and Get Their Code

This tutorial book shows how to build front-end web applications with plain JavaScript, not using any (third-party) framework or library. It follows a "learning by doing" approach, which means that you don't have to read lots of text about the intricacies of JavaScript (like in many JavaScript programming books), but rather you just focus on the essential parts of JavaScript and only read the minimum needed for starting to code your first app. By learning from the examples provided in the book, you can quickly improve your understanding of basic concepts and techniques, and by downloading the complete code of these example apps and using it as a starting point for your own projects, you learn best practices and experience the joy of building something that really works and that you fully understand.

1. Why is JavaScript a Good Choice for Building Web Apps?

Today, JavaScript is not just a programming language, but rather a platform, which offers many advantages over other platforms:

  1. It's the only language that enjoys native support in web browsers.

  2. It's the only universal language that allows

    1. building web apps with just one programming language; all other languages (like Java and C#) can only be used on the back-end and need to be combined with front-end JavaScript, so developers need to master at least two programming languages.

    2. executing the same code (e.g., for constraint validation) on the back-end and the front-end.

  3. It's the only language that allows dynamic distribution, that is, executing the same code (e.g., for business computations) either in the back-end or the front-end, depending on run-time conditions such as the available front-end resources.

  4. It combines object-oriented with functional programming.

  5. Its dynamism allows various forms of meta-programming, which means it enables developers to program their own programming concepts, like classes and enumerations.