069 WT

Ranjan Bajracharya
6 min readJan 24, 2018

old question solution

1-Tier,2-Tier, 3-Tier and n-Tier technology

Client/Sever architecture can be of different model based on the number of layers it holds.

1- Tier:- One tier architecture has all the layers such as Presentation, Business, Data Access layers in a single software package. Applications which handles all the three tiers such as MP3 player, MS Office are come under one tier application. The data is stored in the local system or a shared drive.

2-Tier:- 2-tier architecture is used to describe client/server systems where the client requests resources and the server responds directly to the request, using its own resources. This means that the server does not call on another application in order to provide part of the service.The direct communication takes place between client and server. There is no intermediate between client and server. Because of tight coupling a 2 tiered application will run faster.The Two-tier architecture is divided into two parts:

1. Client Application (Client Tier)
2. Database (Data Tier)

3-Tier:- 3-Tier architecture is used to describe Web Based application.The Three-tier architecture is divided into three parts:

1.Presentation layer (Client Tier)
2. Application layer (Business Tier)
3. Database layer (Data Tier)

The client does not directly communicate with the server. Instead, it interacts with an application server which further communicates with the database system and then the query processing and transaction management takes place. This intermediate layer acts as a medium for exchange of partially processed data between server and client.

N-Tier:- N-tier architecture (with N more than 3) is really 3 tier architectures in which the middle tier is split up into new tiers. The application tier is broken down into separate parts.The primary advantage of N-tier architectures is that they make load balancing possible. Since the application logic is distributed between several servers, processing can then be more evenly distributed among those servers. N-tiered architectures are also more easily salable, since only servers experiencing high demand, such as the application server, need be upgraded. The primary disadvantage of N-tier architectures is that it is also more difficult to program and test an N-tier architecture due to its increased complexity.

Create a small XML file designed to contain information about student performance on a module. Each student has a name, roll no, a subject mark and an exam mark.

<?xml version=”1.0"?>
<!DOCTYPE student [
<!ELEMENT student (name,roll_no,subject_mark,exam_mark)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT roll_no (#PCDATA)>
<!ELEMENT subject_mark (#PCDATA)>
<!ELEMENT exam_mark (#PCDATA)>
]>
<student>
<name>Ranjan</naem>
<roll_no>20</roll_no>
<subject_make>75</subejct_mark>
<exam_mark>79</exam_mark>
</student>

SMTP

Simple Mail Transfer Protocol (SMTP) is the standard protocol for email services on a TCP/IP network. SMTP provides the ability to send and receive email messages. SMTP is an application-layer protocol that enables the transmission and delivery of email over the Internet. SMTP usually is implemented to operate over Internet port 25.

CONNECT
EHLO
MAIL FROM: <me>
RCPT TO: someone@somewhere
DATA body.txt
QUIT

Important uses of cookies

Cookies (also referred to as HTTP cookies or browser cookies) are small text files stored in a web user’s browser directory or data folder.Secure websites use cookies to validate a user’s identity as they browse from page to page; without cookies, login credentials would have to be entered between before every product added to cart or wish list. Cookies enable and improve:

• Customer log-in
• Persistent shopping carts
• Wish lists
• Product recommendations
• Custom user interfaces (i.e. “Welcome back, Steve”)
• Retaining customer address and payment information

Examples of cookies

Cookies are most commonly used to track website activity. When you visit some sites, the server gives you a cookie that acts as your identification card. Upon each return visit to that site, your browser passes that cookie back to the server. In this way, a web server can gather information about which web pages are used the most, and which pages are gathering the most repeat hits.

Cookies are also used for online shopping. Online stores often use cookies that record any personal information you enter, as well as any items in your electronic shopping cart, so that you don’t need to re-enter this information each time you visit the site.

DTD — Elements

In a DTD, XML elements are declared with the following syntax:

<!ELEMENT element-name category>
or
<!ELEMENT element-name (element-content)>

Empty elements are declared with the category keyword EMPTY:

<!ELEMENT element-name EMPTY>
Example:
<!ELEMENT br EMPTY>

Elements with only parsed character data are declared with #PCDATA inside parentheses:

<!ELEMENT element-name (#PCDATA)>
Example:
<!ELEMENT from (#PCDATA)>

Elements declared with the category keyword ANY, can contain any combination of parsable data:

<!ELEMENT element-name ANY>
Example:
<!ELEMENT note ANY>

Elements with one or more children are declared with the name of the children elements inside parentheses:

<!ELEMENT element-name (child1)>
or
<!ELEMENT element-name (child1,child2,...)>
Example:
<!ELEMENT note (to,from,heading,body)>

Essential features of web browser

1.The Web browser should be able to look at the Web pages throughout Internet or to connect to various sites to access information, explore resources and have fun.

2. The Web browser must enable you to follow the hyperlinks on a Web and type in a URL for it to follow.

3. Another feature of browser is to have a number of other commands readily available through menus, icons, and buttons.

4. Your browser ought to include an easy way to get on-line help as well as built in links to other resources on the Web that can give you helps or answer your questions.

5.One of the main feature of a browser is to search the information on the current page as well as search the WWW itself.

6.Web browser should be able to handle text, images of the World Wide Web, as well as the hyperlinks to digital video, or other types of information.

7.A browser that caches keeps of the pages you visit so that it does not have to download them again if you want to return to them. Reloading a page from the cache is much quicker that downloading it again from the original source.

Significance of IP addresses and their types

The Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on the Internet. Each computer (known as a host) on the Internet has at least one IP address that uniquely identifies it from all other computers on the Internet.IP is a connectionless protocol, which means that there is no continuing connection between the end points that are communicating.IP addresses are one of the most critical resources that need to be managed in any network. Every networked application and device — from e-mail and Web connectivity to file storage and networked printers — depends on IP and requires address assignment

Types of IP addresses

The IP addresses can be classified into two. They are listed below.

1) Static IP addresses:- As the name indicates, the static IP addresses usually never change but they may be changed as a result of network administration. They serve as a permanent Internet address and provide a simple and reliable way for the communication. From the static IP address of a system, we can get many details such as the continent, country, region and city in which a computer is located.

2) Dynamic IP addresses:- These are temporary IP addresses. These IP addresses are assigned to a computer when they get connected to the Internet each time. They are actually borrowed from a pool of IP addresses, shared over various computers. Since limited number of static IP addresses are available, ISPs usually reserve the portion of their assigned addresses for sharing among their subscribers in this way.

--

--

Ranjan Bajracharya

MSP 2017. Graduation in computer science and information technology. Studying MBA.