SlideShare a Scribd company logo
1 of 17
DATA PROGRAMINGDATA PROGRAMING
PRESENTED BY:-
NARAYAN AWASTHI
DEAPARTMENT OF GENETICS & PLANT BREEDING
C.C.S UNIVERSITY MEERUT
NDA
Three tiers and their
languages
Client Server Database
Html Java, Ruby SQL
JSP, ERB Visual Basic
JavaScript PHP, Perl
Python
MVC
Model, View, Controller
 Model - Database
◦ Requests sent using SQL, Structured Query Language.
◦ Response is either an array of data or a confirmation.
 View – Web page
◦ Requests sent using Html or embedded programming code
(JSP, ERB, ASP)
 Controller – Program on server
◦ Sits between the model and view.
◦ Receives requests from the view, sends them on to the
model and sends a response back to the view.
◦ Most critical software and trickiest to write.
HTTP
Hypertext Transfer Protocol
 Http is a stateless protocol.
◦ Stateless means that nothing is remembered.
◦ Once a response has been sent, the server forgets where it
went.
 Request
◦ Requests are sent by the client to the server.
◦ They can either be requests for a new page or involve a
form with parameters.
 Response
◦ The server sends a response page in return.
◦ It might be a linked page or data retrieved from a database.
Methods
 Get
◦ Used for simple requests.
◦ Parameters are sent in the URL string.
◦ http://localhost:3000/library/find? title
="Oliver Twist"
 Post
◦ Parameters are sent within the packet.
◦ Used when there are many parameters or when security is
an issue.
◦ Rails uses only post when there are parameters.
Action
 The action contains the URL of the server and the server
program to be executed.
 The URL comes before the question mark and the
parameters after.
 Example of a URL string:
 http://localhost:3000/library/find? title
="Oliver Twist“
 http is the connection protocol.
 localhost:3000 is the name of the server and
the access port on the server.
 library/find gives the directory (library) for the
server program and the program (find) to use
in that directory.
HTML Forms
 Forms consist of data fields and a submit
button. They can also have links to JavaScript
code and formatting tags.
<form method="post" action="http://localhost:3000/library/find">
<p>
<b>Book Title:</b>
<input type = "text" name="title" value = "" size = 20 />
</p>
<p><input type= "submit" value="Find a Book“ /></p>
</form>
This shows an html table containing
three forms. The form in the center is
the one on the previous slide.
Programming Languages
 Java – uses Java servlets, Java Server Pages (JSP) and Java
beans.
 Ruby on Rails – uses ruby programs and Embedded Ruby
(ERB).
 Visual Basic – Uses VB programs and Active Server Pages
(ASP).
 Others
◦ PHP (Personal Home Page – originally)
◦ CGI (Common Gateway Interface)
◦ Perl (Named after the parable of the pearl)
◦ Python (Named for the Monty Python skits)
◦ Tcl (Tool Command Language)
Java
 Developed by James Gosling at Sun
Microsystems in 1991.
 Java servlets on the server control
the flow between the client and the
database.
 JSP (Java Server Pages) can be
embedded in the html on the web
page. They are compiled into
servlets before they are executed.
 Java server pages are connected to
Java beans on the server. The beans
handle the requests and responses.
Ruby on Rails
 Ruby was developed by Yukihiro
Matsumoto in 1993 and publically
released in 1995.
 It is a scripting language and is fully
object oriented.
 It combines Perl syntax with Smalltalk-
like features.
 It is said to follow the ‘principle of
least surprise.’
Ruby on Rails
 Rails was developed by David
Heinemeier Hansson and
released as open source in
July 2004.
 It is based on the MVC
(model, view, controller)
pattern.
 Programmers work on a
higher level than with Java
servlets.
Rails
 Rails relies on a number of conventions.
 JSP and Java beans have some conventions,
but rails has a lot more.
 Rails translates commands into SQL, saving
programmers many hassles.
 Some ‘boiler plate’ is stored separately and added
to web pages when required.
 This includes web page headers, CSS
(Cascading Style Sheets) and JavaScript.
 Database modifications are systematically handled
by ‘migrations.’ These are ruby programs that
when executed change the database.
Servers
 The principal open-source server is Apache, hosting 49% (June
2008) of all web sites.
 There are many modified versions.
 Apache Tomcat – used for JSP and Java beans.
 Google Web Server (GWS)
 IBM WebSphere
 Microsoft Internet Information Services (ISS) is the main proprietary
server, hosting 35.4% of all web sites.
Databases
 Most databases use the relational model,
developed by E. F. Codd in the 1960s and ‘70s.
 Data is stored in tables with rows and columns.
 Queries are usually made with SQL.
 Microsoft has Access for Windows computers.
 MySQL is open source and has more than 11 million
installations world-wide.
 Oracle is a widely used proprietary database
developed by the Oracle Corporation.
 Rails comes with sqlite3.
 There are many more.
Connecting to a database
 Most databases are standalone programs and
so require that each time they are accessed,
you must set up a new connection.
 For Java, the connection is
sun.jdbc.odbc.JdbcOdbcDriver
 Odbc stands for open database connection,
and the ‘J’ in Jdbc is for Java.
 Odbc is a protocol from Microsoft that is based on
the X/Open SQL specification.
 InstantRails comes with SQLite3. It is part of
the application and does not require a new
connection for each query.
Web Browsers
 The first web browser was Mosaic, released in
1993. It was developed by the NCSA, National
Center for Supercomputing Applications. It turned
into the Netscape Navigator and was discontinued
by AOL in 2007.
 Microsoft’s Internet Explorer is the most widely
installed browser with around 73% of market share
world-wide.
 Firefox from the Mozilla Foundation has around
19% of the usage share (August 2008).
 There are a number of other browsers, including
Safari for Macs with a market share around 6%.

More Related Content

What's hot

NiFi - First approach
NiFi - First approachNiFi - First approach
NiFi - First approachMickael Cassy
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance TopicsAli Taki
 
Java database connectivity
Java database connectivityJava database connectivity
Java database connectivityVaishali Modi
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performancerudib
 
Active server pages
Active server pagesActive server pages
Active server pagesstudent
 
Enterprise java unit-3_chapter-1-jsp
Enterprise  java unit-3_chapter-1-jspEnterprise  java unit-3_chapter-1-jsp
Enterprise java unit-3_chapter-1-jspsandeep54552
 
JDBC : Java Database Connectivity
JDBC : Java Database Connectivity JDBC : Java Database Connectivity
JDBC : Java Database Connectivity DevAdnani
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoCASG
 
LAMP Stack Tutorial by jeetendra mandal
LAMP Stack Tutorial by  jeetendra mandalLAMP Stack Tutorial by  jeetendra mandal
LAMP Stack Tutorial by jeetendra mandaljeetendra mandal
 
Ajax for Libraries
Ajax for LibrariesAjax for Libraries
Ajax for Librariesguest5aa3e8
 
Introducing asp
Introducing aspIntroducing asp
Introducing aspaspnet123
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introductionDong Ngoc
 

What's hot (20)

NiFi - First approach
NiFi - First approachNiFi - First approach
NiFi - First approach
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 
Xml
XmlXml
Xml
 
Java database connectivity
Java database connectivityJava database connectivity
Java database connectivity
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Active server pages
Active server pagesActive server pages
Active server pages
 
Enterprise java unit-3_chapter-1-jsp
Enterprise  java unit-3_chapter-1-jspEnterprise  java unit-3_chapter-1-jsp
Enterprise java unit-3_chapter-1-jsp
 
Ajax
AjaxAjax
Ajax
 
Ruby on rails for beginers
Ruby on rails for beginersRuby on rails for beginers
Ruby on rails for beginers
 
JDBC : Java Database Connectivity
JDBC : Java Database Connectivity JDBC : Java Database Connectivity
JDBC : Java Database Connectivity
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoC
 
LAMP Stack Tutorial by jeetendra mandal
LAMP Stack Tutorial by  jeetendra mandalLAMP Stack Tutorial by  jeetendra mandal
LAMP Stack Tutorial by jeetendra mandal
 
Ajax
AjaxAjax
Ajax
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Ajax for Libraries
Ajax for LibrariesAjax for Libraries
Ajax for Libraries
 
Springs_Training
Springs_TrainingSprings_Training
Springs_Training
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
ASP.NET Brief History
ASP.NET Brief HistoryASP.NET Brief History
ASP.NET Brief History
 
Introducing asp
Introducing aspIntroducing asp
Introducing asp
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 

Similar to Data programing

Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)slire
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache TomcatAuwal Amshi
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web DevelopmentSonia Simi
 
Server-side Web development via Ruby on Rails
Server-side Web development via Ruby on RailsServer-side Web development via Ruby on Rails
Server-side Web development via Ruby on Railsg3ppy
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsVictor Porof
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesUdita Plaha
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN StackRob Davarnia
 
Rails
RailsRails
RailsSHC
 
Web programming
Web programmingWeb programming
Web programmingIshucs
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web buildingRC Morales
 
Software development - the java perspective
Software development - the java perspectiveSoftware development - the java perspective
Software development - the java perspectiveAlin Pandichi
 
JDBC java for learning java for learn.ppt
JDBC java for learning java for learn.pptJDBC java for learning java for learn.ppt
JDBC java for learning java for learn.pptkingkolju
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
Websphere interview Questions
Websphere interview QuestionsWebsphere interview Questions
Websphere interview Questionsgummadi1
 

Similar to Data programing (20)

Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Laravel overview
Laravel overviewLaravel overview
Laravel overview
 
Aspose pdf
Aspose pdfAspose pdf
Aspose pdf
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache Tomcat
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
 
Server-side Web development via Ruby on Rails
Server-side Web development via Ruby on RailsServer-side Web development via Ruby on Rails
Server-side Web development via Ruby on Rails
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on Rails
 
Ruby on rails RAD
Ruby on rails RADRuby on rails RAD
Ruby on rails RAD
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails Slides
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
Rails
RailsRails
Rails
 
Web programming
Web programmingWeb programming
Web programming
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web building
 
Software development - the java perspective
Software development - the java perspectiveSoftware development - the java perspective
Software development - the java perspective
 
JDBC java for learning java for learn.ppt
JDBC java for learning java for learn.pptJDBC java for learning java for learn.ppt
JDBC java for learning java for learn.ppt
 
Jsp Comparison
 Jsp Comparison Jsp Comparison
Jsp Comparison
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Websphere interview Questions
Websphere interview QuestionsWebsphere interview Questions
Websphere interview Questions
 

More from Narayan Awasthi

More from Narayan Awasthi (9)

RICE BREEDING
RICE BREEDINGRICE BREEDING
RICE BREEDING
 
Nda
NdaNda
Nda
 
Rishi
RishiRishi
Rishi
 
Narayan presentation of cell
Narayan presentation of cellNarayan presentation of cell
Narayan presentation of cell
 
Transpiration ( rishi) 1
Transpiration ( rishi) 1Transpiration ( rishi) 1
Transpiration ( rishi) 1
 
Presentation blast of rice
Presentation blast of ricePresentation blast of rice
Presentation blast of rice
 
RED ROT OF SUGARCAE
RED ROT OF SUGARCAERED ROT OF SUGARCAE
RED ROT OF SUGARCAE
 
Sex linked and quantitative inheritance
Sex linked and quantitative inheritanceSex linked and quantitative inheritance
Sex linked and quantitative inheritance
 
Mode of reproduction in plants
Mode of reproduction in plantsMode of reproduction in plants
Mode of reproduction in plants
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 

Recently uploaded (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

Data programing

  • 1. DATA PROGRAMINGDATA PROGRAMING PRESENTED BY:- NARAYAN AWASTHI DEAPARTMENT OF GENETICS & PLANT BREEDING C.C.S UNIVERSITY MEERUT NDA
  • 2. Three tiers and their languages Client Server Database Html Java, Ruby SQL JSP, ERB Visual Basic JavaScript PHP, Perl Python
  • 3. MVC Model, View, Controller  Model - Database ◦ Requests sent using SQL, Structured Query Language. ◦ Response is either an array of data or a confirmation.  View – Web page ◦ Requests sent using Html or embedded programming code (JSP, ERB, ASP)  Controller – Program on server ◦ Sits between the model and view. ◦ Receives requests from the view, sends them on to the model and sends a response back to the view. ◦ Most critical software and trickiest to write.
  • 4. HTTP Hypertext Transfer Protocol  Http is a stateless protocol. ◦ Stateless means that nothing is remembered. ◦ Once a response has been sent, the server forgets where it went.  Request ◦ Requests are sent by the client to the server. ◦ They can either be requests for a new page or involve a form with parameters.  Response ◦ The server sends a response page in return. ◦ It might be a linked page or data retrieved from a database.
  • 5. Methods  Get ◦ Used for simple requests. ◦ Parameters are sent in the URL string. ◦ http://localhost:3000/library/find? title ="Oliver Twist"  Post ◦ Parameters are sent within the packet. ◦ Used when there are many parameters or when security is an issue. ◦ Rails uses only post when there are parameters.
  • 6. Action  The action contains the URL of the server and the server program to be executed.  The URL comes before the question mark and the parameters after.  Example of a URL string:  http://localhost:3000/library/find? title ="Oliver Twist“  http is the connection protocol.  localhost:3000 is the name of the server and the access port on the server.  library/find gives the directory (library) for the server program and the program (find) to use in that directory.
  • 7. HTML Forms  Forms consist of data fields and a submit button. They can also have links to JavaScript code and formatting tags. <form method="post" action="http://localhost:3000/library/find"> <p> <b>Book Title:</b> <input type = "text" name="title" value = "" size = 20 /> </p> <p><input type= "submit" value="Find a Book“ /></p> </form>
  • 8. This shows an html table containing three forms. The form in the center is the one on the previous slide.
  • 9. Programming Languages  Java – uses Java servlets, Java Server Pages (JSP) and Java beans.  Ruby on Rails – uses ruby programs and Embedded Ruby (ERB).  Visual Basic – Uses VB programs and Active Server Pages (ASP).  Others ◦ PHP (Personal Home Page – originally) ◦ CGI (Common Gateway Interface) ◦ Perl (Named after the parable of the pearl) ◦ Python (Named for the Monty Python skits) ◦ Tcl (Tool Command Language)
  • 10. Java  Developed by James Gosling at Sun Microsystems in 1991.  Java servlets on the server control the flow between the client and the database.  JSP (Java Server Pages) can be embedded in the html on the web page. They are compiled into servlets before they are executed.  Java server pages are connected to Java beans on the server. The beans handle the requests and responses.
  • 11. Ruby on Rails  Ruby was developed by Yukihiro Matsumoto in 1993 and publically released in 1995.  It is a scripting language and is fully object oriented.  It combines Perl syntax with Smalltalk- like features.  It is said to follow the ‘principle of least surprise.’
  • 12. Ruby on Rails  Rails was developed by David Heinemeier Hansson and released as open source in July 2004.  It is based on the MVC (model, view, controller) pattern.  Programmers work on a higher level than with Java servlets.
  • 13. Rails  Rails relies on a number of conventions.  JSP and Java beans have some conventions, but rails has a lot more.  Rails translates commands into SQL, saving programmers many hassles.  Some ‘boiler plate’ is stored separately and added to web pages when required.  This includes web page headers, CSS (Cascading Style Sheets) and JavaScript.  Database modifications are systematically handled by ‘migrations.’ These are ruby programs that when executed change the database.
  • 14. Servers  The principal open-source server is Apache, hosting 49% (June 2008) of all web sites.  There are many modified versions.  Apache Tomcat – used for JSP and Java beans.  Google Web Server (GWS)  IBM WebSphere  Microsoft Internet Information Services (ISS) is the main proprietary server, hosting 35.4% of all web sites.
  • 15. Databases  Most databases use the relational model, developed by E. F. Codd in the 1960s and ‘70s.  Data is stored in tables with rows and columns.  Queries are usually made with SQL.  Microsoft has Access for Windows computers.  MySQL is open source and has more than 11 million installations world-wide.  Oracle is a widely used proprietary database developed by the Oracle Corporation.  Rails comes with sqlite3.  There are many more.
  • 16. Connecting to a database  Most databases are standalone programs and so require that each time they are accessed, you must set up a new connection.  For Java, the connection is sun.jdbc.odbc.JdbcOdbcDriver  Odbc stands for open database connection, and the ‘J’ in Jdbc is for Java.  Odbc is a protocol from Microsoft that is based on the X/Open SQL specification.  InstantRails comes with SQLite3. It is part of the application and does not require a new connection for each query.
  • 17. Web Browsers  The first web browser was Mosaic, released in 1993. It was developed by the NCSA, National Center for Supercomputing Applications. It turned into the Netscape Navigator and was discontinued by AOL in 2007.  Microsoft’s Internet Explorer is the most widely installed browser with around 73% of market share world-wide.  Firefox from the Mozilla Foundation has around 19% of the usage share (August 2008).  There are a number of other browsers, including Safari for Macs with a market share around 6%.