In C type languages, such as C, C++, Java and C#, whether the curly brace starts on the same line or on a new line is basically a matter of convention.
However, until recently I have been mainly involved writing “server-side” Visual Basic or C# code in the ASP.NET Web Forms model. In that model, when a user clicks a button (or hyperlink) on a web page or makes a selection in a drop-down control this invariably results in a post back to the server which responds to the client-side action, and then completely refreshes the page.
One of Reacts strengths is that it is NOT an MVC or MVVM framework. These frameworks can get quite slow when there are a lot of complex updates being made to the underlying models. The frameworks are continuously monitoring for changes and one change to one component can lead to hundreds or thousands of changes to other objects, and the frameworks are continuously updating the DOM to visualize the changes.
Up until a few years ago, at DNN Corp we had primarily been using jQuery to do that manipulation. Don’t get me wrong jQuery is an awesome framework, but jQuery directly manipulates the DOM - there is no concept of working with models/objects in jQuery – i.e. separating your presentation aspects from your other logic.
Its been a while since I posted a blog in my Knockout series. In the last couple of posts in this series we reviewed how Knockout implements the concept of Observable Arrays. Observable Arrays support the idea of detecting when objects are added and removed from the array. For a complete solution though we actually will want the array to contain observable objects so we can also detect when changes are made to each item.