Lecture 10 Rails Projects Topics SaaSSaaS Readings: SaaS book Ch 2, 4 February 24, 2014 CSCE 740 Software Engineering.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Introduction to Rails.
Advertisements

Building and using REST information services Rion Dooley.
The Librarian Web Page Carol Wolf CS396X. Create new controller  To create a new controller that can manage more than just books, type ruby script/generate.
Ruby on Rails Model of MVC. Model-View-Controller Paradigm A way of organizing a software system Benefits: Isolation of business logic from the user interface.
1.  Understanding about How to Working with Server Side Scripting using PHP Framework (CodeIgniter) 2.
Chapter 15 © 2010 by Addison Wesley Longman, Inc Origins and Uses of Ruby - Designed by Yukihiro Matsumoto; released in Use spread rapidly.
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
Ruby on Rails Tutorial Peter Mosca April, Ruby on Rails Tutorial Ruby History Invented 12 years ago in Japan by Yukihiro Matsumoto Spent first 5.
J4www/jea Week 3 Version Slide edits: nas1 Format of lecture: Assignment context: CRUD - “update details” JSP models.
What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used.
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
A complete web app using flex. You can use the flex builder to generate the php (server side) code for a flex-php application. As before, Php connects.
PHP on a Fast Track a quick introduction to PHP programming by Jarek Francik.
Drupal Workshop Introduction to Drupal Part 1: Web Content Management, Advantages/Disadvantages of Drupal, Drupal terminology, Drupal technology, directories.
RUBY ON RAILS Mark Zhang. In this talk  Overview of Ruby on Rails  Core ideas  Show a tiny bit of example code  Touch on several general web development/
Ruby on Rails. What is Ruby on Rails? Ruby on Rails is an open source full-stack web framework. It is an alternative to PHP/MySQL. It can render templates,
Ruby on Rails CSCI 6314 David Gaspar Jennifer Garcia Avila.
CSCI 323 – Web Development Chapter 1 - Setting the Scene We’re going to move through the first few chapters pretty quick since they are a review for most.
J2EE Web Fundamentals Lesson 1 Introduction and Overview
Rails and Grails. To get started Make sure you have java installed You can get the sdk and jre at:
1 Insert, Update and Delete Queries. 2 Return to you Address Book database. Insert a record.
UC Berkeley Hello Rails. Review: MVC Goal: separate organization of data (model) from UI & presentation (view) by introducing controller –mediates user.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
BIT 286: Web Applications Lecture 04 : Thursday, January 15, 2015 ASP.Net MVC - Models.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Web Application Programming Carol Wolf Computer Science.
Model-View-Controller
Lecture 8 Software as a Service (SaaS )
WEB API: WHY THEY MATTER ECOL 453/ Nirav Merchant
MVC & ActiveRecord by Christian Mohr & Mohamed Souiai.
IE 423 – Design of Decision Support Systems Data modeling and database development.
Class02 Introduction to web development with PHP MIS 3501, Fall 2015 Brad N Greenwood Department of MIS Fox School of Business Temple University 8/27/2015.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building Assignment.
Ruby on Rails Your first app. Rails files app/ Contains the controllers, models, views and assets for your application. You’ll focus on this folder for.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Lecture 11 Rails Topics SaaSSaaS Readings: SaaS book Ch February CSCE 740 Software Engineering.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Ruby on Rails CSE 190M, Spring 2009 Week 6. Overview How to use a database Demo creating a blog application on Rails Explain how the application works.
The Active Record Paradigm Databases in Database-Centric Web Site Development.
Chapter 6 Server-side Programming: Java Servlets
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
2007cs Servers on the Web. The World-Wide Web 2007 cs CSS JS HTML Server Browser JS CSS HTML Transfer of resources using HTTP.
Lecture 13b Rails – Controllers and Views Topics SaaSSaaS Readings: SaaS book Ch March 3, 2014 CSCE 740 Software Engineering.
CS 4720 Model-View-Controller CS 4720 – Web & Mobile Systems.
RESTful Web Services What is RESTful?
MVC WITH CODEIGNITER Presented By Bhanu Priya.
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 1: Introduction to IS2803 Rob Gleasure
CS 160 and CMPE/SE 131 Software Engineering February 9 Class Meeting Department of Computer Science Department of Computer Engineering San José State University.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Ruby on Rails. Web Framework for Ruby Designed to make it easier to develop, deploy, and maintain web applications Design with Model-View-Controller –almost.
XML 1. Chapter 8 © 2013 Pearson Education, Inc. Publishing as Prentice Hall SAMPLE XML SCHEMA (XSD) 2 Schema is a record definition, analogous to the.
Using Retrofit framework in implementation of Android REST client David Ante Macan*, Zlatko Stapić, Milan Pavlović* University of Zagreb Faculty of Organization.
Class02 Introduction to web development concepts MIS 3501, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 1/14/2016.
Lecture 12 Rails 169 Review Slides Topics SaaSSaaS Readings: SaaS book Ch February CSCE 740 Software Engineering.
Introduction to web development concepts
MVC Architecture, Symfony Framework for PHP Web Apps
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Relational database and SQL MySQL LAMP SQL queries
CMPE 280 Web UI Design and Development October 24 Class Meeting
Accessing Your MySQL Database from the Web with PHP (Ch 11)
A Very Brief Introduction to Relational Databases
WEB SERVICES From Chapter 19, Distributed Systems
MVC Controllers.
CS4961 Software Design Laboratory Understand Aquila Backend
Chengyu Sun California State University, Los Angeles
Presentation transcript:

Lecture 10 Rails Projects Topics SaaSSaaS Readings: SaaS book Ch 2, 4 February 24, 2014 CSCE 740 Software Engineering

– 2 – CSCE 740 Spring 2014 SaaS round 2 - Last Time  RAILS  Fig ,000 view  Client-server  HTTP & URIs  HTML & CSS  HAML Finish-up Last Lecture Slides  Slides ??? New  Summary of Rails  HAML  Cucumber  Capybara Next Time:

– 3 – CSCE 740 Spring 2014 Rails Summary from Last time  The MVC Architecture  Components of Rails  REST  a New Rails Project  Rails Application Dir  Rails Appl Directory II  Directory: app  HAML - lightweight  YAML-human-readable data serialization format human-readable dataserializationhuman-readable dataserialization  Configuring a DB  Creating a DB  Starting Webrick  rails generate  Setting the Application Home Page  Rails Scaffolding  What’s Next?  Rails Summary  Active Record  … CS 169 Saasbook: Fox and Patterson

– 4 – CSCE 740 Spring 2014 Chapter 2 SaaS Architecture Review Saasbook Fox, Armando; Patterson, David ( ).

– 5 – CSCE 740 Spring 2014 Review Fig 2.3 – URI + HTTPmethod Saasbook Fox, Armando; Patterson, David ( ).

– 6 – CSCE 740 Spring 2014 Fig ,000 ft view

– 7 – CSCE 740 Spring 2014 Fig 2.6 Refining Steps 2 and 3 Saasbook Fox, Armando; Patterson, David ( ).

– 8 – CSCE 740 Spring 2014 Lamp  Early SaaS sites were created using the Perl and PHP scripting languages, whose  availability coincided with the early success of Linux, an open-source operating system, and MySQL, an open-source database.  Thousands of sites are still powered by the LAMP Stack—Linux, Apache, MySQL, and PHP or Perl. Saasbook Fox, Armando; Patterson, David ( ).

– 9 – CSCE 740 Spring 2014 Scalability Saasbook Fox, Armando; Patterson, David ( ).

– 10 – CSCE 740 Spring 2014 Fig 2.8 5,000 ft view Refining Middleware

– 11 – CSCE 740 Spring 2014 Architectures for Web Apps Left - page controller Sinatra Center top – front controller J2EE servlets Center bottom – PHP Right – MVC used by rails Saasbook Fox, Armando; Patterson, David ( ).

– 12 – CSCE 740 Spring 2014 Fig 2.10 – 5,000 ft view Saasbook Fox, Armando; Patterson, David ( ).

– 13 – CSCE 740 Spring Feet: Active Record for Models Active Record architectural pattern  a single instance of a model class (in our case, the entry for a single movie) corresponds to a single row in a specific table Saasbook Fox, Armando; Patterson, David ( ).

– 14 – CSCE 740 Spring 2014 CRUD  Create a new row in the table (representing a new object),  Read an existing row into a single object instance,  Update an existing row with new attribute values from a modified object instance,  Delete a row (destroying the object’s data forever). Saasbook Fox, Armando; Patterson, David ( ).

– 15 – CSCE 740 Spring Feet: Routes, Controllers, and REST REST - In 2000, Roy Fielding proposed, in his Ph.D. dissertation, a consistent way to map requests to actions that is particularly well suited to a service- oriented architecture.  identify the various entities manipulated by a Web app as resources, and  design the routes so that any HTTP request would contain all the information necessary to identify both a particular resource and the action to be performed on it.  In Rails, the route mappings are generated by code in the file config/routes.rb, Saasbook Fox, Armando; Patterson, David ( ).

– 16 – CSCE 740 Spring 2014 Fig 2.12 Rake Routes Summary Operation Method & URI action Index (list) movies GET /moviesindex Read (show) movie GET /movies/:id show Display fill-in form GET /movies/new new Create from filled-in form POST /moviescreate Display form to edit GET /movies/:id/editedit Update movie PUT /movies/:id update Destroy movie DELETE /movies/:id destroy Saasbook Fox, Armando; Patterson, David ( ).

– 17 – CSCE 740 Spring 2014 Fig 2.13 Restful vs nonRestful Login to site Non-RESTful site - POST /login/daveNon-RESTful site - POST /login/dave URI RESTful site - POST /login/daveURI RESTful site - POST /login/dave Welcome page Non-RESTful - GET /welcomeNon-RESTful - GET /welcome URI RESTful - GET /user/301/welcomeURI RESTful - GET /user/301/welcome Add item ID 427 to cart Non-RESTful - POST /add/427Non-RESTful - POST /add/427 URI RESTful - POST /user/301/add/427URI RESTful - POST /user/301/add/427 Saasbook Fox, Armando; Patterson, David ( ).

– 18 – CSCE 740 Spring 2014 View cart Non-RESTful - GET / cartNon-RESTful - GET / cart URI RESTful - GET /user/301/cartURI RESTful - GET /user/301/cartCheckout Non-RESTful - POST /checkoutNon-RESTful - POST /checkout URI RESTful - POST /user/301/checkoutURI RESTful - POST /user/301/checkout Saasbook Fox, Armando; Patterson, David ( ).

– 19 – CSCE 740 Spring 2014 ELABORATION: REST vs. SOAP vs. WS-* SOA standards bodies created committees to develop standards for SOA interoperation. One approach resulted in a collection of elaborate protocols for Web Services including WS-Discovery, WS-Description, and others, sometimes collectively called WS-* and jokingly called “WS-Deathstar” by David Heinemeier Hansson, the creator of Rails. The competing SOAP standard (Simple Object Access Protocol) was a bit simpler but still far more complex than REST. By and large, practicing developers perceived SOAP and WS-* as overdesigned committee-driven standards burdened by the archaic design stance Saasbook Fox, Armando; Patterson, David ( ).

– 20 – CSCE 740 Spring 2014 Fig ft – Template views HAML Haml HTML %br{:clear => ’left’} %br{:clear => ’left’} %p.foo Hello Hello %p.foo Hello Hello %p#foo Hello Hello %p#foo Hello Hello.foo....foo... #foo.bar... #foo.bar... Saasbook Fox, Armando; Patterson, David ( ).