Notices
Notice: Exam Form BE IV/II & BAR V/II (Back) for 2076 Magh
Routine: BE IV/II & BAR V/II - 2076 Magh
Result: BCE I/II exam held on 2076 Bhadra
Result: All (except BCE & BEI) I/II exam held on 2076 Bhadra
Notice: Exam Center for Barrier Exam (2076 Poush), 1st Part
View All
View Old Questions
Computer Engineering(BCT)
Electrical Engineering(BEL)
Electronics and Communication(BEX)
View All
View Syllabus
Computer Engineering(BCT)
Electrical Engineering(BEL)
Electronics and Communication(BEX)
View All

Notes of Internet and Intranet [CT 754]

HTTP and Web Services

 

HTTP, Web Servers and Web Access

Working of HTTP

- HTTP is a connection less protocol.
- The client initiate the connection by sending a HTTP request to the server via a URL.
- HTTP uses Uniform Resource Identifier (URI) to locate the resource and to establish the connection.

The processes involved when a URL is entered in the web browser is given below:
1. The browser first connects to the domain name server of the respective domain provided in the URL and retrieves corresponding IP address of the web server.
2. The web browser connects to the web server and sends a HTTP request for the desired web page.
3. On receiving the request by the web server, it checks for the desired web page. If the page is found, it is send as a response to the web browser. Otherwise, 404 Page Not Found error is forwarded by the server to the browser.
4. The web browser receives the web page and then the connection is broken.
5. The browser parses the pages.
6. For each additional elements like images, applets and so on, it follows HTTP connection, request and response steps.
7. When all the content is loaded, the complete page is displayed in the web browser.


HTTP Message

- HTTP messages are categorized into two types. They are as follows:
1. HTTP Request message
2. HTTP Response message.

- Both type of messages consist of following parts:
1. Start line
2. Zero or more header fields followed by CRLF
3. An empty line
4. Optional message body


HTTP Request

1. Request Line
- It is a start line used by the HTTP request message.
- It is of given format:

                     Method   Request-URI   HTTP-Version   CRLF            


- Request method indicates the method to be used on the resource identified from the provided request line. It should always be specified in Uppercase letter.
- Request-URI indicates which resource is being requested.

 

2. Request Header Field
- It allows the web clients to pass additional information about the request to the web server.
- It is used based on the requirements.

3. Empty Line
- It is the line which does not contain any data.
- It indicates the end of header fields.

Example

           GET /note HTTP/1.1
           Host : www.egnitenotes.com
           Accept-Language : en-us

 


HTTP Response

1. Status Line or Start Line
- It consists of the protocol version followed by a numeric code and its associated text phrase.
- The protocol version indicates the version of HTTP supported.
- Status code indicates the status of the response.

2. Response Header Field
- It allows the server to pass some additional information about the response to the web client.

Example

      HTTP/1.1   200   OK
      Date : Mon, 21 Aug 2017  12:30:24 GMT
      Server : Apache/2.2.14
      Content-Length : 88
      Content-Type : text/html
      Connection : Closed

 

      < html >
             < body >
                    < h1 > This is note page < / h1 >
             < / body >
       < / html >

 


HTTP Methods

1. GET
- It is used to retrieve information from the server using a URI.
- It has no effect on the data except data retrieval.
- The server response contains status line, header, empty line and message body.

2. HEAD
- It is also used to retrieve information from the server using a URI.
- The server response contains status line and header only.

3. POST
- It is used to send some data to the server.
- The data includes form data, file upload and so on.
- The server response contains status line, header, empty line and message body.
- The message body contains the page that is to be redirected after the data update.

4. PUT
- It is used to request the server to store the included entity body at a location specified by the given URI.

5. DELETE
- It is used to request the server to delete a file at a location specified by the given URI.
- It deletes the specified URL.

6. CONNECT
- It is used by the client to establish a network connection to a web server over HTTP.

7. TRACE
- It is used to provide the content of the request message to the web client.
- It is used as a debugging tool.

8. OPTIONS
- It is used to find out the HTTP Methods and other options supported by the web server.


Universal Naming with URLs

- URL stands for Universal Resource Locator.
- It is a reference to a web resource that specifies its location in the network and helps to retrieve the resource.
- The general syntax of a HTTP URL is given below:

           scheme:[//[user[:password]@]host[:port]] [/path] [?query] [#fragment]

 


WWW Technology: HTML, DHTML, WML, XML

World Wide Web (WWW)

- World wide web is the information space where the documents and the web resources are identified using a URL, linked using a hyperlink and can be accessed through the Internet.
- It is one of the popular service provided by the Internet.
- In current era, all the computer based applications are migrating towards the web due its flexibility and independency to platform.


HTML

- HTML stands for Hypertext Markup Language.
- It is the standard language that is used to create the web pages.
- It is the core of web page development.
- Just as the skeleton of human shapes the human body, HTML helps to shapes the web page.
- The structure of the web page is defined in HTML using the markups.
- In HTML, the elements are represented as tags.
- Some examples of the HTML tags are as follows:

p = paragraph
br = line break
h1 = heading 1


- Each tag is enclosed within < >.
- The closing tag if bresent is enclosed between < / >.
- The browser uses HTML tags to render the content of the web pages.

 


DHTML

- A proper user interface is the way to lure the customers to use the web pages. For this, static web pages provided by pure HTML is not enough.
- In other to make the web pages dynamic, the concept of DHTML emerges.
- DHTML stands for Dynamic HTML.
- It is the concept of making the web pages more interactive to the users through the combined effect of HTML, client side scripting language (Java Script), style definition language (CSS), and Document Object Model (DOM).
- DHTML is purely request/reload based dynamic web page development concept. It means that no any interaction between client and server takes place once the page is loaded. The dynamic property is solely the action of client side scripting language. All the dynamic processing is done by the client, not the server.
- DOM API leads to the foundation of the DHTML. DOM provides the representation of the contents of the document as objects, which can be accessed and manipulated through a structured interface.


WML

- WML stands for Wireless Markup Language.
- It is a markup language that is intended for the devices that uses Wireless Application Protocol (WAP) specifications like mobiles.
- It provides navigational support, data inputs, hyperlinks, image and so on similar to HTML.
- A WML document is called deck.
- Deck is arranged into one or more cards.
- Each card represents single interaction with the user.

Example:

< wml >
        < card id = "main" title = "note-card" >
                  < p mode = "wrap" > This is a note WML page.< / p >
        < / card >
< / wml >
< / pre >

 


XML

- XML stands for eXtensible Markup Language.
- It is the hardware and software independent tool to store and communicate data.
- It is designed in such a way that it is readable by both human and machine easily.
- XML is just the information wrapped up within the tags.
- XML tags are not predefined.
- In web development, XML is used to separate data from presentation. This helps to display same XML data with different presentations as required.

Example:

< message >
           < from >Egnite Notes< / from >
           < to >ABC< / to >
           < subject >Message regarding today's event< / subject >
           < body >Today's meeting is fixed on 4 PM sharp < / body >
< / message > 

 


Tools: WYSIWYG Authoring Tools

- WYSIWYG stands for What You See Is What You Get.
- It is a tool that allows the developer to create a web pages visually using a drop and drag method.
- The developer is responsible to make the layout and enter the necessary data.
- All the rest work is handled by the tool itself.
- It provides a user interface for the purpose of web page development.
- CSS can be used from the properties panel for each visual element.
- The advantage of such tool is that it helps in rapid development of the web pages.
- The disadvantage of such tool is that the developer do not have completely precise control over the web page design.
- Some examples of such tools are as follows:

Dreamweaver
NVU

 


Introduction to AJAX Programming

- AJAX stands for Asynchronous JavaScript and XML.
- It is not a programming language.
- It is the combination of a browser built-in XMLHttpRequest object that requests data from web server and Java Srcript + HTML DOM that displays or uses the data obtained.
- It allows web pages to update asynchronously by exchanging data with the web server under the hood.
- It makes the possibility of updating the parts of the web page without actually reloading the web page.


Working of AJAX

 

1. An event occurs in the web page.
2. An XMLHttpRequest object is created by the Java Script.
3. The created XMLHttpRequest object sends a HTTP request to the web server.
4. The web server processes the client request.
5. The web server sends back the response to the web page.
6. The response is read by Java Script.
7. Necessary action is performed by Java Script.

 


Browser as a Rendering Engine

Features of a web browser

 

1. Ability to render contents of WWW
2. Attractive User Interface
3. Caching
4. Cookie Handling 
5. Bookmarks
6. Easy Navigation
7. Support for third party browser extension
8. Proper Security
9. Commands available via menus
10. Ability to support plugins

 


Web Hosting

- Web hosting is the service that allows organizations or individuals to host a web site or web pages over the Internet.
- Web sites are hosted or stored on a computer, known as web server.
- For a web page to be available over the Internet, one must deploy that web page on a web hosting.
- This service is provided by the web hosting service provider.
- For hosting a web site, one must have a domain name to be associated with that resources.


Types of Web Hosting:

1. Shared Web Hosting
- In shared web hosting, multiple web site owners shared a single server.
- It provides cost effective hosting as the server cost is shared among many owners.
- The performance of the web site is affected by other web sites who share the server and its resources.

2. Dedicated Web Hosting
- In dedicated web hosting, the web site owner have a single web server rented for a single site.
- The owner have full control over the server.
- It is very expensive to rent a dedicated server.
- It provides high performance of the web site to the web traffics.

3. Virtual Web Hosting
- Virtual web hosting is the bridge between shared and dedicated web hosting.
- In virtual hosting, multiple web sites share the resources of a single web server.
- But, each web site is partitioned off as if it is hosted in the dedicated web server.
- The web site owner will have more control over sub domains and other features.
- It is cheaper than dedicated hosting but expensive than shared hosting.
- It is perfect for the web sites with fair amount of web traffics.

Sponsored Ads