WEB APPLICATIONS-2-tier or 3-tier architecture

Let’s for an example, I created a web application that which the students of College of Technology, Pantnagar use to find their respective marks in different subjects.
The database of marks resides on the local server of College and application resides on client’s(i.e the students) computer. When a student wants to know his marks, he uses the application interface to access his personal account. This program then queries the database and application returns with the respective marks of a particular student.

This is the example of a 2-tier architecture. Here the 2-tiers are:

  1. Data Server– database serves the data based on the SQL queries i used in my application code.
  2. Client Application– application on students computer presents the data from database in a readable format.

Now there won’t be a problem until the users were in less numbers, problem arises when the number of students using this application is very large!!

Because every time a student queries the client application, the server has to serve up large queries for the client application to manipulate which is a very hectic task for server as there will be an enormous drain on the n/w resources.

So, now we create a 3-tier architecture by inserting another program at the server level, known as server application. Now the client application will not query the database directly but will first query the server application which will further  query the data server.

Now when student wants to know his/her marks the following  will occur:

  1. The student asks the client application.
  2. The client application asks the server application.
  3. The server application queries the data server.
  4. The data server serves a record with all the student’s grades.
  5. The server application does all the calculations to determine the marks.
  6. The server application sends final marks to the client application.
  7. The client application displays the final grade for the student.

Note that here the client application is your WEB BROWSER. Server application(3rd tier) is the ASP code which queries the database.


the ‘extern’ keyword in C

The ‘extern’ keyword specifies that the object is declared with external linkage somewhere else in the program.

By preceding a variable name with ‘extern’ , you can declare a  variable without defining it. When you need to
refer to a variable that is defined in another part of your program, you can declare that variable using


int main(void)
extern float first, last; /* using global vars */
printf(“%f %f”, first, last);
return 0;
/* global definition of first and last */
float first = 10.23, last = 20.33;

This program will 10.23 20.33 because the global variables first and last used by the printf( )
statement are initialized to these values. The extern declaration will tell the compiler that first
and last are declared somewhere else (outside main), so the program will be compiled without error.

Extern allows you to declare a variable without defining it. However, if you give that
variable an initialization, the extern declaration becomes a definition.

“Definition” refers to the place where the variable is created or assigned storage; “declaration” refers to the place where nature of variable is stated but no storage is allocated.



Hello everyone!!
well this is my first post via wordpress.com!!

I am really very excited to use this tool to connect with you guys and discuss on all technical points related to web designing and coding, which are of a great interest to me and i hope 2 u as well fr sure..!!
Hope you all will follow the discussions and be in regular touch with all my posts..