The View-User Interaction

Last modified: 12-29-2014

In this chapter, we’ll look at the View layer. This layer handles user interface as well as user interaction. That is, every webpage user can see and interact with. We’ll first review html, css and javascript here. Then, we’ll start from that, to see how to implement complex functionalities of a website.

HTML, CSS, Javascript

HTML, CSS, Javascript are languages used to construct the three core components in modern web pages.

  • HTML is the “language” used to describe the structure and content of a web page.
  • CSS is a style sheet language used for describing the look and formatting of a document written in a markup language, such as HTML.
  • Javascript, when used on View, is used to program the dynamic behaviors of web pages, such as “what happen when the user click this button”; or render contents beyond the representation capability of HTML and CSS, such as 2D & 3D animations.

There’re many fantastic tutorials where you can learn the basic syntax and usage of these three “hammers”.

Note: when learning javascript, I suggest you first understand the syntax and basic usage; then when you go to the part about how to use javascript to manipulate DOM(html elements in web page), you can also learn how to use jQuery, which provides a much nicer interface for selecting and do operations on DOM

  • W3Schools: HTML, CSS. Great tutorials to help you understand the basic. The jQuery tutorial is also very helpful
  • Mozilla Developer Guide: Pretty detailed and comprehensive introductions
  • Here is another tutorial for HTML, with more detailed text explanations
  • Codecademy is also a good resource. It provides really good programming interface for practising

You probably don’t want to go through all of the tutorials above, because you don’t need to. Neither do you need to completely go through any one of them. Different people have different ways of learning things. The way I see it, you just need to know the basics to move forward, and you’ll have a deeper understanding of these basic things and learn more complex things during the rest of this chapter as well as the finishing the assignments. Of course, my approach might not fit you, you have your way of learning. But if you haven’t tried this way, you might want to give it a shot and see if it’s suitable for you.