280 likes | 381 Views
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. Geekiest. PERL combined with modules DBI::Oracle, DBI::MySQL, DBD::ODBC
E N D
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
Geekiest • PERL combined with modules DBI::Oracle, DBI::MySQL, DBD::ODBC • PHP – Zend • SOAP • XML
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>'; } ?>
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
ASP.NET Background • Microsoft Product • ASP = Active Server Pages • ASP.NET replaced the original ASP • Relatively low cost $38.00
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.
ASP.NET Ease of Use • Use far less code than classic ASP. • Displaying data, validating user input, and uploading files are all easy.
ASP.NET Ease of Use • ASP.NET pages work in all browsers. • This includes Netscape, Opera, AOL, and of course Internet Explorer.
ASP.NET Ease of Use • ASP.NET is compatible with any text editor. • You can even support ASP.NET with Notepad.
ASP.NET Ease of Use • Utilizes familiar drag-drop-double-click techniques. • Built in code support includes statement completion and color-coding.
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…
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
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.
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.
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.
ASP.NET Ease of Deployment • Simplified Application Installation: • Microsoft promises deployment of an entire application as easily as an HTML page.
ASP.NET Ease of Deployment • Update with restarting the web-server • ASP.NET promises dynamic updates of an application while its running.
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.
Cold Fusion MX “…solution for rapidly building and deploying Internet applications and web services.”
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
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
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
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
CF – Performance & Scalability • Unlike PHP and ASP which are interpreted • Runs as compiled JAVA byte code • Increases speed for run time
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