O'Reilly logo

Web App Testing Using Knockout.JS by Roberto Messora

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Idiomatic JavaScript patterns

Every programming language has its own idiomatic patterns. They are design patterns that can be expressed using the specific characteristics and syntax of that programming language.

Our objective is to write good code, which can be tested in the simplest possible way. If we learn how to effectively use JavaScript, we can write clean code and avoid a certain number of additional tests.

There are two idiomatic patterns that are very important in our scenario. We will extensively use them throughout all the My Todo solution:

  • Constructor functions
  • Module pattern

Obviously, there are many other patterns and techniques that are extremely useful, for example, Asynchronous Module Definition (AMD) and Dependency Injection (DI

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required