0% found this document useful (0 votes)
8 views17 pages

MR - Khedekar N.H (KBPMP)

ASP.NET is a web development platform that enables the creation of robust web applications using various programming languages like C# and Visual Basic.Net. It operates on the HTTP protocol, facilitating client-server communication and maintaining application state through page and session states. The document also discusses web applications, their architecture, differences from websites, and the MVC framework, highlighting their advantages and challenges.

Uploaded by

1ksubcriber909
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views17 pages

MR - Khedekar N.H (KBPMP)

ASP.NET is a web development platform that enables the creation of robust web applications using various programming languages like C# and Visual Basic.Net. It operates on the HTTP protocol, facilitating client-server communication and maintaining application state through page and session states. The document also discusses web applications, their architecture, differences from websites, and the MVC framework, highlighting their advantages and challenges.

Uploaded by

1ksubcriber909
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ASP.

NET is a web development platform, which provides a programming model, a


comprehensive software infrastructure and various services required to build up robust web
applications for PC, as well as mobile devices.

[Link] works on top of the HTTP protocol, and uses the HTTP commands and policies to
set a browser-to-server bilateral communication and cooperation.

[Link] is a part of Microsoft .Net platform. [Link] applications are compiled codes,
written using the extensible and reusable components or objects present in .Net framework.
These codes can use the entire hierarchy of classes in .Net framework.

The [Link] application codes can be written in any of the following languages:

 C#
 Visual [Link]
 Jscript
 J#

[Link] is used to produce interactive, data-driven web applications over the internet. It
consists of a large number of controls such as text boxes, buttons, and labels for assembling,
configuring, and manipulating code to create HTML pages.

[Link] Web Forms Model

[Link] web forms extend the event-driven model of interaction to the web applications.
The browser submits a web form to the web server and the server returns a full markup page
or HTML page in response.

All client side user activities are forwarded to the server for stateful processing. The server
processes the output of the client actions and triggers the reactions.

Now, HTTP is a stateless protocol. [Link] framework helps in storing the information
regarding the state of the application, which consists of:

 Page state
 Session state

The page state is the state of the client, i.e., the content of various input fields in the web
form. The session state is the collective information obtained from various pages the user
visited and worked with, i.e., the overall session state. To clear the concept, let us take an
example of a shopping cart.

User adds items to a shopping cart. Items are selected from a page, say the items page, and
the total collected items and price are shown on a different page, say the cart page. Only
HTTP cannot keep track of all the information coming from various pages. [Link] session
state and server side infrastructure keeps track of the information collected globally over a
session.

The [Link] runtime carries the page state to and from the server across page requests
while generating [Link] runtime codes, and incorporates the state of the server side
components in hidden fields.

[Link] N.H [KBPMP] 1


This way, the server becomes aware of the overall application state and operates in a two-
tiered connected way.

What is Web Application?


A web application is an application installed only on the web server which is accessed by the
users using a web browser like Microsoft Internet Explorer, Google Chrome, Mozilla
FireFox, Apple Safari, etc. There are also some other technology like Java, PHP, Perl, Ruby
on Rails, etc. which can be used to develop web applications. Web applications provide the
cross-platform feature. The user needs only a web browser to access a web application. The
web applications which are developed using the .NET framework or its subsets required to
execute under the Microsoft Internet Information Services(IIS) on the server side. The
work of IIS is to provide the web application's generated HTML code result to the client
browser which initiates the request as shown in the below diagram.

Don't confuse in the terms [Link], [Link] core, [Link] MVC, etc. ASP(Active
Server Pages) supports a lot of development models which are as follows:
Classic ASP: It is the first server side scripting language developed by Microsoft.
[Link]: It is web development framework and successor of Classic ASP. [Link] 4.6 is
the latest version.
[Link] Core: In November 2015, Microsoft released the 5.0 version of [Link] which
get separated later and known as [Link] Core. Also, it is considered as an important
redesign of [Link] with the feature of open-source and cross-platform. Before this
version, [Link] is only considered as Windows-only version.
[Link] Web Forms: These are the event-driven application model which are not
considered a part of the new [Link] Core. These are used to provide the server-side events
and controls to develop a web application.
[Link] MVC: It is the Model-View-Controller application model which can be merged
with the new [Link] Core. It is used to build dynamic websites as it provides fast
development.
[Link] Web Pages: These are the single page application which can be merged into
[Link] Core.
[Link] API: It is the Web Application Programming Interface(API).

[Link] N.H [KBPMP] 2


Also, to create web applications [Link] provide the 3 development styles which are
[Link] Web Pages, [Link] MVC, Web Forms.
Why [Link]?
There are a lot of reasons which makes the [Link] popular among the developers. Some of
the reasons are listed below: Extending .NET Framework: [Link] is a subset of .NET
Framework as it extends the .NET Framework with some libraries and tools to develop web
apps. The thing that it adds to the .NET Framework is Libraries for common web patterns
like MVC, Editor Extensions, the base framework to process the web requests, and web-page
templating syntax like Razor, etc. Performance: It is faster than the other web frameworks
available in the market. Backend Code: With the help of [Link] you can write the backend
code for data access and any logic in C#. Dynamic Pages: In [Link], Razor provides the
syntax for developing the dynamic web pages with the help of C# and HTML. [Link] can
be integrated with JS(JavaScript) and it also includes the frameworks like React and Angular
for the SPA(Single Page Application.) Supporting different OS: You can develop and execute
[Link] apps on Windows, Linux, Docker, and MacOS. The Visual Studio provides the
tools to build .NET apps different OS.

A Web Application (Web App) is a software program that runs on a remote server and is
accessed through a web browser over the internet. Unlike traditional apps that require
installation on your device, web apps work directly from your browser whether it's Chrome,
Safari, or Firefox.

How do Web Apps work?


Web applications run on a client-server model, meaning users access them through a web
browser without needing to download or install anything. They rely on three key components:

Web Server – Handles user requests and directs them to the right place.
Application Server – Processes tasks and generates responses.
Database – Stores and retrieves data as needed.

[Link] N.H [KBPMP] 3


Working:
User Request: A user accesses the web app, sending a request to the server.
Processing: The server processes the request, retrieves or updates data if needed.
Response: The processed data is sent back and displayed in the browser.
Technologies Behind Web Apps
Front-end (User Interface): Built using HTML, CSS, and JavaScript for interactive
elements.
Back-end (Server Logic): Uses languages like Python, Java, Ruby, or PHP to handle logic
and database interactions.
Data Storage: Information is stored in databases, often in cloud-based systems for easy
access from any device.

[Link] N.H [KBPMP] 4


Unlike desktop applications, web apps work on any device with a browser, making them
widely accessible and easy to update.

Examples of Web Apps


Google Docs: Think of Google Docs as an online notepad that lets you write, edit, and
collaborate in real time. Whether you’re working on a story or making a list, multiple people
can edit the same document from anywhere.
Gmail: Gmail is your online mailbox, letting you send and receive emails from any device.
No need for special software, just open your browser, log in, and you’re ready to go. You can
even attach files, send images, and chat with friends effortlessly
Facebook: Facebook is like a virtual hangout where you can connect with friends, share
posts, and chat. It’s a space to upload photos, like and comment on updates, and stay
connected.
Characteristics
Accessibility: Consider having a powerful tool or game that you can access from anywhere.
With a web app, you're not limited to a single device. Whether you're on a computer, tablet,
or phone, you can use the app directly from your browser, no need for downloads or
installations. Just open your browser and get started!
Platform Independence: One of the best things about web apps is that they work on any
operating system. Whether you're using Windows, macOS, or Linux, a web app runs
smoothly without compatibility issues.
Automatic Updates: All of us have experienced the manual effort of updating software. Web
apps update automatically because they run on a remote server. That means every time you
open the app, you’re using the latest version, without needing to install anything.
Collaboration: Many web apps allow real-time collaboration, making teamwork easier.
Whether you're working on a document, project, or design, multiple people can edit and
contribute at the same time, even from different locations.
Cross-Platform Compatibility: Web apps run on computers, tablets, and phones without
needing different versions. Just open a browser, and you're ready to use it.
Cost-Efficiency: Developers create a single app that works across all devices, saving time
and resources instead of building separate versions for different platforms.
Real-Time Collaboration: Web apps allow multiple users to work together at the same time,
no matter where they are. Changes appear instantly, making teamwork smoother.
No Installation Needed: Unlike traditional apps, web apps don’t require downloads or
installations. Just open the browser, enter the app’s URL, and start using it instantly.
Challenges
Need for Internet Connection: Web apps need a good internet connection for smooth use.
Some offer limited offline features, but full functionality requires online access.
Performance Concerns: Speed depends on app quality and internet speed. A well-optimized
app with fast internet runs smoothly; otherwise, it may lag.

[Link] N.H [KBPMP] 5


Security Measures: Web apps store data on servers, so encryption and secure connections
protect against threats.
Difference between Web Applications And Websites
Many people confuse web apps and websites since both are accessed through a web browser
and need an internet connection. However, they serve different purposes.

Websites are mainly for sharing information. They are mostly static, meaning the content doesn’t
change often, and users only view the information. Examples include blogs, news sites, and
restaurant menus.

On the other hand, Web Applications are interactive and allow users to perform tasks. They
often include features like user authentication, data processing, and real-time updates.
Examples include online banking, social media, and e-commerce platforms.

Feature Website Web Application

Allows user interaction and


Purpose Provides information
functionality

Interactivity Mostly static (read-only) Dynamic and interactive

Users can input data and perform


User Involvement Users only view content
actions

Displays text, images, videos, Offers features like forms,


Functionality
and links authentication, and data processing

Blogs, news sites, company Online banking, social media, e-


Examples
websites commerce platforms

Development Simpler, mainly uses HTML, More complex, involving backend


Complexity CSS, and basic JavaScript logic, databases, and APIs

Requires regular updates for new


Updates Content updates occasionally
features and improvements

[Link] N.H [KBPMP] 6


Feature Website Web Application

Often requires login and user


Authentication Usually not required
authentication

3. Web-Based Application Architecture

Most web-based applications follow a three-tier architecture:

1. Client Tier (Front-End)

 Web browser
 Technologies: HTML, CSS, JavaScript
 Handles user interface and interaction

2. Application Tier (Server-Side)

 Processes user requests


 Business logic
 Technologies: [Link], PHP, Java, Python, [Link]

3. Data Tier (Database)

 Stores data
 Examples: MySQL, SQL Server, Oracle, MongoDB

4. How Web-Based Applications Work


1. User sends request via browser
2. Request goes to web server
3. Server processes request
4. Server accesses database (if required)
5. Response sent back to browser

📌 Uses HTTP/HTTPS protocol

5. Technologies Used in Web-Based Applications


Front-End Technologies
 HTML – Structure
 CSS – Styling
 JavaScript – Interactivity

[Link] N.H [KBPMP] 7


Back-End Technologies
 [Link]
 PHP
 Java
 Python (Django, Flask)
 [Link]
Databases
 Relational: MySQL, SQL Server
 NoSQL: MongoDB

6. Types of Web-Based Applications


1. Static Web Applications
 Fixed content
 No user interaction
 Example: Company profile website
2. Dynamic Web Applications
 Content changes based on user input
 Example: Social media sites
3. Single Page Applications (SPA)
 Loads a single page dynamically
 Example: Gmail
4. Progressive Web Applications (PWA)
 Web + Mobile features
 Offline support

7. Advantages of Web-Based Applications

✔ No installation required
✔ Easy access from anywhere
✔ Centralized updates
✔ Cross-platform compatibility
✔ Cost-effective maintenance

[Link] N.H [KBPMP] 8


10. Examples of Web-Based Applications

Domain Examples
Education Google Classroom, Moodle
Banking Net Banking Systems
Business CRM, ERP
E-Commerce Amazon, Flipkart
Healthcare Online appointment systems

What is MVC?
The Model-View-Controller (MVC) framework is an architectural/design pattern that
separates an application into three main logical components Model, View, and Controller.
Each architectural component is built to handle specific development aspects of an
application. It isolates the business logic and presentation layer from each other. It was
traditionally used for desktop graphical user interfaces (GUIs). Nowadays, MVC is one of the
most frequently used industry-standard web development frameworks to create scalable and
extensible projects. It is also used for designing mobile apps.

MVC was created by Trygve Reenskaug. The main goal of this design pattern was to solve
the problem of users controlling a large and complex data set by splitting a large application
into specific sections that all have their own purpose.

Features of MVC
It provides a clear separation of business logic, UI logic, and input logic.
It offers full control over your HTML and URLs which makes it easy to design web
application architecture.
It is a powerful URL-mapping component using which we can build applications that have
comprehensible and searchable URLs.
It supports Test Driven Development (TDD).
To know more about the benefits of using the MVC Framework refer to the article - Benefits
of using MVC framework

Components of MVC
The MVC framework includes the following 3 components:

Controller
Model
View

[Link] N.H [KBPMP] 9


Controller:
The controller is the component that enables the interconnection between the views and the
model so it acts as an intermediary. The controller doesn’t have to worry about handling data
logic, it just tells the model what to do. It processes all the business logic and incoming
requests, manipulates data using the Model component, and interact with the View to render
the final output.

Responsibilities:
Receiving user input and interpreting it.
Updating the Model based on user actions.

[Link] N.H [KBPMP] 10


Selecting and displaying the appropriate View.
Example: In a bookstore application, the Controller would handle actions such as searching
for a book, adding a book to the cart, or checking out.

View:
The View component is used for all the UI logic of the application. It generates a user
interface for the user. Views are created by the data which is collected by the model
component but these data aren’t taken directly but through the controller. It only interacts
with the controller.

Responsibilities:
Rendering data to the user in a specific format.
Displaying the user interface elements.
Updating the display when the Model changes.
Example: In a bookstore application, the View would display the list of books, book details,
and provide input fields for searching or filtering books.

Model:
The Model component corresponds to all the data-related logic that the user works with. This
can represent either the data that is being transferred between the View and Controller
components or any other business logic-related data. It can add or retrieve data from the
database. It responds to the controller's request because the controller can't interact with the
database by itself. The model interacts with the database and gives the required data back to
the controller.

Responsibilities:
Managing data: CRUD (Create, Read, Update, Delete) operations.
Enforcing business rules.
Notifying the View and Controller of state changes.
Example: In a bookstore application, the Model would handle data related to books, such as
the book title, author, price, and stock level.

Working of the MVC framework with Example


Let's imagine an end-user sends a request to a server to get a list of students studying in a
class. The server would then send that request to that particular controller that handles
students. That controller would then request the model that handles students to return a list of
all students studying in a class.

[Link] N.H [KBPMP] 11


Advantages of MVC
Codes are easy to maintain and they can be extended easily.
The MVC model component can be tested separately.
The components of MVC can be developed simultaneously.
It reduces complexity by dividing an application into three units. Model, view, and controller.
It supports Test Driven Development (TDD).
It works well for Web apps that are supported by large teams of web designers and
developers.
This architecture helps to test components independently as all classes and objects are
independent of each other
Search Engine Optimization (SEO) Friendly.
Disadvantages of MVC
It is difficult to read, change, test, and reuse this model
It is not suitable for building small applications.
The inefficiency of data access in view.
The framework navigation can be complex as it introduces new layers of abstraction which
requires users to adapt to the decomposition criteria of MVC.
Increased complexity and Inefficiency of data

[Link] N.H [KBPMP] 12


Popular MVC Frameworks
Some of the most popular and extensively used MVC frameworks are listed below.

Ruby on Rails
Django
CherryPy
Spring MVC
Catalyst
Rails
Zend Framework
Fuel PHP

[Link] N.H [KBPMP] 13


MVC (Model–View–Controller) Architecture

1. What is MVC?

MVC (Model–View–Controller) is a software architectural pattern used for developing


web applications.
It separates an application into three interconnected components:

 Model – Handles data and business logic


 View – Handles user interface (UI)
 Controller – Handles user input and request processing

👉 The main goal of MVC is Separation of Concerns, which makes applications


manageable, scalable, and testable.

2. Components of MVC

1. Model

 Represents application data


 Contains business logic and validation
 Interacts with database

📌 Example:

 Student
 Product
 Employee

public class Student


{
public int RollNo { get; set; }
public string Name { get; set; }
public int Marks { get; set; }
}

2. View

 Responsible for displaying data


 Uses HTML, CSS, Razor syntax
 Does NOT contain business logic

📌 Example: [Link]

@model Student

[Link] N.H [KBPMP] 14


<h2>Student Details</h2>

<p>Roll No: @[Link]</p>


<p>Name: @[Link]</p>
<p>Marks: @[Link]</p>

3. Controller

 Receives user requests


 Interacts with Model
 Selects View to render

📌 Example: [Link]

using [Link];

public class StudentController : Controller


{
public IActionResult Index()
{
Student s = new Student()
{
RollNo = 1,
Name = "Rahul",
Marks = 85
};

return View(s);
}
}

3. How MVC Works (Request Flow)

1. User sends request from browser


2. Request goes to Controller
3. Controller processes request
4. Controller interacts with Model
5. Controller sends data to View
6. View generates HTML
7. Response sent back to browser

4. MVC Folder Structure ([Link] MVC)

/Models
[Link]

/Views
/Student

[Link] N.H [KBPMP] 15


[Link]

/Controllers
[Link]

5. Example: Simple MVC Application (Student Details)

Step 1: Model – [Link]

namespace [Link]
{
public class Student
{
public int RollNo { get; set; }
public string Name { get; set; }
public string Course { get; set; }
}
}

Step 2: Controller – [Link]

using [Link];
using [Link];

namespace [Link]
{
public class StudentController : Controller
{
public IActionResult Details()
{
Student student = new Student()
{
RollNo = 101,
Name = "Amit",
Course = "Computer Science"
};

return View(student);
}
}
}

Step 3: View – [Link]

@model [Link]

<h1>Student Information</h1>

<table border="1">
<tr>

[Link] N.H [KBPMP] 16


<td>Roll No</td>
<td>@[Link]</td>
</tr>
<tr>
<td>Name</td>
<td>@[Link]</td>
</tr>
<tr>
<td>Course</td>
<td>@[Link]</td>
</tr>
</table>

[Link] N.H [KBPMP] 17

You might also like