Web applications are popular due to the convenience of using a web browser as a client. The ability to update web applications without distributing and installing software on client computers is a key reason for their popularity. Common web apps include webmail, wikis, online auctions and many more.
Web developers frequently use client-side scripting to add functionality especially to create an interactive experience that does not require page reloading. Recently, technologies have been developed to coordinate client-side scripting with server-side technologies such as PHP. Ajax is an example of technology which creates a more interactive experience.
Writing web applications-
Writing web applications is simplified by open source software such as Drupal, Ruby on Rails. These web application frameworks facilitate rapid app development by focusing on the goals. The use of web application frameworks can reduce the number of errors in a program by making the code simpler or by allowing one team to concentrate on the framework while another focuses on a specified use case.
Applications are typically broken into logical chunks called tiers, where every tier is assigned a role. Traditional applications consist of 1 tier, which resides on the client machine, but web applications lend themselves to an n-tiered approach or say, technique by nature. Though many variations are possible, and the most common structure is the three-tiered application. These three tiers are called- Presentation, Application and Storage. A web browser is the first tier, an engine using some dynamic web content technology like ASP, CGI, Java, PHP, etc is the middle layer or tier and the database is the third tier. The web browser sends requests to the second tier, which further services them by making queries and updates against the database and generates a user interface.
There are some who view a web application as two-tier architecture. The client would manage the presentation tier, the server would have the storage tier, and the application tier would be on one of them or on both. While this increases the scalability of the applications and separates the display from the database, it does not allow for true specialization of tiers, so most applications will outgrow this model.