Showing posts with label newbie. Show all posts
Showing posts with label newbie. Show all posts

Friday, February 20, 2015

Learning Web Development Part 0 - Introduction: A Primer For Newbies

Web Development is the process of developing websites or web services. Anything that users can consume online via web browsers can be considered a part of web development.

Learning basic web development is easy.
It involves learning about 4 different parts.
1. HTML
2. Javascript
3. CSS
4. Server Technologies


A web-based system generally looks like:        Web Client <-----------> Web Server

The client may request the server using different supported protocols. Websites may be static based, or dynamic based. For a static website, all we need to know is that there is an http web server that serves static files. The files that are generally served are HTML files. You web browser is a client that requests a web server for information, and usually the server responds with html if it’s an http server.

This is the introduction post for a series of posts that will cover various aspects of web development, and lets see how in depth we can get. I will cover the basics in the initial posts, and will try to touch a bit more serious stuff later on.

My next post will include things related to basics of :

  • HTML stands of Hyper Text Mark Up Language. A markup language basically adds meta information to content. This markup may add semantic meaning to the content, or it may allow a different presentation.
  • JavaScript is a scripting language used by most of the browsers for adding enhanced experience to the webpage. Things like triggering click events, and adding fancy overlays, basically handling all events in a web page programmatically is done through JavaScript.
  • CSS stands for Cascading Style Sheets. It is used to design the page to look a certain way.

Later I will try to get into setting up simple basic webservers with various languages and frameworks.
I look forward to seeing you there ;)

Cheers!

Monday, September 8, 2014

NodeJS: A Primer For Newbies

Node.js is an excellent server side scripting application.

Node.js was created by striping the V8 javacript engine from chrome and running it as a native application. Thus you can use JavaScript just as you would use java or python or ruby.

The use of JavaScript is really cool because of a concept called platform equalization.
This means using the same language on both the server side and on the client side for data manipulation and presentation. This means that a lot of code can be reused directly, since web browsers come with JavaScript by default, and you gain by using it on the server side as well because data can directly be used with out having to convert it into a variety of formats.

JSON, or JavaScript Object Notation, is a form of serialization that is used to transfer data to and fro between server and client. It is slowly starting to replace XML, because it has a cleaner structure, takes up less characters, and directly integrates with javascript (since its javascript object notation).

JSON follows a structure of a dictionary, or key-value mappings.
eg.   {     "key1":"value1"   ,     "key2":"value2"   }


JavaScript is an asynchronous language. It runs in a single thread, but handles methods asynchronously through callback functions.

A callback function is any function that is to be executed after the completion of something. Usually in JavaScript, we have events that trigger callback functions to be executed. For example, a server waiting for a request from a client will trigger an event that a request has arrived, and will pass on the request to a callback function.
The advantage of this is that the initial method can go back to listening for requests. Thus it doesn't get blocked from executing. 

The disadvantage of JavaScript is again it's single threaded architecture. This means that any computationally intensive task will clog up the execution. Thus javascript should be used for tasks that are more in number, but less expensive, to utilize it's full potential.

For the Node.js official site: http://nodejs.org

For resources on how to start with nodejs, check the following question on StackOverflow: http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-node-js

Have fun JavaScripting!