150 likes | 287 Views
Web Database Maintenance and Reporting with VWD or Visual Studio. The techniques in the database lectures are specific to the tools we will use: Access IE IIS (Integrated Information Services) Visual Web Developer (VWD) and ASPX data objects However the concepts are generic:
E N D
Web Database Maintenance and Reporting with VWD or Visual Studio • The techniques in the database lectures are specific to the tools we will use: • Access • IE • IIS (Integrated Information Services) • Visual Web Developer (VWD) and ASPX data objects • However the concepts are generic: • You will always need a server • You will always set up a site root directory, etc.
‘web server’ receives request for page Request for page HTTP Server File server User clicks on .asp link Retrieves page from file server Recognizes .aspx as CGI script for VB.NET engine User Client: browser HTML document Internet VB.NET Interpreter (engine) Screen Generated document sent to HTTP server Database Interpreter may read and write to database Server sends generated document to source of the original request HTML interpreter in browser formats and displays HTML document. Interpreter generates HTML document 10 5 6 9 7 4 3 2 1 8 Server Information and Processing Flow
Key Points • When an ASPX program (or CGI program) runs, it generates an HTML document at that time, on the server and sends it to the requestor. • Since the program is being run in “real-time” the data displayed is current as of that moment.
Directory Structures (review) • In Microsoft Windows (and many other operating systems) a hard disk is divided into files which are hierarchically ordered. • A hard disk in a PC is given letter designation: C, D, and so on. • Each disk can store named files, which contain information. • The disk can also store directories which are files that store links that point to other files – including other directories.
Directory Structures (review) (2) • Microsoft calls directories “folders” • All files are fully named by specifying their “path” – the name of the disk + all the names of the directories you must “go through” to reach the file. • “Short cut” names for directories: • The current directory : ‘.’ (a single dot) • The parent of the current directory:” ” (2 dots)
Portable Pathnames C: inetpub (every folder below this line is an IIS application aka ‘web site’) wwwroot myProject (.html files in this folder) images (.jpg files in this folder)
Directory Structures (review) (3) • Using the knowledge of directory structures you can (and must) make your project portable by eliminating ALL ABSOLUTE FILE PATHNAMES • That is NO references such as • C:\inetpub/wwwroot/myproject\images\flower.jpg • Instead • .\images\flower.jpg
The Web Server • The term “Web Server” is universal slang for an HTTP Server • A server is a program or set of programs that run on a computer linked to the Internet • The server directly provides web page requests, and delegates other requests (CGI, ASP, etc.) to cooperating programs
Development and testing of database inquiry programs • Ideally development will take place on a machine running XP Professional or Vista Professional, or VWD or Visual Developer which have built in IIS servers. • This will allow development and testing on one machine • Otherwise you will use Visual Studio in the COBA labs
Development, continued • Have your complete project directory on a USB drive • When developing ASPX pages, open VWD or Visual Studio and click on “Open Web Site”
Click here then browse to your project directory on the USB drive.
Deployment • The web.config that VWD or Visual Studio creates will not run without error. • Replace that web.config with the one you will download from my 360 Class Announcements page • Use Filezilla to upload your complete project directory to your COBA server directory – see prior handout.
Deployment (continued) • Upload the entire project directory – the list and the maintenance programs AND the Access database to your 360 server directory • Send Larry Woods (COBA network administrator) an e-mail with your name. low@unr.edu • He will change your directory into an IIS application; without this change it will not run.
Deployment - continuedLinking .html pages to db queries • On ANY HTML page in your project • (1) set up a link – text or image link • (2) set the href to the name of the .asp page • Example • <a href=“myDataList.aspx”> text or image</a>