COMP3241 E-Business Technologies Richard Henson University of Worcester October 2012.

Slides:



Advertisements
Similar presentations
Languages for Dynamic Web Documents
Advertisements

COMP2121 Internet Technology Richard Henson University of Worcester March 2011.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Building Applications using ASP.NET and C# / Session 1 / 1 of 21 Session 1.
Server-Side vs. Client-Side Scripting Languages
Chapter Concepts Review Markup Languages
Introduction to ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Static vs. Dynamic Web Pages.NET Framework Installing ASP.NET First.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
Introduction to Web Database Processing
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Introduction to Web Interface Technology (CSE2030)
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Introduction to Web Interface Technology (CSE2030)
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Chapter 9 Web Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
INTRODUCTION TO WEB DATABASE PROGRAMMING
9-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
COMP2121 Internet Technology Richard Henson April 2011.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
Introduction to .Net Framework
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
ASP.NET INTRODUCTION INTO وزارة التربية و التعليم العالي كلية العلوم و التكنولوجيا قسم علوم الحاسوب و تكنولوجيا المعلومات اعداد الاستاذ: عبد الله محمد.
COMP3241 E-Business Technologies Richard Henson University of Worcester October 2012.
High thoughts must have high language. Aristophanes
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
COMP3121 E-Business Technologies Richard Henson University of Worcester October 2010.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Programming with Visual Web Developer Chapter 9.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
COMP2113 E-Commerce Richard Henson University of Worcester April 2008.
COMP3241 E-Business Technologies Richard Henson University of Worcester October 2014.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
CIS 451: ASP.NET Concepts Dr. Ralph D. Westfall January, 2009.
Introduction to ASP.NET1. 2 Web applications in general Web applications are divided into two parts –The server part –The client part The server part.
COMP3241 E-Business Technologies Richard Henson University of Worcester October 2012.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
By Tharith Sriv. To write a web page you use: HHTML (HyperText Markup Language), AASP (Active Server Page), PPHP (HyperText Preprocessor), JJavaScript,
CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)
COMP3241 E-Business Technologies Richard Henson University of Worcester October 2013.
Introduction and Principles Web Server Scripting.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
A Detailed Introduction To Visual Studio.NET CRB Tech ReviewsCRB Tech Reviews introduces you to the world of Visual.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
WWW and HTTP King Fahd University of Petroleum & Minerals
PHP / MySQL Introduction
Presentation transcript:

COMP3241 E-Business Technologies Richard Henson University of Worcester October 2012

Week 2 – Early Web Applications, ActiveX controls, and.net n Objectives:  Compare and contrast embedded code for client-only applications & server scripting  Explain how client-side VBScript evolved into run-time ActiveX, which itself evolved into secure server-script  Use a client-server.net development environment for development and testing of.net master pages and code behind

Interpreted and Compiled Languages n Programming (source) code must be converted into “machine code” before it can be understood and acted on by the CPU n This can be done in two ways:  convert whole program (using a compiler) and save it in a file  leave program as it is, and convert it (using an interpreter) one line at a time when it is needed n Compiled code generally occupies much more space than source code  so of more limited use on the Internet (esp. early days)...

How do Browsers cope with source code? n Designed to use interpretation on HTML code  reads one line of HTML key words and their parameters and uses HTML interpreter to convert (or interpret) that line into CPU instructions  reads & interprets next line… and so on…  CPU does further processing and sends commands to the video card which creates the visual display

Embedded programming code in HTML Files n n Still.html and executed on the Browser   Browser needs to have interpreter for that programming language e.g. » »VB Script » »Java Script n n For the Browser to call the right interpreter, an appropriate declaration statement needs to be included in the start line

Request and responses n n Organisation of application processing across a client-server network… n n Client:   requests services or information from another computer (e.g. the server) n n Server:   responds to the client's request by sending the results of the request back to the client computer

Request and responses client requests information server processes the request, sends a response back to the client

Internet Communications n Based on principles of client/server networking  EITHER Internet computer can “play” the role of client or the role of server  e.g.(1) A user in one university sends an to a user in another university: »“A” client sends to “B” server  (2) When a reply comes back… »“B” client sends to “A” server

Client-Server web applications & Server Scripts   Client-server web applications usually require: a web server, for interpreting or compiling then processing the scripts 2. 2.a server-end database to provide and store data physical & logical connections between server- scripts, client-end input forms and server-end database clearly defined locations for gathering input data at client-end, for server scripts, and for database(s)

Writing Server Scripts n n NOT saved as.html! n n Server code can be embedded directly into HTML code…   Command is needed to inform the web server » »(1) that non-HTML code is about to be used » »(2) when next code reverts to HTML n n With.asp scripts… (no longer used)   the command to start the script was <%   to end the script… %> n n With.php scripts…   <?php starts the script  ends the script  ?> ends the script

Server Scripts and “Localhost” n No matter which scripting type is used, the code can be tested locally on a computer running a web server that can understand that type of script  how? use “localhost” in the URL at the Browser end (localhost = path to the server scripting root folder) n A typical URL for testing such a script locally could then be (depending on script type):  

Web Dynamic Client-Server Model (1) Server-Side Processing in a typical web-based client-server application: 1.HTML form on web browser collects data at the client end 2.HTTP enables the form data to be sent to a web server

Web Dynamic Client-Server Model (2)  3. web server processes the form data according to instructions on a server script called at the client end  4. output from processing stored temporarily on web server

Web Dynamic Client-Server model (3)  5. server script sends output back to browser with HTML code to create a structure to display the data (e.g. HTML table)  6. This gets even more complex when a database, and database programming, are also involved at the server end…

Introduction to Server-scripting n The following apply to ALL types of scripting…  real programming code is essential »note: HTML is a FORMATTING language, NOT a programming language  both client and server ends need to have links to programming code: »client end…embedded within a HTML page »server end… could be embedded or separate

Languages used for Server Scripting n Much has been tried since HTML became interactive in the early 1990s:  Can use an existing language in a completely separate file, which is already compiled and ready to go: »the original approach:.cgi »any language could in theory be used »in practice “C” was usually favoured  Can use an existing language embedded in a HTML file »The Microsoft.asp approach, using embedded VB source code »The Sun.jsp approach, using embedded Java (Script) source  Can utilise/invent a scripting language that is “HTML-like” and easily embeds with HTML »PERL »Cold Fusion.cf »Preprocessor Hypertext processing.php

Microsoft’s first attempt at server scripting… n In 1996, Microsoft introduced active server pages (asp)  hugely successful  soon became more popular than.cgi n However, in spite of the great success of asp, big problems were emerging…  by 2000, hackers were attacking Microsoft servers and finding many security holes in IIS »Microsoft only coped by offering hotfixes  further problem: used VB source code »if server not secure, code could be copied or compromised »Scripts could not be truly “object oriented”

ASP becomes ASP.NET n Microsoft’s new approach to server scripting for the new millennium…  building on asp principles  new system that used “intermediate language”, rather than source code on the server  much more difficult to hack n Security problems with VB…  out with the old (asp)  in with the new (asp.net) n New environment known as the.net framework  many developers accustomed to VB/.asp  took awhile to catch on!

Development of.NET framework for Server Scripting n n BASIC and VB very much a part of Microsoft’s strategy, until circa 1999/2000…   use of raw source code became a security issue   Gates realised that e-business and e-commerce would never be reliable without using secure (and therefore compiled) code   Microsoft rejected their previous strategy which used source VB code and an interpreter program within IIS n n What to replace VB source code with?   applied source VB -> ActiveX run-time principles server-side   Server equivalent of ActiveX controls could now be used/developed n n Result:.net Framework & ASP.NET:   VB evolved into the more object oriented (and complied) VB.NET  .net framework provided the basis for » ».net server-side controls » »the ubiquitous use of compiled languages

Advantages of ASP.NET scripts compared to ASP n n Compiled, not interpreted n n Web Controls use xml-type tags n n Can be written using a variety of programming languages   language declared at beginning of file   fully object-oriented and many controls written to respond to on-screen “events”

Which Source Code Language? n n Source code for.net development can be written in any language that can be translated into IL   VB.NET builds on existing practice from asp   But… C# has proved to be most popular with developers, many of whom had previously used “C” and C++ » »why use VB.net, when you can use a more powerful, compiled, and object-oriented language like C?

Components of the evolving.net framework n Common Language Infrastructure (CLI) at the server end (i.e. IIS)  “managed execution” framework for scripts  runs Intel x86 IL code »common Language run-time (CLR) for executing controls »ready to run; development language irrelevant   /app_code folder for deployed “assemblies” or “controls” containing executable code, and databases  web.config file »store of configuration info e.g. a path to database file  from v2 onwards the following additional folders: »app_browsers, app_themes, app_localresources, app_globalresources, app_webreferences

How the.net environment manages an application n “Assemblies” from.aspx files added to /App_Code (usually.dll files created by compiling the assembly components) n CLI executes IL assemblies as CLR (runtime)  makes sure script execution is “controlled” and kept within boundaries »an earlier version of IIS used to “leak” memory until the system needed rebooting  usually loaded implicitly when a.net application is run

Mechanism of Loading Assemblies for processing n “AppDomain” sets up a security boundary in memory for each application n Code (.exe, or.dll) loaded into process “spaceperfo” n JIT compilation ensures “flat out performance”  cf Wallace & Grommit – latter lays out the track as the train is about to pass along it

HTTP processing n.net architecture designed “with failure in mind”  overall control with http.sys  if memory usage gets too large,.net pulled down and restarted… n Each AppDomain uses a pipeline of objects to handle requests  Httpapplication – oversees flow  Httpcontext – tracks “per request” state  Modules – generic “pluggable services  Handlers – http requests n Covers most (all?) eventualities and makes sure requests are correctly dealt with – no muddling of threads (!)

Very Useful ASP.net components: 1. Web Controls n Reusable classes used to render parts of a page  Similar to Windows “forms” n New control created for each request »view state/Event tracking handled automatically n A typical web page may have a hierarchical structure of web controls to makes them easily manageable

Very Useful ASP.net components: 2. Event Handlers n HTTP is stateless (no data retention)  no multi-step processes possible  e.g. HTML form contents disappear once form submitted n Web Controls provide scope for handling events, when triggered (or raised)  e.g. Page_Load, OnClick  “PostBack architecture” »allows web forms data to reappear on the screen

Very Useful ASP.net components: 3. Master Pages n Master Page  Created as a.master file  defines template for other pages »cf PowerPoint slide master  Contains top,, tags  “Page” command (top of page) utilises master: »either “static” or “dynamic”  “Page_init” process renders components

Very Useful ASP.net components: 4. Themes n Allow common styles to be applied across a series of pages n Developers can still use.CSS files  fully supported by the master file and page “themes” concepts

.net Development and RAD tools n By now, you may be thinking…  “Help! I can’t program in “C”!” n DON’T BE SCARED!  the syntax of object-oriented C# is similar to Java  RAD tools such as Dreamweaver (earlier versions) and Visual Web Developer (VWD) provide a range of web controls already written in C#  Extension Managers enable other controls to be added to the RAD environment n VWD also help with general file/folder management such as putting controls/assemblies into the right folder  i.e. /app_code

Managing C# Code, HTML code, and web controls n n Each has its own syntax!   earlier versions of.net had all three types together!   More recently “code behind” files encouraged » »Standard HTML & web control file saved as.aspx » »associated C# code saved as a.cs file n n declared through “Page” command

Running.aspx,.cs, etc. pages toghether n n All managed within the.net run-time environment   normally at server-end using IIS   Visual Studio allows use of a cut-down version of IIS at client end for testing   developer doesn’t need to do anything more, provided that files all in the right folders…

Running controls & C# with ASP.NET n n Semi-compiled into “intermediate language” (MSIL) for.net framework and saved together as an “assembly”   intermediate code executes very quickly when required…

Now you try it… \