1 / 18

Web Application Development Application To Bio-Informatics-III

Web Application Development Application To Bio-Informatics-III. Vicky Khanna 200960013 M-Tech Bioinformatics. Why Do We Need Web Applications???. Parsing the NCBI Files to extract a particular pattern. Removal of Hetro-Atoms from RCSB files for Drug Discovery Analysis.

makala
Download Presentation

Web Application Development Application To Bio-Informatics-III

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Application Development Application To Bio-Informatics-III Vicky Khanna 200960013 M-Tech Bioinformatics

  2. Why Do We Need Web Applications??? • Parsing the NCBI Files to extract a particular pattern. • Removal of Hetro-Atoms from RCSB files for Drug Discovery Analysis. • Automated Search and parsing for a particular gene or gene sequence from Meta-Databases like KEGG, NCBI-Genbank,BRENDA etc.

  3. Web Technologies • World Wide Web is based on Client-Server technology • One of the most popular and dominant client server technologies today

  4. Constituents of World Wide Web • Web Browsers • Web Content • Web Site • URL – Uniform Resource Locator • HTTP – Hyper Text Transfer Protocol • HTML – Hyper Text Markup Language • Gateway to Non-Web Resources

  5. Overview Web Server File System HTML Pages GIF/JPG Images etc Web Gateway Non-Web Content (Dynamic Content) Database

  6. Web Content - Types of Content • Static Content • Content resides in a file • Author determines the content at the time of creation • Each request will return exactly the same data (Content doesn’t change) • Example: HTML files, gif/jpeg files • Disadvantage: Not possible to implement applications • Dynamic Content • Created on the fly by a web server upon a request to reflect the current info • Content may vary for each request • Example: A typical web application (Banking etc) • Disadvantage: More processing power required on the server • Active Content • Server returns a run-able copy of the program • Browser executes the program locally on the client machine • May need continuous information feed • Examples: Java Applets, Active-X controls for IE • Disadvantage: Possible Security risks

  7. Web Technologies • The Web Application employs various technologies in different layers. • Client Side Scripting • Web browser • HTML, XHTML, CSS • Scripting Languages • Server Side Scripting • ASP, ASP.NET ( Microsoft Technology) • Servlet and JSP ( Java Technology) • Web Services • XML, DTD, Schema, XML DOM, SOAP, WSDL

  8. Common Gateway Interface (CGI) • A general framework for creating server side web applications. • The first mechanism for creating dynamic web site. • Instead of returning a static web document, web server returns results of a program. • CGI programs can be written in languages like C/C++, Perl, Java, etc.

  9. CGI Overview C\Perl Program Web Server For example • Browser sends the parameter: Genename=chaperone . • Web server passes the request to a C:\Perl program • C:\Perl Program returns HTML that says, TotalGenes=36896 ! Genename=chaperone Genename=chaperone Web Browser TotalGenes=36896 TotalGenes=36896

  10. Name.pl PERL – CGI Programming contd Client sends a HTTP request encoded with the data to be passed to the server (shiv,27 etc) Perl interpreter executes the corresponding perl script and gives back the HTML document. Web server receives the request and understands that this request is for a dynamic page and invokes the perl interpreter by passing the parameters Web server collects the HTML document from the perl and sends It to the browser.

  11. PERL – CGI Programming contd • HTML form & CGI Script <html><body> <form action=“name.pl" method="POST"> Your Name: <input type="text" name="name"><br> Age : <input type="text" name="age"><br> <input type="submit" value="Send"> </form> </body></html> use CGI; print header; print "<HTML> <BODY>"; print "<H1> Hi ".param('name')."!</H1><BR>"; print "<H2> You are ".param('age')." years old!</H2><BR>"; print "</BODY></HTML>";

  12. Working of a CGI Application 7. Invoke getinfo.exe under cgi-bin, passes params thru env variable/stdin 3. Cannot resolve locally? Resolve from other DNS… 2. Translate DNS name to IP address 8. Query DB for Data 4. Returns IP Address 202.68.33.49 getinfo.exe 5. Connect thru the n/w to server 9. Compose HTML on stdout 6. Send HTTP Request 10. Send HTTP Response which contains HTML generated dynamically 1. User Submits form; URL http://abcbooks.co.in/cgi-bin/getinfo.exe?title=Web+Servers

  13. PERL – DBI & DBD • DBD • Database Driver • Have libraries for connecting to various databases • Examples • DBD-Oracle • DBD-Mysql • DBD-CSV • DBD-ODBC • DBI • Database Interface module • DBI modules do not have vendor libraries to access database • It locates the corresponding DBD module for interacting with database

  14. PERL – DBI & DBD DBD - Oracle Oracle Perl Script DBI Module DBD - Mysql Mysql DBD – CSV

  15. PERL – DBI & DBD • Connecting to Oracle Database # !c:\perl\bin\perl.exe use DBI; use DBI::Oracle; # Connecting to database $DBHandle=DBI->connect(“dbi:Oracle:test:172.17.36.166:3306” ,”vicky”,”password”)or die($DBI::errstr); # Database Operations # Disconnecting $DBHandle->disconnect(); • Connecting to Mysql Database use DBI; use DBI::mysql(:sql_types); $DBHandle=DBI->connect(“dbi:mysql:test:172.17.36.166:3306, ”vicky”,”password”)or die(“Error=> DBI::errstr);

  16. PERL – DBI & DBD • Executing Insert statements #!/usr/bin/perl $Fname=“Vicky"; $Roll=200960013; use DBI qw(:sql_types); $DBHandle=DBI->connect("DBI:mysql:test:10.3.4.59:3306","root",”password") or die($DBI::errstr); $query="insert into table values(\"".$Fname."\",".$Roll.")"; $queryhandle=$DBHandle->prepare("$query"); $queryhandle->execute(); $DBHandle->disconnect();

  17. PERL – DBI & DBD • Executing an Select Query #!/usr/bin/perl $Fname=“Vicky"; $Roll=200960013; #use param(“Fname”) in case of HTML use DBI qw(:sql_types); $DBHandle=DBI->connect("DBI:mysql:test:10.3.4.59:3306","root",”password") or die($DBI::errstr); $query1="select * from table"; $queryhandle=$DBHandle->prepare("$query1"); $queryhandle->execute(); $queryhandle->bind_columns(\$FName,\$Roll); while($queryhandle->fetch()) { print $FName." ".$Roll; print "\n"; } $DBHandle->disconnect();

  18. Thank You….

More Related