---
title: "Server side languages and multi-tier architecture"
subject: "Web Technology"
chapter: 3
key: "semester_7/web_technology:server-side-languages-multitier"
source: https://www.bctengineer.com/q/semester_7/web_technology/server-side-languages-multitier
site: BCT Engineering
---

# Server side languages and multi-tier architecture

Web Technology · Chapter 3: Server-side programming

- Asked in: 2074 Chaitra, 2+2+2+4 marks
- Video: [Lec-4: 2 tier and 3 tier Architecture with real life examples | Database Management System](https://www.youtube.com/watch?v=VyvTabQHevw) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/web_technology/server-side-languages-multitier
- Whole chapter: https://www.bctengineer.com/md/semester_7/web_technology/chapter-3

## Question

Explain any three server side scripting language used in web? Explain multi-tier architecture.

## Short answer

Three server-side languages are PHP, embedded in HTML and paired with MySQL; JSP/Java Servlets, compiled and run in containers like Tomcat; and ASP.NET, Microsoft's compiled framework on IIS. Multi-tier architecture separates presentation, application logic, and data tiers, improving maintenance, scalability, and security.

## Answer

#### Three server-side scripting languages
1. **PHP:** An open-source scripting language embedded in HTML and executed by the server. It works well with MySQL, is easy to learn and runs on Apache/Nginx. Used by WordPress and Laravel.
```php
<?php echo "Hello, " . $_GET['name']; ?>
```
2. **JSP / Java Servlets:** Java-based. JSP pages are compiled into servlets and run in a container such as Tomcat. They are platform independent, secure and suitable for large enterprise applications.
3. **ASP.NET (C#):** Microsoft's framework, usually run on IIS, with strong tool support (Visual Studio), compiled code and built-in security and session management.

Others: Python (Django/Flask), Node.js, Ruby on Rails, Perl.

#### Multi-tier architecture
A **multi-tier (n-tier) architecture** divides an application into separate logical (and often physical) layers, each with its own responsibility. A tier talks only to the adjacent tier.

```text
+-----------------------------+
| Presentation tier (Browser) |  UI, HTML/CSS/JS
+--------------+--------------+
               |
+--------------v--------------+
| Application / Logic tier    |  PHP, Servlets, rules
+--------------+--------------+
               |
+--------------v--------------+
| Data tier (Database)        |  MySQL, Oracle
+-----------------------------+
```
- **Presentation tier:** Shows information and collects user input.
- **Application (business) tier:** Processes requests, applies rules, handles sessions and security.
- **Data tier:** Stores and retrieves data.

**Advantages:** Easier maintenance (change one tier without affecting the others), better scalability (run tiers on different servers), higher security (database hidden from users), code reuse, and parallel development by separate teams. **Disadvantage:** more complexity and some communication overhead.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which describes PHP?
   A. Microsoft framework on IIS
   B. Java compiled to servlets
   C. Open-source scripting embedded in HTML, works well with MySQL
   D. Client-side only language
   Answer: C. WordPress and Laravel use PHP. (Key point: PHP)

2. What happens to JSP pages?
   A. They run in the browser
   B. They are CGI scripts
   C. They are XML files
   D. They are compiled into servlets and run in a container
   Answer: D. JSP is Java based and platform independent. (Key point: JSP)

3. What is multi-tier architecture?
   A. Dividing an application into layers with separate responsibilities
   B. One program doing everything
   C. Only a browser
   D. Two identical servers
   Answer: A. Each tier talks to the adjacent tier. (Key point: Multi-tier)

4. Which is an advantage of multi-tier?
   A. Less communication overhead
   B. Change one tier without affecting others, and scale tiers separately
   C. Simpler design
   D. Database exposed to users
   Answer: B. The disadvantage is complexity and overhead. (Key point: Advantage)

## Related in Web Technology

- [Client-side versus server-side scripting](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Aclient-vs-server-side-scripting) — Web Technology, chapter 3, asked 3×
- [Web architecture and web-tier components](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Aweb-architecture-tiers) — Web Technology, chapter 2
- [Server-side programming and Java Servlet](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Aserver-side-programming-servlet) — Web Technology, chapter 3
- [Short note: Server side programming](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Ashort-note-server-side-programming) — Web Technology, chapter 3
- [Web services architecture; SOAP and WSDL roles](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Aweb-services-soap-wsdl) — Web Technology, chapter 8

## Related in other subjects

- [Conditional GET; 3-tier architecture components](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aconditional-get-3tier) — Internet and Intranet, chapter 4
- [High level languages and natural language](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Ahll-similar-natural-language) — Computer Programming, chapter 1
- [Web and file server communication](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aweb-file-server-communication) — Computer Networks and Security, chapter 6
- [XML and JavaScript for client-side web apps](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Axml-javascript-client-side) — Internet and Intranet, chapter 6
