尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
CHAPTER 1
Getting Started With ASP.NET
WHAT IS A WEB-BASED APPLICATION?
 A web-based application is any application that uses a
website as the interface or front-end. Users can easily
access the application from any computer connected to
the Internet using a standard browser.
 On the other hand, Google Docs is also a word-
processing application but users perform all the
functions using a web browser instead of using software
installed on their computer. This means that it is a web-
based application.
ADVANTAGES OF USING WEB BASED
APPLICATIONS:
I. Work from anywhere anytime. Web based software can be accessed from any
device that is connected to the internet. Data is available from anywhere after
the user logs in. This is a real bonus for productivity.
II. No physical software to download, install, update or manage. The software is
always up to date and down times are minimized with redundant systems off
site.
III. Web based software is compatible with any device or platform. The software is
delivered through a browser of the users choice.
IV. Pay as you go. Upfront costs are minimal with fees based on a per user
scheme.
V. Scalability. With web based software you can easily add more user license in
seconds. No more installations and configurations on every work station or
laptop.
VI. Mobile device applications allow for access to the software when out of the
office. Productivity remains high as employees can get the work they need done
now.
WEB APPLICATION ARCHITECTURE
 Composed of:
 Web browser layer – allows users to navigate through
Web pages on the Internet
 Web server layer – responds to requests submitted by
the Web browsers
 Application server layer – used for data processing
and interfacing to the business logic and database
server
 Business Logic layer – implements business rules
 Database server layer – stores and manages data
4
WEB APPLICATION ARCHITECTURE…
Uses Web browsers as the front ends
Uses the Web to communicate with the
Web server
Uses HTTP as the communication
protocol between the Web browser and
the Web server
Uses HTML/XHTML pages created
using, ActiveX, Java applets, ASP, JSP
etc
5
WEB APPLICATION COMPONENTS
 Logical components of
Web Applications
 Physical structure of
Web Applications
Introduction
to
the
Web
Applications
6
EXAMPLES OF WEB APPLICATIONS
 Examples of Web applications include:
 Reservation systems
 Weblogs
 Massively-Multiplayer Online Role-Playing Game (MMORPG)
 Online shopping
 Online auction
 Games
 Multimedia applications
 Calendars
 Maps
 Chat applications
 Clocks
 Interactive design applications
 Stock tickers
 Currency converters
 Data entry/display systems
7
BUILDING WEB APPLICATIONS
 Two major components needed to build web
applications include:
 Hardware platforms – could be a single shared server
running on a web server and a database
 Software platforms
 Schema – for data storage
 Business rule (logic) – for accessing and modifying data
 Interactive logic – for presenting data to users
8
CHALLENGES TO DESIGNING INTERFACES
FOR WEB APPLICATIONS
 “Loosely coupled” web architecture: An important challenge faced by
web application designers is caused by the “loosely coupled” or
“stateless” nature of the Web. The Web’s interaction paradigm is very
simple: Users request web pages with web browsers, and servers
respond by sending the requested pages to the browsers or informing
users if there are problems retrieving those pages. However, once a
user’s request is satisfied by the web server, by sending the web page
to the browser, the connection between the web server and the web
browser is disconnected. When a user makes a subsequent request,
the connection is established again with the server until the new web
page is “reloaded” in the user’s browser.
CHALLENGES TO DESIGNING INTERFACES
FOR WEB APPLICATIONS
 User Interface and User Experience: Think a decade ago, the web
was a completely different place. Smartphones don’t exist. Simpler and
customer oriented web application are highly expected now. Sometimes
it’s the small UI elements that make the biggest impact. In the era of
Smartphones, websites should be responsive enough on the smaller
screens. If your web applications frustrate or confuse users, then it is
difficult to maintain your customer’s loyalty for your website. Website
navigation is another part often neglected by developers. Intuitive
navigation creates a better user experience for the website visitor.
Intuitive navigation is leading your audience to the information they are
looking without a learning curve. And when the navigation is intuitive,
visitors can find out information without any pain, creating a flawless
experience preventing them from visiting the competitors.
CHALLENGES TO DESIGNING INTERFACES
FOR WEB APPLICATIONS
 Scalability: Scalability is neither performance nor it’s about making
good use of computing power and bandwidth. It’s about load balancing
between the servers, hence, when the load increases (i.e. more traffic
on the page) additional servers can be added to balance it. You should
not just throw all the load on a single server but you should design the
software such that it can work on a cluster of servers. Service-oriented
architecture (SOA) can help in improving scalability when more and
more servers are added.
 Performance: Generally, it is accepted that website speed has the
major importance for a successful website. When your business is
online every second counts. Slow web applications are a failure.
CHALLENGES TO DESIGNING INTERFACES
FOR WEB APPLICATIONS
 Knowledge of Framework and Platforms: Frameworks are the kick
start for development languages: they boost performance, offer libraries
of coding and extend capabilities, so developers need not do hand-
coding web applications from the ground up. Frameworks offer features
like models, APIs, snippets of code and other elements to develop
dynamic web applications.
 Security: Security should be considered throughout the software
development life cycle, especially when the application is dealing with
the vital information such as payment details, contact information, and
confidential data. There are many things to consider when it comes to
web application security such as denial of service attacks, the safety of
user data, database malfunctioning, unauthorized access to restricted
parts of the website, etc.
ASP.NET
 ASP.Net is a web development platform provided by Microsoft.
It is used for creating web-based applications. ASP.Net was
first released in the year 2002.
 The first version of ASP.Net deployed was 1.0. The most
recent version of ASP.Net is version 4.6. ASP.Net is designed
to work with the HTTP protocol. This is the standard protocol
used across all web applications.
 ASP.Net applications can also be written in a variety of .Net
languages. These include C#, VB.Net, and J#. In this chapter,
you will see some basic fundamental of the .Net framework.
 The full form of ASP is Active Server Pages, and .NET is
Network Enabled Technologies.
ASP.NET ADVANTAGES OVER ASP
 A clean separation between presentation and code.
With classic ASP, your programming logic was often
scattered throughout the HTML of the page, making
it hard to make changes to the page later.
 A development model that was much closer to the
way desktop applications are programmed. This
made it easier for the many Visual Basic desktop
programmers to make the switch to web
applications.
 A feature-rich development tool (called Visual
Studio .NET) that allowed developers to create and
code their web applications visually.
CONT..
 A choice between a number of object-oriented
programming languages, of which Visual Basic
.NET and C# (pronounced as C-Sharp) are now the
most popular.
 Access to the entire .NET Framework, which for the
first time meant that web developers had a unified
and easy way to access many advanced features to
work with databases, files, e-mail, networking tools,
and much more.
HISTORY (ASP).NET
 .NET framework becomes bigger and bigger
 ASP.NET, including MVC, tightly coupled to the
framework
 Difficult to keep up the release cycle
CONT..
 A choice between a number of object-oriented
programming languages, of which Visual Basic
.NET and C# (pronounced as C-Sharp) are now the
most popular.
 Access to the entire .NET Framework, which for the
first time meant that web developers had a unified
and easy way to access many advanced features to
work with databases, files, e-mail, networking tools,
and much more.
ASP.NET ARCHITECTURE AND ITS
COMPONENTS
 ASP.Net is a framework which is used to develop a
Web-based application. The basic architecture of
the ASP.Net framework is as shown below.
CONT.
The architecture of the .Net framework is based on the
following key components
 Language – A variety of languages exists for .net
framework. They are VB.net and C#. These can be used
to develop web applications.
 Library - The .NET Framework includes a set of
standard class libraries. The most common library used
for web applications in .net is the Web library. The web
library has all the necessary components used to
develop .Net web-based applications.
 Common Language Runtime - The Common
Language Infrastructure or CLI is a platform. .Net
programs are executed on this platform. The CLR is
used for performing key activities. Activities include
Exception handling and Garbage collection.
KEY CHARACTERISTICS OF THE ASP.NET
FRAMEWORK
 Code Behind Mode – This is the concept of
separation of design and code. By making this
separation, it becomes easier to maintain the
ASP.Net application. The general file type of an
ASP.Net file is aspx. Assume we have a web page
called MyPage.aspx. There will be another file
called MyPage.aspx.cs which would denote the
code part of the page. So Visual Studio creates
separate files for each web page, one for the
design part and the other for the code.
 State Management – ASP.Net has the facility to
control state management. HTTP is known as a
stateless protocol.
KEY CHARACTERISTICS OF THE ASP.NET
FRAMEWORK
 Caching – ASP.Net can implement the concept of
Caching. This improves the performance of the
application. By caching those pages which are
often requested by the user can be stored in a
temporary location. These pages can be retrieved
faster and better responses can be sent to the user.
So caching can significantly improve the
performance of an application.
WHAT IS ASP.NET LIFECYCLE?
 When an ASP.Net application is launched, there are
series of steps which are carried out. These series
of steps make up the lifecycle of the application.
 Let's look at the various stages of a typical page
lifecycle of an ASP.Net Web Application.
WHAT IS ASP.NET LIFECYCLE?
1. Application Start - The life cycle of an ASP.NET
application starts when a request is made by a user.
This request is to the Web server for the ASP.Net
Application. This happens when the first user normally
goes to the home page for the application for the first
time. During this time, there is a method called
Application_start which is executed by the web server.
Usually, in this method, all global variables are set to
their default values.
2. Object creation - The next stage is the creation of the
HttpContext, HttpRequest & HttpResponse by the web
server. The HttpContext is just the container for the
HttpRequest and HttpResponse objects. The
HttpRequest object contains information about the
current request, including cookies and browser
information. The HttpResponse object contains the
response that is sent to the client.
WHAT IS ASP.NET LIFECYCLE?
3. HttpApplication creation - This object is created by
the web server. It is this object that is used to process
each subsequent request sent to the application. For
example, let's assume we have 2 web applications.
One is a shopping cart application, and the other is a
news website. For each application, we would have 2
HttpApplication objects created. Any further requests to
each website would be processed by each
HttpApplication respectively.
4. Dispose - This event is called before the application
instance is destroyed. During this time, one can use
this method to manually release any unmanaged
resources.
5. Application End - This is the final part of the
application. In this part, the application is finally
unloaded from memory.
ASP.NET PAGE LIFECYCLE?
 When an ASP.Net page is called, it goes through a
particular lifecycle. This is done before the
response is sent to the user. There are series of
steps which are followed for the processing of an
ASP.Net page. Let's look at the various stages of
the lifecycle of an ASP.Net web page.
ASP.NET PAGE LIFECYCLE?
1. Page Request- This is when the page is first
requested from the server. When the page is
requested, the server checks if it is requested for the
first time. If so, then it needs to compile the page,
parse the response and send it across to the user. If it
is not the first time the page is requested, the cache is
checked to see if the page output exists. If so, that
response is sent to the user.
2. Page Start – During this time, 2 objects, known as the
Request and Response object are created. The
Request object is used to hold all the information which
was sent when the page was requested. The
Response object is used to hold the information which
is sent back to the user.
3. Page Initialization – During this time, all the controls
on a web page is initialized. So if you have any label,
textbox or any other controls on the web form, they are
all initialized.
ASP.NET PAGE LIFECYCLE?
4. Page Load – This is when the page is actually loaded with
all the default values. So if a textbox is supposed to have a
default value, that value is loaded during the page load time.
5. Validation – Sometimes there can be some validation set on
the form. For example, there can be a validation which says
that a list box should have a certain set of values. If the
condition is false, then there should be an error in loading
the page.
6. Postback event handling – This event is triggered if the
same page is being loaded again.
7. Page Rendering – This happens just before all the
response information is sent to the user. All the information
on the form is saved, and the result is sent to the user as a
complete web page.
8. Unload – Once the page output is sent to the user, there is
no need to keep the ASP.net web form objects in memory.
So the unloading process involves removing all unwanted
objects from memory.
HOW ASP.NET PAGE WORK
 When you create a page in VWD, you add markup
to it. The markup in an ASPX page is a combination
of plain text, HTML, code for ASP.NET Server
Controls.
 When you request an ASPX page in your browser,
the web server processes the page, executes any
code it finds in the file, and effectively transforms
the ASP.NET markup into plain HTML that it then
sends to the browser, where it is displayed. In the
preceding Try It Out, the resulting HTML causes the
browser to display the content. HTML, or HyperText
Markup Language, is the language that browsers
use to display a web page.
AN INTRODUCTION TO ASP .NET 4
 When you type a web address like
www.unizwa.edu.om in your web browser and
press Enter, the browser sends a request to the
web server at that address. This is done through
HTTP, the HyperText Transfer Protocol. HTTP is the
protocol by which web browsers and web servers
communicate. When you send the address, you
send a request to the server. When the server is
active and the request is valid, the server accepts
the request, processes it, and then sends the
response back to the client browser. The
relationship between the request and response is
shown in Figure
CONT.
In the case of an .aspx page, the request is eventually handled and
processed by the ASP.NET runtime, part of the Microsoft .NET
Framework designed specifically to handle web requests.
ASP.NET PAGE PROCESSING
During the processing of the page, three main areas
can influence the way the page eventually ends up in
the browser:
 Static text. Any static text, like HTML, CSS, or
JavaScript code you place in a page, is sent to the
browser directly.
 ASP.NET Server Controls. These controls are
placed in your ASPX page and when they are
processed, they emit HTML that is inserted in the
page.
CONT.
 Programming code. You can place code in a
separate code file, called a Code Behind file. This
code can be executed by the runtime automatically,
or based on a user’s action. Either way, execution
of the code can greatly influence the way the page
is displayed, by accessing databases, performing
calculations, hiding or showing specific controls,
and much more.
Once the page is done processing, and all the HTML
for the page has been collected, the HTML is sent
back to the browser. The browser then reads it,
parses it and, finally, displays the page for you to look
at.
EVENT HANDLING USING CONTROLS
All ASP.NET controls are implemented as classes, and they have events which are fired
when a user performs a certain action on them. For example, when a user clicks a button
the 'Click' event is generated. For handling events, there are in-built attributes and event
handlers. Event handler is coded to respond to an event, and take appropriate action on
it.
By default, Visual Studio creates an event handler by including a Handles clause on the
Sub procedure. This clause names the control and event that the procedure handles.
The ASP tag for a button control:
<asp:Button ID="btnCancel" runat="server" Text="Cancel" />
The event handler for the Click event:
Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnCancel.Click End Sub
33
WHAT IS PAGE DIRECTIVES IN ASP.NET?
Basically Page Directives are commands. These commands are used by the
compiler when the page is compiled.
How to use the directives in an ASP.NET page
It is not difficult to add a directive to an ASP.NET page. It is simple to add
directives to an ASP.NET page. You can write directives in the following
format:
<%@[Directive][Attributes]%>
See the directive format, it starts with "<%@" and ends with "%>". The best
way is to put the directive at the top of your page. But you can put a directive
anywhere in a page. One more thing, you can put more than one attribute in
a single directive.
34
WHAT IS PAGE DIRECTIVES IN ASP.NET?
Here is the full list of directives:
@Page
@Master
@Control
@Import
@Implements
@Register
@Assembly
@MasterType
@Output Cache
@PreviousPageType
@Reference
35
PROJECTS AND SOLUTIONS IN ASP.NET
A typical ASP.NET application consists of many items: the web content files
(.aspx), source files (.cs files), assemblies (.dll and .exe files), data source
files (.mdb files), references, icons, user controls and miscellaneous other
files and folders. All these files that make up the website are contained in a
Solution.
When a new website is created. VS automatically creates the solution and
displays it in the solution explorer.
Solutions may contain one or more projects. A project contains content files,
source files, and other files like data sources and image files. Generally, the
contents of a project are compiled into an assembly as an executable file
(.exe) or a dynamic link library (.dll) file.
36
CONT.
Typically a project contains the following content files:
Page file (.aspx)
User control (.ascx)
Web service (.asmx)
Master page (.master)
Site map (.sitemap)
Website configuration file (.config)
37
WHAT IS VIEW STATE?
View State is the method to preserve the Value of the Page and
Controls between round trips. It is a Page-Level State Management
technique. View State is turned on by default and normally serializes
the data in every control on the page regardless of whether it is
actually used during a post-back.
A web application is stateless. That means that a new instance of a
page is created every time when we make a request to the server to
get the page and after the round trip our page has been lost
immediately
FEATURES OF VIEW STATE
These are the main features of view state:
1. Retains the value of the Control after post-back without using a session.
2. Stores the value of Pages and Control Properties defined in the page.
3. Creates a custom View State Provider that lets you store View State
Information in a SQL Server Database or in another data store.
Advantages of View State
1. Easy to Implement.
2. No server resources are required: The View State is contained in a
structure within the page load.
3. Enhanced security features: It can be encoded and compressed or
Unicode implementation.
DIFFERENT SESSION STATE MANAGEMENT OPTIONS
AVAILABLE IN ASP.NET?
State Management in ASP.NET
 A new instance of the Web page class is created each time the page is
posted to the server.
 In traditional Web programming, all information that is associated with the
page, along with the controls on the page, would be lost with each
roundtrip.
 The Microsoft ASP.NET framework includes several options to help you
preserve data on both a per-page basis and an application-wide basis.
These options can be broadly divided into the following two categories:
Client-Side State Management Options
Server-Side State Management Options
CONT.
Client-Side State Management
 Client-based options involve storing information either in the page or on
the client computer.
 Some client-based state management options are:
 Hidden fields
 View state
 Cookies
 Query strings
CONT.
Server-Side State Management
 There are situations where you need to store the state information on the
server side.
 Server-side state management enables you to manage application-related
and session-related information on the server.
 ASP.NET provides the following options to manage state at the server
side:
 Application state
 Session state
WHAT IS THE WEB.CONFIG FILE IN ASP?
Configuration file is used to manage various settings that define a website.
The settings are stored in XML files that are separate from your application
code. In this way you can configure settings independently from your code.
Generally a website contains a single Web.config file stored inside the
application root directory. However there can be many configuration files that
manage settings at various levels within an application.
Usage of configuration file
ASP.NET Configuration system is used to describe the properties and
behaviors of various aspects of ASP.NET applications. Configuration files
help you to manage the settings related to your website. Each file is an XML
file (with the extension .config) that contains a set of configuration elements.
Configuration information is stored in XML-based text files.
CONT.
Benefits of XML-based Configuration files:
ASP.NET Configuration system is extensible and application specific
information can be stored and retrieved easily. It is human readable.
You need not restart the web server when the settings are changed in
configuration file. ASP.NET automatically detects the changes and
applies them to the running ASP.NET application.
You can use any standard text editor or XML parser to create and edit
ASP.NET configuration files.
44
POSTBACK PROPERTY IN ASP.NET?
If we create a web Page, which consists of one or more Web Controls that are
configured to use AutoPostBack (Every Web controls will have their own AutoPostBack
property), the ASP.NET adds a special JavaScipt function to the rendered HTML Page.
This function is named _doPostBack() . When Called, it triggers a PostBack, sending
data back to the web Server.
ASP.NET also adds two additional hidden input fields that are used to pass information
back to the server. This information consists of ID of the Control that raised the event
and any additional information if needed. These fields will empty initially as shown below,
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value=
"" />
45
POSTBACK PROPERTY IN ASP.NET?
The following actions will be taken place when a user changes a control that has the
AutoPostBack property set to true:
1. On the client side, the JavaScript _doPostBack function is invoked, and the page is
resubmitted to the server.
2. ASP.NET re-creates the Page object using the .aspx file.
3. ASP.NET retrieves state information from the hidden view state field and updates
the controls accordingly.
4. The Page.Load event is fired.
5. The appropriate change event is fired for the control. (If more than one control has
been changed, the order of change events is undetermined.)
6. The Page.PreRender event fires, and the page is rendered (transformed from a set
of objects to an HTML page).
7. Finally, the Page.Unload event is fired.
8. The new page is sent to the client.
UNDERSTANDING HTML
 Different tags of HTML

More Related Content

Similar to Food borne human diseases

Important Backend Frameworks To Remember For Businesses In 2023
Important Backend Frameworks To Remember For Businesses In 2023Important Backend Frameworks To Remember For Businesses In 2023
Important Backend Frameworks To Remember For Businesses In 2023
Netizens Technologies
 
Difference between .net and asp.net all you need to know
Difference between .net and asp.net  all you need to knowDifference between .net and asp.net  all you need to know
Difference between .net and asp.net all you need to know
sophiaaaddison
 
A Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdfA Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdf
lubnayasminsebl
 
Aspnet2.0 Introduction
Aspnet2.0 IntroductionAspnet2.0 Introduction
Aspnet2.0 Introduction
ChanHan Hy
 
Web Application Development-Ultimate Guide To Web Application Architecture
Web Application Development-Ultimate Guide To Web Application ArchitectureWeb Application Development-Ultimate Guide To Web Application Architecture
Web Application Development-Ultimate Guide To Web Application Architecture
Versatile Mobitech
 
How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
 How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi... How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
Aimore Technologies
 
Top 8 Reasons ASP.NET Core is the Best Framework for Web Application Developm...
Top 8 Reasons ASP.NET Core is the Best Framework for Web Application Developm...Top 8 Reasons ASP.NET Core is the Best Framework for Web Application Developm...
Top 8 Reasons ASP.NET Core is the Best Framework for Web Application Developm...
WDP Technologies
 
Navigating the Hype and Realities of Web Development Frameworks
Navigating the Hype and Realities of Web Development FrameworksNavigating the Hype and Realities of Web Development Frameworks
Navigating the Hype and Realities of Web Development Frameworks
SeasiaInfotech2
 
Over view of Technologies
Over view of TechnologiesOver view of Technologies
Over view of Technologies
Chris Mitchell
 
What Are Progressive Web Application Development
What Are Progressive Web Application DevelopmentWhat Are Progressive Web Application Development
What Are Progressive Web Application Development
App Verticals
 
A Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxA Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docx
goodcoders
 
A Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxA Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docx
goodcoders
 
Top 11 Front-End Web Development Tools To Consider in 2020
 Top 11 Front-End Web Development Tools To Consider in 2020 Top 11 Front-End Web Development Tools To Consider in 2020
Top 11 Front-End Web Development Tools To Consider in 2020
Katy Slemon
 
Web Development SEO Expate BD LTD 1 01.02.2023 .pdf
Web Development SEO Expate BD LTD 1 01.02.2023 .pdfWeb Development SEO Expate BD LTD 1 01.02.2023 .pdf
Web Development SEO Expate BD LTD 1 01.02.2023 .pdf
Seo Expate BD LTD
 
What is ASP.NET and Why do we need it?
What is ASP.NET and Why do we need it?What is ASP.NET and Why do we need it?
What is ASP.NET and Why do we need it?
Natural Group
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdf
Abanti Aazmin
 
Asp. net core 3.0 build modern web and cloud applications (top 13 features +...
Asp. net core 3.0  build modern web and cloud applications (top 13 features +...Asp. net core 3.0  build modern web and cloud applications (top 13 features +...
Asp. net core 3.0 build modern web and cloud applications (top 13 features +...
Katy Slemon
 
Fundamental of-web design-trends-20142
Fundamental of-web design-trends-20142Fundamental of-web design-trends-20142
Fundamental of-web design-trends-20142
Ly Nguyen Bui
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdf
Sonia Simi
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
chitrachauhan21
 

Similar to Food borne human diseases (20)

Important Backend Frameworks To Remember For Businesses In 2023
Important Backend Frameworks To Remember For Businesses In 2023Important Backend Frameworks To Remember For Businesses In 2023
Important Backend Frameworks To Remember For Businesses In 2023
 
Difference between .net and asp.net all you need to know
Difference between .net and asp.net  all you need to knowDifference between .net and asp.net  all you need to know
Difference between .net and asp.net all you need to know
 
A Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdfA Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdf
 
Aspnet2.0 Introduction
Aspnet2.0 IntroductionAspnet2.0 Introduction
Aspnet2.0 Introduction
 
Web Application Development-Ultimate Guide To Web Application Architecture
Web Application Development-Ultimate Guide To Web Application ArchitectureWeb Application Development-Ultimate Guide To Web Application Architecture
Web Application Development-Ultimate Guide To Web Application Architecture
 
How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
 How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi... How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
 
Top 8 Reasons ASP.NET Core is the Best Framework for Web Application Developm...
Top 8 Reasons ASP.NET Core is the Best Framework for Web Application Developm...Top 8 Reasons ASP.NET Core is the Best Framework for Web Application Developm...
Top 8 Reasons ASP.NET Core is the Best Framework for Web Application Developm...
 
Navigating the Hype and Realities of Web Development Frameworks
Navigating the Hype and Realities of Web Development FrameworksNavigating the Hype and Realities of Web Development Frameworks
Navigating the Hype and Realities of Web Development Frameworks
 
Over view of Technologies
Over view of TechnologiesOver view of Technologies
Over view of Technologies
 
What Are Progressive Web Application Development
What Are Progressive Web Application DevelopmentWhat Are Progressive Web Application Development
What Are Progressive Web Application Development
 
A Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxA Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docx
 
A Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxA Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docx
 
Top 11 Front-End Web Development Tools To Consider in 2020
 Top 11 Front-End Web Development Tools To Consider in 2020 Top 11 Front-End Web Development Tools To Consider in 2020
Top 11 Front-End Web Development Tools To Consider in 2020
 
Web Development SEO Expate BD LTD 1 01.02.2023 .pdf
Web Development SEO Expate BD LTD 1 01.02.2023 .pdfWeb Development SEO Expate BD LTD 1 01.02.2023 .pdf
Web Development SEO Expate BD LTD 1 01.02.2023 .pdf
 
What is ASP.NET and Why do we need it?
What is ASP.NET and Why do we need it?What is ASP.NET and Why do we need it?
What is ASP.NET and Why do we need it?
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdf
 
Asp. net core 3.0 build modern web and cloud applications (top 13 features +...
Asp. net core 3.0  build modern web and cloud applications (top 13 features +...Asp. net core 3.0  build modern web and cloud applications (top 13 features +...
Asp. net core 3.0 build modern web and cloud applications (top 13 features +...
 
Fundamental of-web design-trends-20142
Fundamental of-web design-trends-20142Fundamental of-web design-trends-20142
Fundamental of-web design-trends-20142
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdf
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
 

Recently uploaded

Slides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptxSlides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptx
shabeluno
 
Erasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES CroatiaErasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES Croatia
whatchangedhowreflec
 
Non-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech ProfessionalsNon-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech Professionals
MattVassar1
 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
Kalna College
 
How to Create User Notification in Odoo 17
How to Create User Notification in Odoo 17How to Create User Notification in Odoo 17
How to Create User Notification in Odoo 17
Celine George
 
The basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptxThe basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptx
heathfieldcps1
 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
yarusun
 
Creating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptxCreating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptx
Forum of Blended Learning
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
 
bryophytes.pptx bsc botany honours second semester
bryophytes.pptx bsc botany honours  second semesterbryophytes.pptx bsc botany honours  second semester
bryophytes.pptx bsc botany honours second semester
Sarojini38
 
Information and Communication Technology in Education
Information and Communication Technology in EducationInformation and Communication Technology in Education
Information and Communication Technology in Education
MJDuyan
 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Celine George
 
The Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptxThe Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptx
PriyaKumari928991
 
(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"
MJDuyan
 
8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity
RuchiRathor2
 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
BiplabHalder13
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
Kalna College
 
IoT (Internet of Things) introduction Notes.pdf
IoT (Internet of Things) introduction Notes.pdfIoT (Internet of Things) introduction Notes.pdf
IoT (Internet of Things) introduction Notes.pdf
roshanranjit222
 
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
biruktesfaye27
 
Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
EducationNC
 

Recently uploaded (20)

Slides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptxSlides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptx
 
Erasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES CroatiaErasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES Croatia
 
Non-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech ProfessionalsNon-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech Professionals
 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
 
How to Create User Notification in Odoo 17
How to Create User Notification in Odoo 17How to Create User Notification in Odoo 17
How to Create User Notification in Odoo 17
 
The basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptxThe basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptx
 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
 
Creating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptxCreating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptx
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
 
bryophytes.pptx bsc botany honours second semester
bryophytes.pptx bsc botany honours  second semesterbryophytes.pptx bsc botany honours  second semester
bryophytes.pptx bsc botany honours second semester
 
Information and Communication Technology in Education
Information and Communication Technology in EducationInformation and Communication Technology in Education
Information and Communication Technology in Education
 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
 
The Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptxThe Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptx
 
(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"
 
8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity
 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
 
IoT (Internet of Things) introduction Notes.pdf
IoT (Internet of Things) introduction Notes.pdfIoT (Internet of Things) introduction Notes.pdf
IoT (Internet of Things) introduction Notes.pdf
 
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
 
Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
 

Food borne human diseases

  • 2. WHAT IS A WEB-BASED APPLICATION?  A web-based application is any application that uses a website as the interface or front-end. Users can easily access the application from any computer connected to the Internet using a standard browser.  On the other hand, Google Docs is also a word- processing application but users perform all the functions using a web browser instead of using software installed on their computer. This means that it is a web- based application.
  • 3. ADVANTAGES OF USING WEB BASED APPLICATIONS: I. Work from anywhere anytime. Web based software can be accessed from any device that is connected to the internet. Data is available from anywhere after the user logs in. This is a real bonus for productivity. II. No physical software to download, install, update or manage. The software is always up to date and down times are minimized with redundant systems off site. III. Web based software is compatible with any device or platform. The software is delivered through a browser of the users choice. IV. Pay as you go. Upfront costs are minimal with fees based on a per user scheme. V. Scalability. With web based software you can easily add more user license in seconds. No more installations and configurations on every work station or laptop. VI. Mobile device applications allow for access to the software when out of the office. Productivity remains high as employees can get the work they need done now.
  • 4. WEB APPLICATION ARCHITECTURE  Composed of:  Web browser layer – allows users to navigate through Web pages on the Internet  Web server layer – responds to requests submitted by the Web browsers  Application server layer – used for data processing and interfacing to the business logic and database server  Business Logic layer – implements business rules  Database server layer – stores and manages data 4
  • 5. WEB APPLICATION ARCHITECTURE… Uses Web browsers as the front ends Uses the Web to communicate with the Web server Uses HTTP as the communication protocol between the Web browser and the Web server Uses HTML/XHTML pages created using, ActiveX, Java applets, ASP, JSP etc 5
  • 6. WEB APPLICATION COMPONENTS  Logical components of Web Applications  Physical structure of Web Applications Introduction to the Web Applications 6
  • 7. EXAMPLES OF WEB APPLICATIONS  Examples of Web applications include:  Reservation systems  Weblogs  Massively-Multiplayer Online Role-Playing Game (MMORPG)  Online shopping  Online auction  Games  Multimedia applications  Calendars  Maps  Chat applications  Clocks  Interactive design applications  Stock tickers  Currency converters  Data entry/display systems 7
  • 8. BUILDING WEB APPLICATIONS  Two major components needed to build web applications include:  Hardware platforms – could be a single shared server running on a web server and a database  Software platforms  Schema – for data storage  Business rule (logic) – for accessing and modifying data  Interactive logic – for presenting data to users 8
  • 9. CHALLENGES TO DESIGNING INTERFACES FOR WEB APPLICATIONS  “Loosely coupled” web architecture: An important challenge faced by web application designers is caused by the “loosely coupled” or “stateless” nature of the Web. The Web’s interaction paradigm is very simple: Users request web pages with web browsers, and servers respond by sending the requested pages to the browsers or informing users if there are problems retrieving those pages. However, once a user’s request is satisfied by the web server, by sending the web page to the browser, the connection between the web server and the web browser is disconnected. When a user makes a subsequent request, the connection is established again with the server until the new web page is “reloaded” in the user’s browser.
  • 10. CHALLENGES TO DESIGNING INTERFACES FOR WEB APPLICATIONS  User Interface and User Experience: Think a decade ago, the web was a completely different place. Smartphones don’t exist. Simpler and customer oriented web application are highly expected now. Sometimes it’s the small UI elements that make the biggest impact. In the era of Smartphones, websites should be responsive enough on the smaller screens. If your web applications frustrate or confuse users, then it is difficult to maintain your customer’s loyalty for your website. Website navigation is another part often neglected by developers. Intuitive navigation creates a better user experience for the website visitor. Intuitive navigation is leading your audience to the information they are looking without a learning curve. And when the navigation is intuitive, visitors can find out information without any pain, creating a flawless experience preventing them from visiting the competitors.
  • 11. CHALLENGES TO DESIGNING INTERFACES FOR WEB APPLICATIONS  Scalability: Scalability is neither performance nor it’s about making good use of computing power and bandwidth. It’s about load balancing between the servers, hence, when the load increases (i.e. more traffic on the page) additional servers can be added to balance it. You should not just throw all the load on a single server but you should design the software such that it can work on a cluster of servers. Service-oriented architecture (SOA) can help in improving scalability when more and more servers are added.  Performance: Generally, it is accepted that website speed has the major importance for a successful website. When your business is online every second counts. Slow web applications are a failure.
  • 12. CHALLENGES TO DESIGNING INTERFACES FOR WEB APPLICATIONS  Knowledge of Framework and Platforms: Frameworks are the kick start for development languages: they boost performance, offer libraries of coding and extend capabilities, so developers need not do hand- coding web applications from the ground up. Frameworks offer features like models, APIs, snippets of code and other elements to develop dynamic web applications.  Security: Security should be considered throughout the software development life cycle, especially when the application is dealing with the vital information such as payment details, contact information, and confidential data. There are many things to consider when it comes to web application security such as denial of service attacks, the safety of user data, database malfunctioning, unauthorized access to restricted parts of the website, etc.
  • 13. ASP.NET  ASP.Net is a web development platform provided by Microsoft. It is used for creating web-based applications. ASP.Net was first released in the year 2002.  The first version of ASP.Net deployed was 1.0. The most recent version of ASP.Net is version 4.6. ASP.Net is designed to work with the HTTP protocol. This is the standard protocol used across all web applications.  ASP.Net applications can also be written in a variety of .Net languages. These include C#, VB.Net, and J#. In this chapter, you will see some basic fundamental of the .Net framework.  The full form of ASP is Active Server Pages, and .NET is Network Enabled Technologies.
  • 14. ASP.NET ADVANTAGES OVER ASP  A clean separation between presentation and code. With classic ASP, your programming logic was often scattered throughout the HTML of the page, making it hard to make changes to the page later.  A development model that was much closer to the way desktop applications are programmed. This made it easier for the many Visual Basic desktop programmers to make the switch to web applications.  A feature-rich development tool (called Visual Studio .NET) that allowed developers to create and code their web applications visually.
  • 15. CONT..  A choice between a number of object-oriented programming languages, of which Visual Basic .NET and C# (pronounced as C-Sharp) are now the most popular.  Access to the entire .NET Framework, which for the first time meant that web developers had a unified and easy way to access many advanced features to work with databases, files, e-mail, networking tools, and much more.
  • 16. HISTORY (ASP).NET  .NET framework becomes bigger and bigger  ASP.NET, including MVC, tightly coupled to the framework  Difficult to keep up the release cycle
  • 17. CONT..  A choice between a number of object-oriented programming languages, of which Visual Basic .NET and C# (pronounced as C-Sharp) are now the most popular.  Access to the entire .NET Framework, which for the first time meant that web developers had a unified and easy way to access many advanced features to work with databases, files, e-mail, networking tools, and much more.
  • 18. ASP.NET ARCHITECTURE AND ITS COMPONENTS  ASP.Net is a framework which is used to develop a Web-based application. The basic architecture of the ASP.Net framework is as shown below.
  • 19. CONT. The architecture of the .Net framework is based on the following key components  Language – A variety of languages exists for .net framework. They are VB.net and C#. These can be used to develop web applications.  Library - The .NET Framework includes a set of standard class libraries. The most common library used for web applications in .net is the Web library. The web library has all the necessary components used to develop .Net web-based applications.  Common Language Runtime - The Common Language Infrastructure or CLI is a platform. .Net programs are executed on this platform. The CLR is used for performing key activities. Activities include Exception handling and Garbage collection.
  • 20. KEY CHARACTERISTICS OF THE ASP.NET FRAMEWORK  Code Behind Mode – This is the concept of separation of design and code. By making this separation, it becomes easier to maintain the ASP.Net application. The general file type of an ASP.Net file is aspx. Assume we have a web page called MyPage.aspx. There will be another file called MyPage.aspx.cs which would denote the code part of the page. So Visual Studio creates separate files for each web page, one for the design part and the other for the code.  State Management – ASP.Net has the facility to control state management. HTTP is known as a stateless protocol.
  • 21. KEY CHARACTERISTICS OF THE ASP.NET FRAMEWORK  Caching – ASP.Net can implement the concept of Caching. This improves the performance of the application. By caching those pages which are often requested by the user can be stored in a temporary location. These pages can be retrieved faster and better responses can be sent to the user. So caching can significantly improve the performance of an application.
  • 22. WHAT IS ASP.NET LIFECYCLE?  When an ASP.Net application is launched, there are series of steps which are carried out. These series of steps make up the lifecycle of the application.  Let's look at the various stages of a typical page lifecycle of an ASP.Net Web Application.
  • 23. WHAT IS ASP.NET LIFECYCLE? 1. Application Start - The life cycle of an ASP.NET application starts when a request is made by a user. This request is to the Web server for the ASP.Net Application. This happens when the first user normally goes to the home page for the application for the first time. During this time, there is a method called Application_start which is executed by the web server. Usually, in this method, all global variables are set to their default values. 2. Object creation - The next stage is the creation of the HttpContext, HttpRequest & HttpResponse by the web server. The HttpContext is just the container for the HttpRequest and HttpResponse objects. The HttpRequest object contains information about the current request, including cookies and browser information. The HttpResponse object contains the response that is sent to the client.
  • 24. WHAT IS ASP.NET LIFECYCLE? 3. HttpApplication creation - This object is created by the web server. It is this object that is used to process each subsequent request sent to the application. For example, let's assume we have 2 web applications. One is a shopping cart application, and the other is a news website. For each application, we would have 2 HttpApplication objects created. Any further requests to each website would be processed by each HttpApplication respectively. 4. Dispose - This event is called before the application instance is destroyed. During this time, one can use this method to manually release any unmanaged resources. 5. Application End - This is the final part of the application. In this part, the application is finally unloaded from memory.
  • 25. ASP.NET PAGE LIFECYCLE?  When an ASP.Net page is called, it goes through a particular lifecycle. This is done before the response is sent to the user. There are series of steps which are followed for the processing of an ASP.Net page. Let's look at the various stages of the lifecycle of an ASP.Net web page.
  • 26. ASP.NET PAGE LIFECYCLE? 1. Page Request- This is when the page is first requested from the server. When the page is requested, the server checks if it is requested for the first time. If so, then it needs to compile the page, parse the response and send it across to the user. If it is not the first time the page is requested, the cache is checked to see if the page output exists. If so, that response is sent to the user. 2. Page Start – During this time, 2 objects, known as the Request and Response object are created. The Request object is used to hold all the information which was sent when the page was requested. The Response object is used to hold the information which is sent back to the user. 3. Page Initialization – During this time, all the controls on a web page is initialized. So if you have any label, textbox or any other controls on the web form, they are all initialized.
  • 27. ASP.NET PAGE LIFECYCLE? 4. Page Load – This is when the page is actually loaded with all the default values. So if a textbox is supposed to have a default value, that value is loaded during the page load time. 5. Validation – Sometimes there can be some validation set on the form. For example, there can be a validation which says that a list box should have a certain set of values. If the condition is false, then there should be an error in loading the page. 6. Postback event handling – This event is triggered if the same page is being loaded again. 7. Page Rendering – This happens just before all the response information is sent to the user. All the information on the form is saved, and the result is sent to the user as a complete web page. 8. Unload – Once the page output is sent to the user, there is no need to keep the ASP.net web form objects in memory. So the unloading process involves removing all unwanted objects from memory.
  • 28. HOW ASP.NET PAGE WORK  When you create a page in VWD, you add markup to it. The markup in an ASPX page is a combination of plain text, HTML, code for ASP.NET Server Controls.  When you request an ASPX page in your browser, the web server processes the page, executes any code it finds in the file, and effectively transforms the ASP.NET markup into plain HTML that it then sends to the browser, where it is displayed. In the preceding Try It Out, the resulting HTML causes the browser to display the content. HTML, or HyperText Markup Language, is the language that browsers use to display a web page.
  • 29. AN INTRODUCTION TO ASP .NET 4  When you type a web address like www.unizwa.edu.om in your web browser and press Enter, the browser sends a request to the web server at that address. This is done through HTTP, the HyperText Transfer Protocol. HTTP is the protocol by which web browsers and web servers communicate. When you send the address, you send a request to the server. When the server is active and the request is valid, the server accepts the request, processes it, and then sends the response back to the client browser. The relationship between the request and response is shown in Figure
  • 30. CONT. In the case of an .aspx page, the request is eventually handled and processed by the ASP.NET runtime, part of the Microsoft .NET Framework designed specifically to handle web requests.
  • 31. ASP.NET PAGE PROCESSING During the processing of the page, three main areas can influence the way the page eventually ends up in the browser:  Static text. Any static text, like HTML, CSS, or JavaScript code you place in a page, is sent to the browser directly.  ASP.NET Server Controls. These controls are placed in your ASPX page and when they are processed, they emit HTML that is inserted in the page.
  • 32. CONT.  Programming code. You can place code in a separate code file, called a Code Behind file. This code can be executed by the runtime automatically, or based on a user’s action. Either way, execution of the code can greatly influence the way the page is displayed, by accessing databases, performing calculations, hiding or showing specific controls, and much more. Once the page is done processing, and all the HTML for the page has been collected, the HTML is sent back to the browser. The browser then reads it, parses it and, finally, displays the page for you to look at.
  • 33. EVENT HANDLING USING CONTROLS All ASP.NET controls are implemented as classes, and they have events which are fired when a user performs a certain action on them. For example, when a user clicks a button the 'Click' event is generated. For handling events, there are in-built attributes and event handlers. Event handler is coded to respond to an event, and take appropriate action on it. By default, Visual Studio creates an event handler by including a Handles clause on the Sub procedure. This clause names the control and event that the procedure handles. The ASP tag for a button control: <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> The event handler for the Click event: Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click End Sub 33
  • 34. WHAT IS PAGE DIRECTIVES IN ASP.NET? Basically Page Directives are commands. These commands are used by the compiler when the page is compiled. How to use the directives in an ASP.NET page It is not difficult to add a directive to an ASP.NET page. It is simple to add directives to an ASP.NET page. You can write directives in the following format: <%@[Directive][Attributes]%> See the directive format, it starts with "<%@" and ends with "%>". The best way is to put the directive at the top of your page. But you can put a directive anywhere in a page. One more thing, you can put more than one attribute in a single directive. 34
  • 35. WHAT IS PAGE DIRECTIVES IN ASP.NET? Here is the full list of directives: @Page @Master @Control @Import @Implements @Register @Assembly @MasterType @Output Cache @PreviousPageType @Reference 35
  • 36. PROJECTS AND SOLUTIONS IN ASP.NET A typical ASP.NET application consists of many items: the web content files (.aspx), source files (.cs files), assemblies (.dll and .exe files), data source files (.mdb files), references, icons, user controls and miscellaneous other files and folders. All these files that make up the website are contained in a Solution. When a new website is created. VS automatically creates the solution and displays it in the solution explorer. Solutions may contain one or more projects. A project contains content files, source files, and other files like data sources and image files. Generally, the contents of a project are compiled into an assembly as an executable file (.exe) or a dynamic link library (.dll) file. 36
  • 37. CONT. Typically a project contains the following content files: Page file (.aspx) User control (.ascx) Web service (.asmx) Master page (.master) Site map (.sitemap) Website configuration file (.config) 37
  • 38. WHAT IS VIEW STATE? View State is the method to preserve the Value of the Page and Controls between round trips. It is a Page-Level State Management technique. View State is turned on by default and normally serializes the data in every control on the page regardless of whether it is actually used during a post-back. A web application is stateless. That means that a new instance of a page is created every time when we make a request to the server to get the page and after the round trip our page has been lost immediately
  • 39. FEATURES OF VIEW STATE These are the main features of view state: 1. Retains the value of the Control after post-back without using a session. 2. Stores the value of Pages and Control Properties defined in the page. 3. Creates a custom View State Provider that lets you store View State Information in a SQL Server Database or in another data store. Advantages of View State 1. Easy to Implement. 2. No server resources are required: The View State is contained in a structure within the page load. 3. Enhanced security features: It can be encoded and compressed or Unicode implementation.
  • 40. DIFFERENT SESSION STATE MANAGEMENT OPTIONS AVAILABLE IN ASP.NET? State Management in ASP.NET  A new instance of the Web page class is created each time the page is posted to the server.  In traditional Web programming, all information that is associated with the page, along with the controls on the page, would be lost with each roundtrip.  The Microsoft ASP.NET framework includes several options to help you preserve data on both a per-page basis and an application-wide basis. These options can be broadly divided into the following two categories: Client-Side State Management Options Server-Side State Management Options
  • 41. CONT. Client-Side State Management  Client-based options involve storing information either in the page or on the client computer.  Some client-based state management options are:  Hidden fields  View state  Cookies  Query strings
  • 42. CONT. Server-Side State Management  There are situations where you need to store the state information on the server side.  Server-side state management enables you to manage application-related and session-related information on the server.  ASP.NET provides the following options to manage state at the server side:  Application state  Session state
  • 43. WHAT IS THE WEB.CONFIG FILE IN ASP? Configuration file is used to manage various settings that define a website. The settings are stored in XML files that are separate from your application code. In this way you can configure settings independently from your code. Generally a website contains a single Web.config file stored inside the application root directory. However there can be many configuration files that manage settings at various levels within an application. Usage of configuration file ASP.NET Configuration system is used to describe the properties and behaviors of various aspects of ASP.NET applications. Configuration files help you to manage the settings related to your website. Each file is an XML file (with the extension .config) that contains a set of configuration elements. Configuration information is stored in XML-based text files.
  • 44. CONT. Benefits of XML-based Configuration files: ASP.NET Configuration system is extensible and application specific information can be stored and retrieved easily. It is human readable. You need not restart the web server when the settings are changed in configuration file. ASP.NET automatically detects the changes and applies them to the running ASP.NET application. You can use any standard text editor or XML parser to create and edit ASP.NET configuration files. 44
  • 45. POSTBACK PROPERTY IN ASP.NET? If we create a web Page, which consists of one or more Web Controls that are configured to use AutoPostBack (Every Web controls will have their own AutoPostBack property), the ASP.NET adds a special JavaScipt function to the rendered HTML Page. This function is named _doPostBack() . When Called, it triggers a PostBack, sending data back to the web Server. ASP.NET also adds two additional hidden input fields that are used to pass information back to the server. This information consists of ID of the Control that raised the event and any additional information if needed. These fields will empty initially as shown below, <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value= "" /> 45
  • 46. POSTBACK PROPERTY IN ASP.NET? The following actions will be taken place when a user changes a control that has the AutoPostBack property set to true: 1. On the client side, the JavaScript _doPostBack function is invoked, and the page is resubmitted to the server. 2. ASP.NET re-creates the Page object using the .aspx file. 3. ASP.NET retrieves state information from the hidden view state field and updates the controls accordingly. 4. The Page.Load event is fired. 5. The appropriate change event is fired for the control. (If more than one control has been changed, the order of change events is undetermined.) 6. The Page.PreRender event fires, and the page is rendered (transformed from a set of objects to an HTML page). 7. Finally, the Page.Unload event is fired. 8. The new page is sent to the client.
  翻译: