What every webdeveloper should know
From my own experiences and conversations with friends I know what questions have been made in an interview. These are by which the future employer is trying to measure the capacity of the applicants.
The trend is worrying. I met a lot of people who have lamp or any similar environment on their machines, have installed Joomla once, and they think that now they’ll earn big money from web development.
I try to protect the reputation of the profession and give you a picture of what is to be known besides the simplicity of “Install-Next-Next-Next-Finish”, should someone decide to take on this career path.
In the descriptions there will be parts where I assume some existing knowledge. My goal is that anyone, who has some level to safely move around in the world of computers, but would like to become webdeveloper, will know where to begin and what has to be read and learned.
The descriptions are based on personal opinion, there is no company or comittee behind them, such as by RFCs or Webstandards, so everything presented here are my collection of “good to know”.
By the end of the series, it will be clear to everyone what all the pieces in the picture above are, and also why are they needed. Besides, everyone will be able to enumerate the communication between machines on the indicator lines, according to the order of the conversation.
Here, we briefly run through the details, from the facts towards the opinion.
DNS – computer phone book
As the Neumann-based computers work with numbers, after you type the url the first step is to convert it into numbers. These numbers are assigned to each computer on the Internet, it can be said that they function like the phone number.
At the beginning of the Internet – formelry known as Arpanet – all the names and addresses were stored in a single file, what anyone could download for use. This solution, however, after a number of connected computers on the networking is becoming untenable.
The first specification of DNS was created in 1983, still goes under continuous updates in case new technologies and new demands emerge. One of the best examples of this is the introduction of IPv6, for which DNS specification had to change.
Getting a name-address pair can get us in touch with more than just one DNS server, as a potential overload protection for distributed systems is to create duplications. No computer knows all the domain names and their corresponding addresses.
The structure is divided into zones according to the names, and only one server is responsible for the correct data in its zone. They can also store data for other zones temporarily, for a well defined amount of time.
The domain names should be read from right to left according to the hierarchy of increasing detail from broad towards more specific. The .hu is for example the zone for all the domain names registered in Hungary.
For frequently visited pages the browser can skip the request to a DNS server, as the address is known and the entry has not expired.
The results for querying the mikoandras.hu. domain name – as of this writing:
kms@localhost:~$ host mikoandras.hu. mikoandras.hu abdominal addresses 126.96.36.199
The browser should sent the requested URL to this address, and then wait for a response.
This record is not the only entry in the DNS, and not only one record exists. I will gather later what a DNS record can hold and do, and so a DNS server can as well.
The communication between the two hosts is only the actual traffic, to compile headers and the message body is another step.
Each request begins with the method / resource / versions form, followed by the additional headers:
GET / HTTP/1.1 wp-content/uploads/2012/09/www_load_members-300x201.jpg Host: mikoandras.hu Connection: close User-Agent: Mozilla/5.0 (compatible; Windows NT 5.1, but, rv: 1.9) Gecko/2008052906 Firefox/3.0 Accept-Charset: ISO-8859-1, UTF-8, q = 0.7, *, q = 0.7 Cache-Control: no-cache Accept-Language: de, en, q = 0.7, en-us; q = 0.3
In the above request, the browser wants to receive the imagefrom the mikoandras.hu server, which closes the connection after the service, as there is no need for persistence.
In the response the first line of the reply is in version / status code / reasoning form, which may vary depending on the situation. If you’ve got the picture, the answer is as follows:
HTTP/1.1 200 OK Server: Apache Date: Sat, 28 Sep 2012 10:05:56 GMT Content-type: image / jpg Pragma: no-cache Connection: close
You then receive the image in the body of the response.
Each file – html, css, images, flash, … – requested from a server gets received by the client starting with this conversation. The ethics of discussion on both sides – client and servers – must be known, and should be kept.
Fortunately, all known web server were written in this spirit, and you don’t have to worry about any of that.
The biggest regret of browser developers is, however, that the communication is way more elaborate, and includes several branches, and the number of the status codes is not half a dozen.
First and only job is to serve incoming requests. They run as a service and wait on a specified port for incoming requests.
PORT: communication endpoint accessing computer applications or services.
They are responsible for serving the correct files to the client. This can be done with immediate service, but – especially in case of dynamic pages – post processing service as well.
This means that the images, style sheets, static html pages are simply copied from the source files into the communication channel, the files written in code language, however, once compiled, and the instructions given are carried out, only the result will be sent back, not the file itself.
Languages used on the Web
What are dynamic websites?
The websites that modify displayed content in respect for input information, are called a dynamic website (my own definition of the term).
This information can be input through one of the headers sent by the browser:
Accept-Language: de, en, q = 0.7, en-us; q = 0.3
In this case, for example, the user’s preferred language content can be displayed so that the user does not have to select anything.
This is just a small part of the potential. The processing may include other state-dependent change management – for example, web stores monitor the contents of the basket – data selection for the actual date – or even half a dozen pre-programmed random messages require the use of a programming language.
These possibilities are only a few, and there are more or less widely used languages on the web. The hosting companies usually use some version of PHP programming language, besides that I have to name python programming language and Ruby on Rails programming language, which is perhaps the winner of the youngest one title.
UPDATE: Vasó has brought to my attention, that perl also allows for a great deal of neat tricks, so it is worthy of mentioning.
Where cgi-scripts are allowed to run, there may c also be included. Thanks to Microsoft we have websites written in ASP programming language – those are mostly found in intranet pages, because it can be strongly interconnected with the corporate systems through Internet Explorer. The Java patrons are not left out of the line, with Java Server Pages (JSP) they can also find themselfs within the ever growing crowd of web-developers.
In the second part databases, trace possibilities and other three subjects will be discussed.
Pages: 1 2