Another Node.js sprint, covering the entire technology stack necessary to build a web application. Marcus made a great graph to show all the moving parts when a user clicks a button. Just like one of our classmates commented the other day, “only after attending this class that I begin to appreciate all the hard work needed to make a simple website work”.
Briefly, there are a client and a server.
– The client can be a laptop or a desktop.
– user –> DOM –>$–> js code (inside a js env) –> local storage –> disk
————————— js code (inside a js env) –> ajax –> network interface card —> HTTP requests
– the js env can have client MVC frameworks such as Meteor, Ember, Angular or Backbone
– URLs are either static or dynamic
– Static URLs for images tend to be offloaded to CDNs
– Dynamic URLs tends to hit RESTful endpoints
HTTP –> routers –> REST API –> js code (likely inside a MVC framework) –> ORM –> cache –> database
– ORMs such as Active Records
– cache such as memcached
For this sprint, we introduced an extra worker in addition to the traditional client-server-database 3-tier system. Workers in real life can be searching by hashtag in Twitter or getting timeline for user or data analytics workers.
We talked about service oriented architecture, where apps are broken into smaller pieces based on services. This brings modularity to the system, where as long as the interface of the module is consistent, the module itself can be completely rewritten.
The senior class presented their projects and they used all kinds of tools. Most popular ones are: Backbone, socket.io, D3. At least two teams are having problems removing zombie events in Backbone, hehe.