Presentation is loading. Please wait.

Presentation is loading. Please wait.

Six Degrees of Separation Saahil Peerbhoy Amortya Ray Aaron Fernandes Ritika Virmani Swapneel Sheth Josh Poritz.

Similar presentations


Presentation on theme: "Six Degrees of Separation Saahil Peerbhoy Amortya Ray Aaron Fernandes Ritika Virmani Swapneel Sheth Josh Poritz."— Presentation transcript:

1 Six Degrees of Separation Saahil Peerbhoy Amortya Ray Aaron Fernandes Ritika Virmani Swapneel Sheth Josh Poritz

2 Goal To compare and contrast different scripting languages/frameworks by developing a basic application that performs: To compare and contrast different scripting languages/frameworks by developing a basic application that performs: create, update, delete and insertion operations on a database. create, update, delete and insertion operations on a database. Basic input validation, such as SQL injection. Basic input validation, such as SQL injection. Searching and Sorting of the songs in the database. Searching and Sorting of the songs in the database.

3 Languages/Frameworks Saahil : Java Servlets Saahil : Java Servlets Amortya : Python – Turbogears Amortya : Python – Turbogears Aaron : PHP – symfony Aaron : PHP – symfony Ritika : Python – Django Ritika : Python – Django Swapneel : Ruby – Ruby on Rails Swapneel : Ruby – Ruby on Rails Josh : Perl – Catalyst Josh : Perl – Catalyst

4 Database Schema Online Music Repository Database Online Music Repository Database Single table having the following schema Single table having the following schema Songs ( Songs ( SongIdint SongIdint Titlevarchar Titlevarchar Artistvarchar Artistvarchar Albumvarchar Albumvarchar Yearint Yearint Genrevarchar Genrevarchar Ratingint Ratingint Lengthtime Lengthtime)

5 Java Servlets Implementation Servlets are Java technology's answer to CGI programming Servlets are Java technology's answer to CGI programming Database server : MySQL Database server : MySQL Web Server : Jakarta Tomcat Web Server : Jakarta Tomcat

6 MVC Framework The implementation using servlets does not follow the Model-View-Controller framework The implementation using servlets does not follow the Model-View-Controller framework One way to do so would have been to use JSP’s along with servlets. Then, One way to do so would have been to use JSP’s along with servlets. Then, Servlets- controller Servlets- controller JSPs – View JSPs – View Database - Model Database - Model

7 Three Tier Architecture

8 Advantages of Java Servlets Efficiency : For every request, another process is not spawned (unlike PHP-CGI). Instead, the JVM spawns a lightweight thread which deals with the particular request. Efficiency : For every request, another process is not spawned (unlike PHP-CGI). Instead, the JVM spawns a lightweight thread which deals with the particular request. Only one copy of the servlet class is loaded into memory. Only one copy of the servlet class is loaded into memory. The servlets remain in memory between requests and thus make it easy to store data between requests. The servlets remain in memory between requests and thus make it easy to store data between requests. Example : maintaining a database connection pool. (DBConnectionPool class) Example : maintaining a database connection pool. (DBConnectionPool class)

9 Advantages of Java Servlets Convenient : Plenty of useful packages available for you to use. Convenient : Plenty of useful packages available for you to use. I would have to agree that writing a simple application using servlets is easier in other languages, but if you want to do something a little more complex there are plenty of Java APIs available for you to use I would have to agree that writing a simple application using servlets is easier in other languages, but if you want to do something a little more complex there are plenty of Java APIs available for you to use You already know Java. You already know Java.

10 Advantages of Java Servlets PORTABLE : Servlets are written in Java and hence are highly portable. The same servlet can be run on virtually any web server PORTABLE : Servlets are written in Java and hence are highly portable. The same servlet can be run on virtually any web server SECURE : Servlets are executed within the ‘safe’ environment of the JVM and are thus inherently safe SECURE : Servlets are executed within the ‘safe’ environment of the JVM and are thus inherently safe

11 Java Frameworks Apache Struts: is an open-source framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC) architecture. Apache Struts: is an open-source framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC) architecture. Disadvantages: Disadvantages: 1. Big learning curve. 2. Documentation is not as good as that for servlets.


Download ppt "Six Degrees of Separation Saahil Peerbhoy Amortya Ray Aaron Fernandes Ritika Virmani Swapneel Sheth Josh Poritz."

Similar presentations


Ads by Google