tools for “ webifying ” databases chet seymour melanie rasmusson scott licht

28
Tools for “Webifying” Databases Chet Seymour Melanie Rasmusson Scott Licht

Upload: john-dalton

Post on 30-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

Tools for “Webifying” Databases

Chet Seymour

Melanie Rasmusson

Scott Licht

Page 2: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

Some Basics

Web Server Database Server

Need some standard method to present information from the database on the web page

Page 3: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

Geekiest

• PERL combined with modules

DBI::Oracle, DBI::MySQL, DBD::ODBC

• PHP – Zend

• SOAP

• XML

Page 4: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

PHP• Hypertext Preprocessor

<?php

function connectDb($user, $pass, $host, $db) {     //this function connects to a mysql server     $sock = mysql_connect($host, $user, $pass);          //this function connects to a mysql database, once a server has been reached.     if(isset($sock)) {         if(!mysql_select_db($db, $sock)) {             echo mysql_error();         }     }     return $sock; }

//simple use of the function $socket = connectDb('bilbo','b@gg1ns','localhost','test');

//create an sql query $sql = "SELECT *  FROM sample";

//perform the query and return a resource identifier to $query $query = mysql_query($sql, $socket);

//show all the data via a while loop while($data = mysql_fetch_assoc($query)) {     //using foreach, list all the data that was returned in the $data array from mysql_fetch_assoc     foreach($data as $key => $value) {         echo $key.' = '.$value.'<br>';     }     echo '<br>'; }

?>   

Page 5: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

PERL

• Practical Extraction and Report Language

• Modules for ODBC, DBI, DBH, DBD, various specific databases

• PERL itself cannot directly present its results on a web page – reliant on HTML or XML

• VERY robust tools for incorporating data from multiple sources

Page 6: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Background

• Microsoft Product

• ASP = Active Server Pages

• ASP.NET replaced the original ASP

• Relatively low cost $38.00

Page 7: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Use

• Compatible with a wide variety of programming languages.– Classic ASP only supported VBScript and

Jscript. ASP.NET supports more than 25 different languages, with no additional tools required.

Page 8: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Use

• Use far less code than classic ASP. – Displaying data, validating user input, and

uploading files are all easy.

Page 9: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Use

• ASP.NET pages work in all browsers.– This includes Netscape, Opera, AOL, and

of course Internet Explorer.

Page 10: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Use

• ASP.NET is compatible with any text editor. – You can even support ASP.NET with

Notepad.

Page 11: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Use

• Utilizes familiar drag-drop-double-click techniques. – Built in code support includes statement

completion and color-coding.

Page 12: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Use

• ASP.NET has a rich class framework.– The framework offers over 4500 classes

that encapsulate rich functionality like XML, data access, file upload, regular expressions, image generation, performance monitoring and logging, transactions message queuing, etc…

Page 13: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Performance

• ASP.NET is fast.– If you are used to using classic ASP, you will

notice a 3 to 5 times increase in pages served.

• Microsoft claims 28x faster than Sun’s fully optimized J2EE.– ASP.NET supported 7.6x as many users, was 28x

faster, and only used 1/4th as much code as J2EE. This according to Microsoft’s web-site: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bdasamppet.asp?frame=true

Page 14: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Performance

• No explicit compile step is required for ASP.NET– ASP.NET eliminates “Just hit save” fears.

It will automatically detect any changes, dynamically compile the files if needed, and store the compiled results to reuse for subsequent requests.

Page 15: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Performance

• ASP.NET session state lets you share session data across all the machines in your Web Farm.– Also, now ASP.NET frameworks are face-

threaded, so that you do not need to worry about thread relationships or affinity.

Page 16: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Reliability

• ASP.NET automatically recovers from errors like deadlocks and memory leaks.– This automatic feature ensures your

applications are always available to your users.

Page 17: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Deployment

• Simplified Application Installation:– Microsoft promises deployment of an entire

application as easily as an HTML page.

Page 18: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Deployment

• Update with restarting the web-server– ASP.NET promises dynamic updates of an

application while its running.

Page 19: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

ASP.NET Ease of Deployment

• Automatic Migration of Existing Applications– ASP.NET runs on IIS side-by-side with

classic ASP on Windows 2000 and Windows XP platforms.

Page 20: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

Cold Fusion MX

“…solution for rapidly building and deploying Internet applications

and web services.”

Page 21: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

CF- What is it?

• It is a JAVA application

• Program that runs on a server

• A scripting language designed specifically for web applications development

• CFML = HTML + Action Script

• Used for low level internet programming tasks

• Build using macromedia Dreamweaver MX

Page 22: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

CF – 4 Built in Engines

• Verity full text search engine for rapid searches

• Charting engine: allows charting and delivery of business graphics

• Flash remoting: for exchange of data

• Web services engine: for publishing of web services

Page 23: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

CF – Data Connectivity

• Connectivity to JDBC/ODBC databases• Integration with Legacy system data through

web services or industry standard interfaces: COM,CORBA, or JAVA

• Easily connect to any database or directory• J2EE architecture gives freedom and

flexibility to choose the environment for applications

• Offers broad OS support such as: Windows, Linux, Solaris, HP and others

Page 24: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

CF – Deployment Options

• Can be installed in multiple configurations– Integrated servers– Enterprise JAVA applications

• Allows for isolated applications in separate processes on same server

– Benefit: problems with one application do not hinder another

Page 25: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

CF – Performance & Scalability

• Unlike PHP and ASP which are interpreted

• Runs as compiled JAVA byte code– Increases speed for run time

Page 26: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

PHP vs. ASP vs. Cold Fusion

PHP ASPCold

Fusion

Geek Coefficient

High Medium Low

Platform Specific

Low Medium High

Price Low Medium High

Setup Cost High Medium Low

Maintenance Cost

High Medium Low

Page 27: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

So why isn’t every web site in the world using Cold Fusion?

• Legacy applications

• Legacy knowledge and comfort level

• Mind set – LAMP(P)

• Market share

• Initial cost

Page 28: Tools for “ Webifying ” Databases Chet Seymour Melanie Rasmusson Scott Licht

Questions? …