SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Server side technologies
ASP.Net
Amelina Ahmeti, Sultonmamad, Usman
Web Technologies – Prof. Dr. Ulrik Schroeder – WS 2010/111
The slides are licensed under a
Creative Commons Attribution 3.0 License
Commonly used objects
 The brain:
 Client
 Server
 File and folder
 License
Web Technologies2
<html>
…
</html>
Can you ask a
clever question?
Overview
 The need for ASP.Net
 Introduction to ASP.Net
 .Net Framework
 .aspx and Code Behind files
 Page Life Cycle
 Controls
 State Management
 Configuration Files
 Some Examples
 ASP.Net v/s PHP
Web Technologies3
Objectives
 Introduction to ASP.Net
 Basic Advantages
 Some Examples
Web Technologies4
ASP – Active Server Pages
 Server-side scripts
 Also client-side scripts
 Validate user inputs
 Access database
 ASP provides solutions for transaction processing and managing
session state.
 One of the most successful languages for Web development.
1 Introduction5
WHY NOT CONTINUE WITH ASP???
Web Technologies6
Problems with ASP
 Interpreted and Loosely typed code
 Late binding of Variables
 Uses Jscript or VBScript
 Mixes layout (HTML) and logic (scripting code)
 Frequent switches between HTML and ASP code
 Hard to separate Content and Business Logic
 Limited Development and Debugging Tools
 Visual InterDev, Macromedia helped
 Debugging done using “Response.Write()”
1 Introduction7
Problems with ASP
 No real state management
 Process Dependent
 Server Farm Limitations
 Cookie Dependent
 Update files only when server is down
 To update components based site you have to stop the server
 If not Application fails
 Obscure Configuration Settings
 Configurations stored in IIS Metabase
 Difficult to port application
1 Introduction8
THE RESPONSE – ASP.NET
Web Technologies9
ASP.Net – Issues to Address
 Make sure ASP runs fine
 Since ASP was widely used
 Introduction of .Net Framework
 ASP.DLL not modified while installing framework
 IIS could run ASP and ASP.Net simultaneously
 Overcome the short comings in ASP
1 Introduction10
ASP.Net – Advantages
 Separation of Code from HTML
 Completely separate Presentation from Business Logic
 Examples
1 Introduction11
Simple Page with a GridView
Web Technologies12
Markup
Web Technologies13
Code Behind File
Web Technologies14
WHAT’S NEW THEN???
Web Technologies15
Simple Page with a GridView 2
Web Technologies16
Markup
Web Technologies17
Code Behind
Web Technologies18
ASP.Net - Advantages
 Support for compiled languages
 Strong typing
 OOP
 Pre-compilation to Byte Code and JIT compilation
 Subsequent requests directed to cached copy until source changes
 Mostly used languages are
 VB.Net
 C#
 Use services provided by the .NET Framework
 Class libraries provided for different tasks
 Data Access
 Access to Operating system
 Input / Output
 Debugging made a lot easier
1 Introduction19
ASP.Net - Advantages
 Graphical Development Environment
 Drag and Drop Controls
 Set the properties graphically
 IntelliSense Support
 Code (VB.Net/C#)
 HTML
 XML
 State Management
 Problems with ASP state management addressed
 Can be recovered even if connection is lost
 Discussed in detail later
1 Introduction20
ASP.Net - Advantages
 Update files while the server is running!
 Components could be updated while Application is running
 Server automatically starts using new version
 Old version kept in memory until the clients have finished
 XML-Based Configuration Files
 Easy to read and modify
 Ease in application portability
1 Introduction21
ASP.Net - Overview
 Server side technology
 Web Forms used to build Web Applications
 Provides services to create and use Web Services
 Controls
 HTML Controls
 Web Server Control
 User Controls
 Ease of application development
1 Introduction22
.Net - Framework
1 Introduction23
Short Description of Framework
1 Introduction24
ASP.Net - Files
 A simple ASP.Net file consists of two files
 Presentation (.aspx)
 Code Behind (.aspx.cs for C#)
 Web Services have the extension .asmx
 Configuration Files
 Global.asax (also has a code behind file)
 Optional file containing global logic
 Web.config
 Application Configuration file
 Allows defining Name, Value pairs that could be accessed by application
1 Introduction25
Execution Cycle
 Request aspx page
 ASP.Net runtime parses file for code to be compiled
 Generation of Page class (ASP.Net Page)
 Instantiates server controls
 Populates server controls
 Rendering of Controls
 HTML generation by painting of controls
 Send the HTML to client browser
1 Introduction26
Execution Process
 Compiling the code
 First time request
 Code compiled to MSIL(Microsoft Intermediate Language)
 Similar to Assembly Language
 Used to achieve platform independency
 Not the target what Microsoft wants
 CPU independence
 Efficient conversion to Native code
 CLR(Common Language Runtime) compiles the code
 A copy of Page is Cached
 Used until changes are made to the page, and it needs to be compiled again
1 Introduction27
PAGE LIFE CYCLE
1 Introduction28
Page Request
 IIS determines what type of request it is.
 ASP.Net requests are forwarded to ISAPI
 Decision is made to either parse or compile the page
 Or we could just render an existing copy in the Cache.
Start
 ASP.Net Environment is created
 If the Application has been called first time then the
Application Domain is created
 Page Objects are created
 Request
 Response
 Context
 Set the IsPostBack property
Initialization
 Server Controls on the page are initialized
 UniqueID of each control is set
 Skins are applied to controls
 Master Page and themes are applied
Load
 ViewState is re-constituted
 Controls are loaded with data from ViewState and Control
State if this is a PostBack request
PostBack Event Handling
 Event handlers for server controls are called.
 Validation controls perform their validation on the data in
the controls and set IsValid property of each Validation
Control and the Page.
Rendering
 ViewState is saved for the page and controls.
 Page calls the Render method of all the server controls, and
they all render themselves on the page.
 This rendering is done in the OutputStream object of page’s
Response Property, and the HTML output is generated.
Unload
 Page specific properties are unloaded
 Request
 Response
 Clean up is performed.
CONTROLS
ASP.Net Controls
 HTML server controls
 Web server controls
 Validation controls
 User controls
HTML Server Controls
 HTML elements on an ASP.NET Web page are not available
to the server.
 treated as opaque text and passed through to the browser.
 HTML elements containing attributes that make them
programmable in server code.
Web Server Controls
 A second set of controls designed for a different emphasis
 Do not necessarily map one-to-one to HTML server controls
 Defined as Abstract controls
 Have more built-in features than HTML controls e.g.
Calendar, Menus etc.
Validation Controls
 Do client side validation like
 Input required for a text box
 Test against a specific value
 Test a specific pattern for input
 Whether a value lies within some range
 Etc.
User Controls
 Controls created by the User as ASP.Net webpages
 Can be embedded in other pages
 Re-usability and Power to User.
POST BACK, VIEW STATE AND SESSION
CONTROL
Post Back
 Server controls
 Post Back to the same page
 Server control initiated request
View State
 Persist state across PostBacks (Same Page)
 Programmatic changes to the page's state
 No free lunches
 Cost of ViewState
 Extra time in rendering
Preserving Data Across Pages
 Session
 InProc
 StateServer
 SqlServer
 Cookies
 QueryString
 Cookie Independant
CONFIGURATION FILES
Web Technologies46
Global.asax
 Declare application level Events and Objects
 Code for events like
 Application Start
 Application End
 Since this code cannot be places in application itself
 Also used for Application and Session State Management
 Compiled just like any other ASP.Net page
 Subsequent compiles made on changes
Web Technologies47
Web.config
 Stores configuration information in XML format
 Optional
 Allows for creating Name, Value pairs that could be accessed
by the web application to apply configurations
 Portable
Web Technologies48
COMPARISON WITH PHP
Web Technologies49
 Believed that PHP is faster
 No proof available
 ASP.Net is a platform
 C#/VB.Net used for server operation
 ASP.Net provides controls and designing tools
 PHP contains scripting tags, and no controls
 Cost
 Microsoft Platform
 Platform Compatibility
 CLR but not IIS
Web Technologies50
 Database connectivity
 PHP used for DB connectivity
 ASP.Net uses Framework to access DB
 Object Oriented Design
 ASP.Net is built on OOP paradigm
 PHP supports minimal level OOP
 Compilation
 PHP
 HTML and PHP to Zend Opcodes
 Zend Engine generates HTML
 ASP.Net
 MSIL
 Page Rendering
Web Technologies51
 Web Server
 PHP
 Runs on both IIS and Apache, hence platform independent
 ASP.Net
 Runs only on IIS
 Data Security
 ASP.Net has enhanced and enriched features
 PHP lesser features
 Propriety
 PHP is open source
 ASP.Net is Microsoft Product
 Some new tools like in AJAX are open source
Web Technologies52
Summary
Web Technologies53
Outlook
Web Technologies54
References
 www.w3schools.com
 www.codeproject.com
 msdn.microsoft.com
1 Introduction55

Weitere ähnliche Inhalte

Was ist angesagt?

Apex basics-for Beginners
Apex basics-for BeginnersApex basics-for Beginners
Apex basics-for Beginnershrakhra
 
Asp .net web form fundamentals
Asp .net web form fundamentalsAsp .net web form fundamentals
Asp .net web form fundamentalsGopal Ji Singh
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )senthil0809
 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0Dima Maleev
 
1. deploying an asp.net web application
1. deploying an asp.net web application1. deploying an asp.net web application
1. deploying an asp.net web applicationPramod Rathore
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1Kumar S
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCBilal Amjad
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.netSHADAB ALI
 
Oracle Apex Installation (EPG)
Oracle Apex Installation (EPG)Oracle Apex Installation (EPG)
Oracle Apex Installation (EPG)Khairul Islam
 
Siebel Web Architecture
Siebel Web ArchitectureSiebel Web Architecture
Siebel Web ArchitectureRoman Agaev
 
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl....net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...Nancy Thomas
 
All About Asp Net 4 0 Hosam Kamel
All About Asp Net 4 0  Hosam KamelAll About Asp Net 4 0  Hosam Kamel
All About Asp Net 4 0 Hosam KamelHosam Kamel
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex codeEdwinOstos
 

Was ist angesagt? (19)

Apex basics-for Beginners
Apex basics-for BeginnersApex basics-for Beginners
Apex basics-for Beginners
 
Asp dot net final (2)
Asp dot net   final (2)Asp dot net   final (2)
Asp dot net final (2)
 
Asp .net web form fundamentals
Asp .net web form fundamentalsAsp .net web form fundamentals
Asp .net web form fundamentals
 
Asp .net folders and web.config
Asp .net folders and web.configAsp .net folders and web.config
Asp .net folders and web.config
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )
 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
 
1. deploying an asp.net web application
1. deploying an asp.net web application1. deploying an asp.net web application
1. deploying an asp.net web application
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1
 
Microsoft Azure
Microsoft AzureMicrosoft Azure
Microsoft Azure
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVC
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
ASP
ASPASP
ASP
 
Oracle Apex Installation (EPG)
Oracle Apex Installation (EPG)Oracle Apex Installation (EPG)
Oracle Apex Installation (EPG)
 
Siebel Web Architecture
Siebel Web ArchitectureSiebel Web Architecture
Siebel Web Architecture
 
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl....net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
 
Beginners introduction to asp.net
Beginners introduction to asp.netBeginners introduction to asp.net
Beginners introduction to asp.net
 
All About Asp Net 4 0 Hosam Kamel
All About Asp Net 4 0  Hosam KamelAll About Asp Net 4 0  Hosam Kamel
All About Asp Net 4 0 Hosam Kamel
 
New Enhancements + Upgrade Path to Oracle EBS R12.1.3
New Enhancements + Upgrade Path to Oracle EBS R12.1.3New Enhancements + Upgrade Path to Oracle EBS R12.1.3
New Enhancements + Upgrade Path to Oracle EBS R12.1.3
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex code
 

Andere mochten auch

Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with spparallelminder
 
Your First ASP_Net project part 1
Your First ASP_Net project part 1Your First ASP_Net project part 1
Your First ASP_Net project part 1Biswadip Goswami
 
Computer fundamentals
Computer fundamentalsComputer fundamentals
Computer fundamentalsnilesh67
 
Chapter 1 (asp.net over view)
Chapter 1 (asp.net over view)Chapter 1 (asp.net over view)
Chapter 1 (asp.net over view)let's go to study
 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NETDudy Ali
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1asim78
 
Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2asim78
 
Computer Notes
Computer NotesComputer Notes
Computer NotesEHSAN KHAN
 
Bai giang asp.net full
Bai giang asp.net fullBai giang asp.net full
Bai giang asp.net fullLy hai
 
Intro To Asp Net And Web Forms
Intro To Asp Net And Web FormsIntro To Asp Net And Web Forms
Intro To Asp Net And Web FormsSAMIR BHOGAYTA
 
01 Computer Forensics Fundamentals - Notes
01 Computer Forensics Fundamentals - Notes01 Computer Forensics Fundamentals - Notes
01 Computer Forensics Fundamentals - NotesKranthi
 
FUNDAMENTALS OF COMPUTER
FUNDAMENTALS OF COMPUTERFUNDAMENTALS OF COMPUTER
FUNDAMENTALS OF COMPUTERthanathip
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTDr. Awase Khirni Syed
 
Visual basic asp.net programming introduction
Visual basic asp.net programming introductionVisual basic asp.net programming introduction
Visual basic asp.net programming introductionHock Leng PUAH
 
Bài 6: Điều khiển DetailsView, FormView, ListView, DataPager
Bài 6: Điều khiển DetailsView, FormView, ListView, DataPagerBài 6: Điều khiển DetailsView, FormView, ListView, DataPager
Bài 6: Điều khiển DetailsView, FormView, ListView, DataPagerMasterCode.vn
 

Andere mochten auch (20)

Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
 
Your First ASP_Net project part 1
Your First ASP_Net project part 1Your First ASP_Net project part 1
Your First ASP_Net project part 1
 
Computer fundamentals
Computer fundamentalsComputer fundamentals
Computer fundamentals
 
Chapter 1 (asp.net over view)
Chapter 1 (asp.net over view)Chapter 1 (asp.net over view)
Chapter 1 (asp.net over view)
 
Miao
MiaoMiao
Miao
 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NET
 
E sampark with c#.net
E sampark with c#.netE sampark with c#.net
E sampark with c#.net
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
 
Computer Notes
Computer Notes Computer Notes
Computer Notes
 
Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2
 
Computer Notes
Computer NotesComputer Notes
Computer Notes
 
Bai giang asp.net full
Bai giang asp.net fullBai giang asp.net full
Bai giang asp.net full
 
Intro To Asp Net And Web Forms
Intro To Asp Net And Web FormsIntro To Asp Net And Web Forms
Intro To Asp Net And Web Forms
 
01 Computer Forensics Fundamentals - Notes
01 Computer Forensics Fundamentals - Notes01 Computer Forensics Fundamentals - Notes
01 Computer Forensics Fundamentals - Notes
 
Controls in asp.net
Controls in asp.netControls in asp.net
Controls in asp.net
 
FUNDAMENTALS OF COMPUTER
FUNDAMENTALS OF COMPUTERFUNDAMENTALS OF COMPUTER
FUNDAMENTALS OF COMPUTER
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENT
 
Visual basic asp.net programming introduction
Visual basic asp.net programming introductionVisual basic asp.net programming introduction
Visual basic asp.net programming introduction
 
Bài 6: Điều khiển DetailsView, FormView, ListView, DataPager
Bài 6: Điều khiển DetailsView, FormView, ListView, DataPagerBài 6: Điều khiển DetailsView, FormView, ListView, DataPager
Bài 6: Điều khiển DetailsView, FormView, ListView, DataPager
 

Ähnlich wie Asp dot net long

Asp dot net final (1)
Asp dot net   final (1)Asp dot net   final (1)
Asp dot net final (1)amelinaahmeti
 
Asp dot net final (1)
Asp dot net   final (1)Asp dot net   final (1)
Asp dot net final (1)amelinaahmeti
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Jeff Blankenburg
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architectureIblesoft
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web applicationRahul Bansal
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controlsRaed Aldahdooh
 
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
Top 10 -  ASP.NET Interview Questions And Answers 2023.pdfTop 10 -  ASP.NET Interview Questions And Answers 2023.pdf
Top 10 - ASP.NET Interview Questions And Answers 2023.pdfRuddarpratap
 
Aspnet architecture
Aspnet architectureAspnet architecture
Aspnet architecturephantrithuc
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Ido Flatow
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
Anvita Gita Supersite Case Study Nov2000
Anvita   Gita Supersite Case Study Nov2000Anvita   Gita Supersite Case Study Nov2000
Anvita Gita Supersite Case Study Nov2000guest6e7a1b1
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETPeter Gfader
 
How to develop asp web applications
How to develop asp web applicationsHow to develop asp web applications
How to develop asp web applicationsDeepankar Pathak
 

Ähnlich wie Asp dot net long (20)

Asp dot net final (1)
Asp dot net   final (1)Asp dot net   final (1)
Asp dot net final (1)
 
Asp dot net final (1)
Asp dot net   final (1)Asp dot net   final (1)
Asp dot net final (1)
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
 
Asp.net
Asp.netAsp.net
Asp.net
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architecture
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Asp.netrole
Asp.netroleAsp.netrole
Asp.netrole
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
 
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
Top 10 -  ASP.NET Interview Questions And Answers 2023.pdfTop 10 -  ASP.NET Interview Questions And Answers 2023.pdf
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
 
Webconnection
WebconnectionWebconnection
Webconnection
 
Aspnet architecture
Aspnet architectureAspnet architecture
Aspnet architecture
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Walther Ajax4
Walther Ajax4Walther Ajax4
Walther Ajax4
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
Anvita Gita Supersite Case Study Nov2000
Anvita   Gita Supersite Case Study Nov2000Anvita   Gita Supersite Case Study Nov2000
Anvita Gita Supersite Case Study Nov2000
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
How to develop asp web applications
How to develop asp web applicationsHow to develop asp web applications
How to develop asp web applications
 

Kürzlich hochgeladen

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Asp dot net long

  • 1. Server side technologies ASP.Net Amelina Ahmeti, Sultonmamad, Usman Web Technologies – Prof. Dr. Ulrik Schroeder – WS 2010/111 The slides are licensed under a Creative Commons Attribution 3.0 License
  • 2. Commonly used objects  The brain:  Client  Server  File and folder  License Web Technologies2 <html> … </html> Can you ask a clever question?
  • 3. Overview  The need for ASP.Net  Introduction to ASP.Net  .Net Framework  .aspx and Code Behind files  Page Life Cycle  Controls  State Management  Configuration Files  Some Examples  ASP.Net v/s PHP Web Technologies3
  • 4. Objectives  Introduction to ASP.Net  Basic Advantages  Some Examples Web Technologies4
  • 5. ASP – Active Server Pages  Server-side scripts  Also client-side scripts  Validate user inputs  Access database  ASP provides solutions for transaction processing and managing session state.  One of the most successful languages for Web development. 1 Introduction5
  • 6. WHY NOT CONTINUE WITH ASP??? Web Technologies6
  • 7. Problems with ASP  Interpreted and Loosely typed code  Late binding of Variables  Uses Jscript or VBScript  Mixes layout (HTML) and logic (scripting code)  Frequent switches between HTML and ASP code  Hard to separate Content and Business Logic  Limited Development and Debugging Tools  Visual InterDev, Macromedia helped  Debugging done using “Response.Write()” 1 Introduction7
  • 8. Problems with ASP  No real state management  Process Dependent  Server Farm Limitations  Cookie Dependent  Update files only when server is down  To update components based site you have to stop the server  If not Application fails  Obscure Configuration Settings  Configurations stored in IIS Metabase  Difficult to port application 1 Introduction8
  • 9. THE RESPONSE – ASP.NET Web Technologies9
  • 10. ASP.Net – Issues to Address  Make sure ASP runs fine  Since ASP was widely used  Introduction of .Net Framework  ASP.DLL not modified while installing framework  IIS could run ASP and ASP.Net simultaneously  Overcome the short comings in ASP 1 Introduction10
  • 11. ASP.Net – Advantages  Separation of Code from HTML  Completely separate Presentation from Business Logic  Examples 1 Introduction11
  • 12. Simple Page with a GridView Web Technologies12
  • 14. Code Behind File Web Technologies14
  • 15. WHAT’S NEW THEN??? Web Technologies15
  • 16. Simple Page with a GridView 2 Web Technologies16
  • 19. ASP.Net - Advantages  Support for compiled languages  Strong typing  OOP  Pre-compilation to Byte Code and JIT compilation  Subsequent requests directed to cached copy until source changes  Mostly used languages are  VB.Net  C#  Use services provided by the .NET Framework  Class libraries provided for different tasks  Data Access  Access to Operating system  Input / Output  Debugging made a lot easier 1 Introduction19
  • 20. ASP.Net - Advantages  Graphical Development Environment  Drag and Drop Controls  Set the properties graphically  IntelliSense Support  Code (VB.Net/C#)  HTML  XML  State Management  Problems with ASP state management addressed  Can be recovered even if connection is lost  Discussed in detail later 1 Introduction20
  • 21. ASP.Net - Advantages  Update files while the server is running!  Components could be updated while Application is running  Server automatically starts using new version  Old version kept in memory until the clients have finished  XML-Based Configuration Files  Easy to read and modify  Ease in application portability 1 Introduction21
  • 22. ASP.Net - Overview  Server side technology  Web Forms used to build Web Applications  Provides services to create and use Web Services  Controls  HTML Controls  Web Server Control  User Controls  Ease of application development 1 Introduction22
  • 23. .Net - Framework 1 Introduction23
  • 24. Short Description of Framework 1 Introduction24
  • 25. ASP.Net - Files  A simple ASP.Net file consists of two files  Presentation (.aspx)  Code Behind (.aspx.cs for C#)  Web Services have the extension .asmx  Configuration Files  Global.asax (also has a code behind file)  Optional file containing global logic  Web.config  Application Configuration file  Allows defining Name, Value pairs that could be accessed by application 1 Introduction25
  • 26. Execution Cycle  Request aspx page  ASP.Net runtime parses file for code to be compiled  Generation of Page class (ASP.Net Page)  Instantiates server controls  Populates server controls  Rendering of Controls  HTML generation by painting of controls  Send the HTML to client browser 1 Introduction26
  • 27. Execution Process  Compiling the code  First time request  Code compiled to MSIL(Microsoft Intermediate Language)  Similar to Assembly Language  Used to achieve platform independency  Not the target what Microsoft wants  CPU independence  Efficient conversion to Native code  CLR(Common Language Runtime) compiles the code  A copy of Page is Cached  Used until changes are made to the page, and it needs to be compiled again 1 Introduction27
  • 28. PAGE LIFE CYCLE 1 Introduction28
  • 29. Page Request  IIS determines what type of request it is.  ASP.Net requests are forwarded to ISAPI  Decision is made to either parse or compile the page  Or we could just render an existing copy in the Cache.
  • 30. Start  ASP.Net Environment is created  If the Application has been called first time then the Application Domain is created  Page Objects are created  Request  Response  Context  Set the IsPostBack property
  • 31. Initialization  Server Controls on the page are initialized  UniqueID of each control is set  Skins are applied to controls  Master Page and themes are applied
  • 32. Load  ViewState is re-constituted  Controls are loaded with data from ViewState and Control State if this is a PostBack request
  • 33. PostBack Event Handling  Event handlers for server controls are called.  Validation controls perform their validation on the data in the controls and set IsValid property of each Validation Control and the Page.
  • 34. Rendering  ViewState is saved for the page and controls.  Page calls the Render method of all the server controls, and they all render themselves on the page.  This rendering is done in the OutputStream object of page’s Response Property, and the HTML output is generated.
  • 35. Unload  Page specific properties are unloaded  Request  Response  Clean up is performed.
  • 37. ASP.Net Controls  HTML server controls  Web server controls  Validation controls  User controls
  • 38. HTML Server Controls  HTML elements on an ASP.NET Web page are not available to the server.  treated as opaque text and passed through to the browser.  HTML elements containing attributes that make them programmable in server code.
  • 39. Web Server Controls  A second set of controls designed for a different emphasis  Do not necessarily map one-to-one to HTML server controls  Defined as Abstract controls  Have more built-in features than HTML controls e.g. Calendar, Menus etc.
  • 40. Validation Controls  Do client side validation like  Input required for a text box  Test against a specific value  Test a specific pattern for input  Whether a value lies within some range  Etc.
  • 41. User Controls  Controls created by the User as ASP.Net webpages  Can be embedded in other pages  Re-usability and Power to User.
  • 42. POST BACK, VIEW STATE AND SESSION CONTROL
  • 43. Post Back  Server controls  Post Back to the same page  Server control initiated request
  • 44. View State  Persist state across PostBacks (Same Page)  Programmatic changes to the page's state  No free lunches  Cost of ViewState  Extra time in rendering
  • 45. Preserving Data Across Pages  Session  InProc  StateServer  SqlServer  Cookies  QueryString  Cookie Independant
  • 47. Global.asax  Declare application level Events and Objects  Code for events like  Application Start  Application End  Since this code cannot be places in application itself  Also used for Application and Session State Management  Compiled just like any other ASP.Net page  Subsequent compiles made on changes Web Technologies47
  • 48. Web.config  Stores configuration information in XML format  Optional  Allows for creating Name, Value pairs that could be accessed by the web application to apply configurations  Portable Web Technologies48
  • 49. COMPARISON WITH PHP Web Technologies49
  • 50.  Believed that PHP is faster  No proof available  ASP.Net is a platform  C#/VB.Net used for server operation  ASP.Net provides controls and designing tools  PHP contains scripting tags, and no controls  Cost  Microsoft Platform  Platform Compatibility  CLR but not IIS Web Technologies50
  • 51.  Database connectivity  PHP used for DB connectivity  ASP.Net uses Framework to access DB  Object Oriented Design  ASP.Net is built on OOP paradigm  PHP supports minimal level OOP  Compilation  PHP  HTML and PHP to Zend Opcodes  Zend Engine generates HTML  ASP.Net  MSIL  Page Rendering Web Technologies51
  • 52.  Web Server  PHP  Runs on both IIS and Apache, hence platform independent  ASP.Net  Runs only on IIS  Data Security  ASP.Net has enhanced and enriched features  PHP lesser features  Propriety  PHP is open source  ASP.Net is Microsoft Product  Some new tools like in AJAX are open source Web Technologies52