Thursday, June 19, 2014

Day 29: Node and intro to express

This morning kicked off with a lecture about node.js. They broke down how it's different than other types of servers. Servers like Apache are multi-threaded and eat thread takes care of one client request. Node on the other hand is single-threaded but it's asynchronous.

A good (high-level) analogy is:
Node is a restaurant where there is only one waiter. That waiter takes your order and gives it to the kitchen and proceeds to take the next tables order and whenever the food is ready he will give it to you.

Other servers that are not asynchronous are restaurants where a server takes your order and gives it to the kitchen and waits in the kitchen until the food is ready and get it to you. Each waiter can only serve one table at a time, therefore they have multiple waiters (hence multi-threaded).

Once again node is something that seems so abstract but once you boil it down and it's explained to you, it becomes much easier to understand.


This week we've been doing something pretty cool: Student-led talks. A lot of my classmates are from diverse backgrounds. Yesterday we had a mini presentation on freelance work, where we ran through how to establish your credibility in the freelance realm and how you should be doing business with clients.

Today we had a presentation from a classmate with a Computer Science background. He gave a slide show on assembly/machine language and how computers work on an extremely low-level.


If you can zoom in a little, you can see code that most people have never seen in their life. It's the code that speaks to the CPU telling it how it should store information in the RAM. I became extremely thankful for the advancement in computer technology so that I don't have to write low-level languages.


After working on learning node for about 5 hours, I needed to take a break but I still wanted to do some sort of coding so I decided to fork one my classmates project and add some tweaks to it.


He already had the basic functionality down but the layout looked like it needed some work. So I centered the program in the window and made the layout more appealing. I have a feeling this will be an ongoing project that we'll be working on when we're bored throughout our time at the Dojo and even beyond. haha.

You can find the current version of the www.comfroels.com.


After messing around with this it was time to get back on track. Up next was the Express framework, which is simply a framework that makes it easier to use node on a more structured level. It's not an MVC framework but we'll get to it once we integrate the other two components of the MEAN stack. Another 12 hours logged in today!



No comments:

Post a Comment