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.

If you would like to learn the concepts, techniques and JavaScript technologies presented in this book by doing interactive quizzes and working on practice projects with the guidance of a coach, then you should enrol in the introductory online course (book parts 1-3) or in the advanced online course (book parts 4-5) offered by our partner developer-competence.com.

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 language that allows 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.

  3. It's the only language that allows executing the same code (e.g., for constraint validation) on the back-end and the front-end (this is sometimes called "isomorphic" or "universal" JavaScript).

  4. 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.

  5. It combines object-oriented with functional programming.

  6. Its dynamism allows various forms of meta-programming, which means it gives you the liberty to program your own programming concepts like classes and enumerations.