Lecture 4. Ruby on Rails 1 / 49

Size: px
Start display at page:

Download "Lecture 4. Ruby on Rails 1 / 49"

Transcription

1 Lecture 4 Ruby on Rails 1 / 49

2 Client-Server Model 2 / 49

3 What is it? A client (e.g. web browser, phone, computer, etc.) sends a request to a server Request is an HTTP request Stands for HyperText Transfer Protocol The server receives this request and sends back a response This response is usually a web page (i.e. HTML with accompanying files) or data, usually in XML or JSON 3 / 49

4 Client-server 4 / 49

5 HTTP Verbs The five most common types of HTTP requests are: GET POST PUT/PATCH DELETE 5 / 49

6 GET Request This is usually the default type of request sent When you enter a URL or click a link, a GET request is sent for the webpage When a webpage updates, it probably sent a GET request behind the scenes to get the new data As the name suggests, it should only be used to get something 6 / 49

7 POST Request This should be used to send data from the client to the server While you can technically use GET requests to send data, you should always use a POST request instead It's much more robust and secure This is the default type of request sent when submitting a form (i.e. signing into a website) 7 / 49

8 PUT/PATCH Request This should be used to update something on the server You could technically use a POST request to update as well, but it is convention to use a PUT or PATCH request instead The main difference between PUT and PATCH: A PUT request is used to update an entire record A PATCH request is used to update part of it 8 / 49

9 DELETE Request This should be used to delete something on the server While you could technically use a POST request to delete, it is convention to use a DELETE request instead 9 / 49

10 MVC 10 / 49

11 MVC Stands for Model-View-Controller Famous architectural pattern Rails is organized with MVC Every community has different definitions and conventions for MVC Rails is no different Ignore the conventions of other communities when working with Rails 11 / 49

12 Model Layer of the application with the crux of the application's logic Main place where the database is directly accessed In general, the controller will make a request to the model and the model will send back the requested data 12 / 49

13 View Layer of the application that the user will see and interact with It should have very minimal logic inside of it In general, the controller will send data (likely retrieved from the model) to the view to be rendered to the user 13 / 49

14 Controller The controller is the layer of the application that handles HTTP requests Depending on the request and route (think URL) you're on, it may do two things: Gets info from the model Renders an HTML view that displays the info it got from the model So it communicates with both the Model and the View The controller should try to pass off as much logic as possible to the Model 14 / 49

15 15 / 49

16 Ruby on Rails 16 / 49

17 Ruby on Rails Also referred to as Rails It is an opinionated web framework that allows you to quickly get a website up and runningg We will be using version It is extremely important that you use the correct version Make sure that you are NOT using / 49

18 Ruby on Rails History Created by David Heinemeier Hansson (DHH) First open sourced in July 2004 Revolutionized web development from / 49

19 Getting Started gem install rails -v Create a Rails app: rails new app_name Creates a directory of your rails app with all the basic directories and files By default, it will bundle install all of the gems in the Gemfile 19 / 49

20 Directory Structure **app/ bin/ Organizes application components Models, views & controllers go here Images, stylesheets, JavaScripts specific to this application go in app/assets/ The majority of the changes you'll make will be in this directory Contains app executables 20 / 49

21 Directory Structure **config/ **db/ Contains all of the application's configuration files Home to the routes file that declares the app's routes Other than editing config/routes.rb, you won't spend much time in here Contains all database related files (db/schema.rb, migration files, db/seeds.rb, etc.) 21 / 49

22 Directory Structure lib/ log/ Houses code that could be reused by different applications Great place for modules like Referenceable! Contains all of the application logs public/ HTML templates for errors, favicon, etc. 22 / 49

23 Directory Structure test/ tmp/ Rails uses MiniTest Your homework assignments will have a spec/ folder instead Temporary files vendor/ Contains third party libraries 23 / 49

24 Starting the Server/Console rails server (or rails s) will start the Rails app Visit in a web browser You've got a Rails site! rails console (or rails c) will start a Rails console This allows you to interact with individual pieces of your Rails app Similar to the consoles that you were provided in the first assignments 24 / 49

25 Creating a Homepage What we'll need: A controller to handle the request when the user visits the homepage (root) A view to be able to show actual content to the user A route to tell Rails what controller to use when a user visits the root of our app We're not working with data so we won't need a model 25 / 49

26 Controllers Your controllers should be placed inside of app/controllers/ General naming convention: app/controllers/{controller_name}_controller.rb Should inherit from ApplicationController You define methods in the controller that are known as actions Controller actions are mapped to specific routes Specify what should happen when a request for a specific route is made 26 / 49

27 Homepage Controller Define a Welcome controller and define an index action inside of it We will set up this controller and action to handle the request to our site's homepage # app/controllers/welcome_controller.rb class WelcomeController < ApplicationController def index end end 27 / 49

28 Routes Your routes should be defined inside of config/routes.rb Routes map a request type and a path to a specific controller and action When you define a route, you specify: The type of request The corresponding path What controller action should be used request_type 'path', to: 'controller#action' Run rails routes to view all of the routes you've defined 28 / 49

29 Homepage Route Our homepage route: Request Type: get Path: / (the root of our application) Controller: welcome Action: index # config/routes.rb Rails.application.routes.draw do # The following are equivalent, use the latter: # get '/', to: 'welcome#index' # root to: 'welcome#index' root 'welcome#index' end 29 / 49

30 Views Your views should be placed inside of app/views/ General naming convention: app/views/{controller_name}/{controller_action}.html.erb Unless you tell it otherwise, a controller action will render the view file with its same name by default The.html.erb ending allows you to write HTML code with Ruby embedded inside of it 30 / 49

31 Application View Located at: app/views/layouts/application.html.erb Defines the basic layout for every view in your app Contains the HTML boilerplate code Contains the yield keyword This is where the HTML that you write in your individual views will be placed This means that you don't have to write out all of the boilerplate for every view 31 / 49

32 Homepage View Start by creating app/views/welcome/index.html.erb We don't need to include the HTML boilerplate <!-- app/views/welcome/index.html.erb --> <h1>welcome to our Rails Application!</h1> <p>it's a great app!</p> Visit the root of the application to see our homepage in action! 32 / 49

33 ERB erb stands for Embedded RuBy Our views files end in.html.erb This allows us to include Ruby code directly in our views files This means that we can include dynamic content! 33 / 49

34 ERB Tags In an erb file, any Ruby code placed between: <% %> will be executed, but not printed Used for things like iterators <%= %> will be executed and printed <%# %> will be a comment There are many other variations, but you will use these the most Find out more here 34 / 49

35 Homepage ERB <%# app/views/welcome/index.html.erb %> <p>please thank our developers:</p> <ul> <% ['Desmond', 'Sanjana'].each do name %> <li><%= name %></li> <% end %> </ul> will generate the following HTML code: <p>please thank our developers:</p> <ul> <li>desmond</li> <li>sanjana</li> </ul> 35 / 49

36 Communicating between Controller & View You can pass data from the controller to the view Very important for following MVC best practices If you define an instance variable in a controller action, it will be available in its corresponding view 36 / 49

37 Passing Data to our Homepage View # app/controllers/welcome_controller.rb class WelcomeController < ApplicationController def = ['Desmond', 'Sanjana', 'Zhilei'] end end <%# app/views/welcome/index.html.erb %> <ul> do name %> <li><%= name %></li> <% end %> </ul> 37 / 49

38 38 / 49

39 What about other requests? In general, GET requests are the only requests that have a corresponding view file Other request types usually handle the request you sent and then do one of the following: Redirect the browser to another path using a GET request (usually when the request was successful) Render the view of another controller action (usually when the request was not successful) 39 / 49

40 Example: Logging in You make a GET request to which renders the login page You type in your username and password and click submit This triggers a POST request which does one of two things: If the info you entered was correct, it redirects you to using a GET request If the info you entered was incorrect, it rerenders the login page (probably with an error message) 40 / 49

41 POST Request Example We will make a POST request that handles a user subscribing to a newsletter They will submit a form with their full name and What we'll need: A form - we'll add it to the homepage A new controller action - we'll add it to the welcome controller A route Note that we are not creating a new view 41 / 49

42 Subscribe Route Our subscribe route will be a POST request to '/subscribe' We will make a controller action called subscribe inside of the welcome controller # config/routes.rb post '/subscribe', to: 'welcome#subscribe' 42 / 49

43 Form Instead of creating a form directly in HTML, we use Rails helpers to generate one using Ruby Rails 5.1 introduced the form_with tag which we will use for generating all forms <%# app/views/welcome/index.html.erb %> <%= form_with url: '/subscribe' do form %> <%= form.text_field :name, placeholder: 'Name' %> <%= form. _field : , placeholder: ' ' %> <%= form.submit 'Subscribe' %> <% end %> 43 / 49

44 Controller Action Check to make sure that the user entered in a name and Redirect to a success page if successful Re-render the subscribe form otherwise # app/controllers/welcome_controller.rb def subscribe if params[:name].present? && params[: ] # TODO: Save subscription in database redirect_to '/' else render :index end end 44 / 49

45 Params You'll notice that we referenced params in the previous slide The params hash will contain information from the user's request & can always be accessed You can get the names of the controller and action with params[:controller] and params[:action] You can get submitted form values You can also get parameters from the URL itself (such as an id) 45 / 49

46 More on Routes Routes can have parameters get '/subscribed/:user_name', to: 'welcome#subscribed' In the above route, user_name will be a parameter & is a wildcard matcher /subscribed/sanjana-s, /subscribed/15, /subscribed/aoisjfisajosjs will all match this route We can access the user_name from params like this: params[:user_name] View all routes defined in an application by running rails routes in the command line 46 / 49

47 Resources Ruby on Rails Guides They're very beginner-friendly and explain concepts clearly You can find the answer to almost any question here Ruby on Rails API This is a little more confusing, but great for finding more specific details 47 / 49

48 Homework 4 48 / 49

49 Homework 4 In this assignment, you will be building a RESTful application from scratch We will discuss REST in detail next week You will be provided with the model and view layers, and will focus solely on the controller in this assignment This is the first assignment where you will lose points for best practices 49 / 49

Lecture 4. Ruby on Rails 1 / 52

Lecture 4. Ruby on Rails 1 / 52 Lecture 4 Ruby on Rails 1 / 52 Homeworks 2 & 3 Grades were released for homework 2 Homework 3 was due last night Everyone got a style freebie since my default setup ignores spec files and I didn't change

More information

Lecture 7. Action View, Bootstrap & Deploying 1 / 40

Lecture 7. Action View, Bootstrap & Deploying 1 / 40 Lecture 7 Action View, Bootstrap & Deploying 1 / 40 Homeworks 5 & 6 Homework 5 was graded Homework 6 was due last night Any questions? 2 / 40 How would you rate the di culty of Homework 6? Vote at http://pollev.com/cis196776

More information

CSCI-2320 Web Programming: Ruby on Rails

CSCI-2320 Web Programming: Ruby on Rails CSCI-2320 Web Programming: Ruby on Rails Mohammad T. Irfan Plan u Model-View-Controller (MVC) framework of web programming u Ruby on Rails 1 Ruby on Rails u Developed by David Hansson released 2004 u MVC

More information

Introduction and first application. Luigi De Russis. Rails 101

Introduction and first application. Luigi De Russis. Rails 101 Introduction and first application Luigi De Russis 2 About Rails Ruby on Rails 3 Framework for making dynamic web applications created in 2003 Open Source (MIT License) for the Ruby programming language

More information

Rails: Views and Controllers

Rails: Views and Controllers Rails: Views and Controllers Computer Science and Engineering College of Engineering The Ohio State University Lecture 18 Recall: Rails Architecture Wiring Views and Controllers A controller is just an

More information

Lecture 8. Validations & Sessions 1 / 41

Lecture 8. Validations & Sessions 1 / 41 Lecture 8 Validations & Sessions 1 / 41 Advanced Active Record 2 / 41 More Complex Queries Arel provides us with a number of methods to query our database tables So far, we've only used find which limits

More information

Getting Started with Rails

Getting Started with Rails Getting Started with Rails January 13, 2015 This guide covers getting up and running with Ruby on Rails. After reading this guide, you will know: How to install Rails, create a new Rails application, and

More information

Lecture 9. Forms & APIs 1 / 38

Lecture 9. Forms & APIs 1 / 38 Lecture 9 Forms & APIs 1 / 38 Final Project Proposal Due November 12th 11:59PM Should include: A summary of your idea A diagram with the db tables you plan to use& the relationships between them You can

More information

Contents in Detail. Foreword by Xavier Noria

Contents in Detail. Foreword by Xavier Noria Contents in Detail Foreword by Xavier Noria Acknowledgments xv xvii Introduction xix Who This Book Is For................................................ xx Overview...xx Installation.... xxi Ruby, Rails,

More information

Ruby on Rails Welcome. Using the exercise files

Ruby on Rails Welcome. Using the exercise files Ruby on Rails Welcome Welcome to Ruby on Rails Essential Training. In this course, we're going to learn the popular open source web development framework. We will walk through each part of the framework,

More information

Rails 5 Quickly. Bala Paranj

Rails 5 Quickly. Bala Paranj Rails 5 Quickly Bala Paranj 1 About the Author Bala Paranj has a masters degree in Electrical Engineering from The Wichita State University. He has been working in the software industry since 1996. He

More information

Problem: Write HTML would create web page depicted below. Your solution must include the following types of HTML elements (and no other

Problem: Write HTML would create web page depicted below. Your solution must include the following types of HTML elements (and no other Problem: Write HTML would create web page depicted below. Your solution must include the following types of HTML elements (and no other types):!doctype, a (with href attribute), body, h1, head, html, img

More information

Ruby on Rails TKK, Otto Hilska

Ruby on Rails TKK, Otto Hilska Ruby on Rails intro @ TKK, 25.5.2009 Otto Hilska 1 Today s agenda 1. The Ruby programming language 2. Ruby on Rails framework 3. An example project 2 About me Started Nodeta Oy in 2004 10+ employees always

More information

Day 3: 26/April/2012 Scaffolding Generation of Skeletons; Test run Memopad

Day 3: 26/April/2012 Scaffolding Generation of Skeletons; Test run Memopad Day 3: 26/April/2012 Scaffolding Generation of Skeletons; Test run Memopad p Generate WEB screens of the MemoPad Database Application n Setting up for Database Connection n Automatic generation of DB Files

More information

Rails 4 Quickly. Bala Paranj

Rails 4 Quickly. Bala Paranj Rails 4 Quickly Bala Paranj 1 About Author Bala Paranj has a Master s degree in Electrical Engineering from The Wichita State University. He has over 15 years of experience in the software industry. He

More information

Ruby on Rails. SITC Workshop Series American University of Nigeria FALL 2017

Ruby on Rails. SITC Workshop Series American University of Nigeria FALL 2017 Ruby on Rails SITC Workshop Series American University of Nigeria FALL 2017 1 Evolution of Web Web 1.x Web 1.0: user interaction == server roundtrip Other than filling out form fields Every user interaction

More information

Rails Engines. Use Case. The Implementation

Rails Engines. Use Case. The Implementation Rails Engines Rails engines range from simple plugins to powerful micro-applications. The discussions we ve had so far about Railties are closely related to the function of a Rails engine. One interesting

More information

COM401 Software Engineering Laboratory

COM401 Software Engineering Laboratory Computer Engineering Department COM401 Software Engineering Laboratory November 04, 2014 LAB-3: Rails Introduction Time: 2 lab hours Objectives: Practice with Ruby Symbols Routes MVC pattern CRUD operations

More information

Client Side MVC with Backbone & Rails. Tom

Client Side MVC with Backbone & Rails. Tom Client Side MVC with Backbone & Rails Tom Zeng @tomzeng tom@intridea.com Client Side MV* with Backbone & Rails Benefits of Client Side MVC Backbone.js Introduction Client Side MV* Alternatives Backbone

More information

Day 8: 7/June/2012. Log-in Authentication

Day 8: 7/June/2012. Log-in Authentication Day 8: 7/June/2012 Log-in Authentication p Learn authentication so that only specific users can use the Web information of the system. p We use Devise to p Add one line to the file project/gemfile gem

More information

Rails: MVC in action

Rails: MVC in action Ruby on Rails Basic Facts 1. Rails is a web application framework built upon, and written in, the Ruby programming language. 2. Open source 3. Easy to learn; difficult to master. 4. Fun (and a time-saver)!

More information

Ruby on Rails 3. Robert Crida Stuart Corbishley. Clue Technologies

Ruby on Rails 3. Robert Crida Stuart Corbishley. Clue Technologies Ruby on Rails 3 Robert Crida Stuart Corbishley Clue Technologies Topic Overview What is Rails New in Rails 3 New Project Generators MVC Active Record UJS RVM Bundler Migrations Factory Girl RSpec haml

More information

ConJobs: Part 1 - Program your receipt printer

ConJobs: Part 1 - Program your receipt printer ConJobs: Part 1 - Program your receipt printer Step 1: Prepare thermal printer Cut wires and connect the power to the printer. Screw the wires down from the power adapter. Check that the green light flashes,

More information

Lecture 8. ReactJS 1 / 24

Lecture 8. ReactJS 1 / 24 Lecture 8 ReactJS 1 / 24 Agenda 1. JSX 2. React 3. Redux 2 / 24 JSX 3 / 24 JavaScript + HTML = JSX JSX is a language extension that allows you to write HTML directly into your JavaScript files. Behind

More information

Hello, world! 3.1. Ruby on Rails Web SimpleGreeter Hello, world! Rails SimpleGreeter Web Rails projects. ruby $ mkdir -p ~/projects

Hello, world! 3.1. Ruby on Rails Web SimpleGreeter Hello, world! Rails SimpleGreeter Web Rails projects. ruby $ mkdir -p ~/projects 3 Hello, world! Ruby on Rails Web SimpleGreeter Hello, world! 3.1 Rails SimpleGreeter Web Rails projects OIAX BOOKS Ruby on Rails 5.0 $ mkdir -p ~/projects ruby 2.3.1 15 3 Hello, world! $ cd ~/projects

More information

CS169.1x Lecture 6: Basic Rails" Fall 2012"

CS169.1x Lecture 6: Basic Rails Fall 2012 CS169.1x Lecture 6: Basic Rails" Fall 2012" 1" The Database is Golden Contains valuable customer data don t want to test your app on that! Rails solution: development, production and test environments

More information

At the Forge RJS Templates Reuven M. Lerner Abstract The power of Ajax to fetch and run JavaScript generated by your server-side language. The past few months, I've written a number of articles in this

More information

web.py Tutorial Tom Kelliher, CS 317 This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment.

web.py Tutorial Tom Kelliher, CS 317 This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment. web.py Tutorial Tom Kelliher, CS 317 1 Acknowledgment This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment. 2 Starting So you know Python and want to make

More information

Introduction to Ruby on Rails

Introduction to Ruby on Rails Introduction to Ruby on Rails Keven Richly keven.richly@hpi.de Software Engineering II WS 2017/18 Prof. Plattner, Dr. Uflacker Enterprise Platform and Integration Concepts group Introduction to Ruby on

More information

iflame INSTITUTE OF TECHNOLOGY

iflame INSTITUTE OF TECHNOLOGY Web Development Ruby On Rails Duration: 3.5 Month Course Overview Ruby On Rails 4.0 Training From Iflame Allows You To Build Full Featured, High Quality, Object Oriented Web Apps. Ruby On Rails Is A Full

More information

Client Side JavaScript and AJAX

Client Side JavaScript and AJAX Client Side JavaScript and AJAX Client side javascript is JavaScript that runs in the browsers of people using your site. So far all the JavaScript code we've written runs on our node.js server. This is

More information

Introduction to Ruby on Rails

Introduction to Ruby on Rails Introduction to Ruby on Rails Software Engineering II WS 2016/17 Arian Treffer arian.treffer@hpi.de Prof. Plattner, Dr. Uflacker Enterprise Platform and Integration Concepts group Introduction to Ruby

More information

Website SEO Checklist

Website SEO Checklist Website SEO Checklist Main points to have a flawless start for your new website. Domain Optimization Meta Data Up-to-Date Content Optimization SEO & Analytics Social Markup Markup Accessibility Browser

More information

SYMFONY2 WEB FRAMEWORK

SYMFONY2 WEB FRAMEWORK 1 5828 Foundations of Software Engineering Spring 2012 SYMFONY2 WEB FRAMEWORK By Mazin Hakeem Khaled Alanezi 2 Agenda Introduction What is a Framework? Why Use a Framework? What is Symfony2? Symfony2 from

More information

Episode 298. Getting Started With Spree

Episode 298. Getting Started With Spree Episode 298 Getting Started With Spree Spree 1 is a fully-featured e-commerce solution that can be easily integrated into a Rails application. If you need to turn a Rails app into a store that sells products

More information

Agile Web Development with Rails 5

Agile Web Development with Rails 5 Extracted from: Agile Web Development with Rails 5 This PDF file contains pages extracted from Agile Web Development with Rails 5, published by the Pragmatic Bookshelf. For more information or to purchase

More information

Lecture 3. Miscellaneous Ruby and Testing

Lecture 3. Miscellaneous Ruby and Testing Lecture 3 Miscellaneous Ruby and Testing 1 Sublime Text Guide I wrote a quick Sublime Text Guide that will help with Rubocop offenses It ll walk you through: Using spaces instead of tabs by default Using

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Laravel

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Laravel About the Tutorial Laravel is a powerful MVC PHP framework, designed for developers who need a simple and elegant toolkit to create full-featured web applications. Laravel was created by Taylor Otwell.

More information

Introduction to Ruby on Rails

Introduction to Ruby on Rails Introduction to Ruby on Rails Ralf Teusner ralf.teusner@hpi.de Software Engineering II WS 2018/19 Prof. Plattner, Dr. Uflacker Enterprise Platform and Integration Concepts group Introduction to Ruby on

More information

welcome to BOILERCAMP HOW TO WEB DEV

welcome to BOILERCAMP HOW TO WEB DEV welcome to BOILERCAMP HOW TO WEB DEV Introduction / Project Overview The Plan Personal Website/Blog Schedule Introduction / Project Overview HTML / CSS Client-side JavaScript Lunch Node.js / Express.js

More information

Lecture 3. Miscellaneous Ruby and Testing 1 / 40

Lecture 3. Miscellaneous Ruby and Testing 1 / 40 Lecture 3 Miscellaneous Ruby and Testing 1 / 40 Homework 1 Grades were released! TAs provided feedback on best practices, but did not take off points Keep the comments in mind for future assignments! Any

More information

Reading How the Web Works

Reading How the Web Works Reading 1.3 - How the Web Works By Jonathan Lane Introduction Every so often, you get offered a behind-the-scenes look at the cogs and fan belts behind the action. Today is your lucky day. In this article

More information

Rails: Associations and Validation

Rails: Associations and Validation Rails: Associations and Validation Computer Science and Engineering College of Engineering The Ohio State University Lecture 17 Schemas, Migrations, Models migrations models database.yml db:migrate db:create

More information

Lecture 3. Miscellaneous Ruby and Testing 1 / 48

Lecture 3. Miscellaneous Ruby and Testing 1 / 48 Lecture 3 Miscellaneous Ruby and Testing 1 / 48 Homework 1 Grades were released! TAs provided feedback on best practices, but did not take off points Keep the comments in mind for future assignments! Any

More information

Website Development (WEB) Lab Exercises

Website Development (WEB) Lab Exercises Website Development (WEB) Lab Exercises Select exercises from the lists below to complete your training in Website Development and earn 125 points. You do not need to do all the exercises listed, except

More information

Rails Guide. MVC Architecture. Migrations. Hey, thanks a lot for picking up this guide!

Rails Guide. MVC Architecture. Migrations. Hey, thanks a lot for picking up this guide! Rails Guide Hey, thanks a lot for picking up this guide! I created this guide as a quick reference for when you are working on your projects, so you can quickly find what you need & keep going. Hope it

More information

CS50 Quiz Review. November 13, 2017

CS50 Quiz Review. November 13, 2017 CS50 Quiz Review November 13, 2017 Info http://docs.cs50.net/2017/fall/quiz/about.html 48-hour window in which to take the quiz. You should require much less than that; expect an appropriately-scaled down

More information

Setting Up A WordPress Blog

Setting Up A WordPress Blog Setting Up A WordPress Blog Introduction WordPress can be installed alongside an existing website to be used solely as the 'blog' element of a website, or it can be set up as the foundation for an entire

More information

Introducing Models. Data model: represent classes that iteract with a database. Data models are set of

Introducing Models. Data model: represent classes that iteract with a database. Data models are set of Models 1 Objectives Define and describe models Explain how to create a model Describe how to pass model data from controllers to view Explain how to create strongly typed models Explain the role of the

More information

Strategies for Rapid Web Prototyping. Ruby on Rails. Clemens H. Cap

Strategies for Rapid Web Prototyping. Ruby on Rails. Clemens H. Cap Strategies for Rapid Web Prototyping Ruby on Rails Strategies for Rapid Web Prototyping DRY: Don't repeat yourself Convention over Configuration Separation of Concern Templating MVC: Model View Controler

More information

Quick housekeeping Last Two Homeworks Extra Credit for demoing project prototypes Reminder about Project Deadlines/specifics Class on April 12th Resul

Quick housekeeping Last Two Homeworks Extra Credit for demoing project prototypes Reminder about Project Deadlines/specifics Class on April 12th Resul CIS192 Python Programming Web Frameworks and Web APIs Harry Smith University of Pennsylvania March 29, 2016 Harry Smith (University of Pennsylvania) CIS 192 March 29, 2016 1 / 25 Quick housekeeping Last

More information

CS 155 Project 2. Overview & Part A

CS 155 Project 2. Overview & Part A CS 155 Project 2 Overview & Part A Project 2 Web application security Composed of two parts Part A: Attack Part B: Defense Due date: Part A: May 5th (Thu) Part B: May 12th (Thu) Project 2 Ruby-on-Rails

More information

Unifer Documentation. Release V1.0. Matthew S

Unifer Documentation. Release V1.0. Matthew S Unifer Documentation Release V1.0 Matthew S July 28, 2014 Contents 1 Unifer Tutorial - Notes Web App 3 1.1 Setting up................................................. 3 1.2 Getting the Template...........................................

More information

Model-View-Controller (MVC)

Model-View-Controller (MVC) Model-View-Controller (MVC) with Ruby on Rails Software Languages Team University of Koblenz-Landau Ralf Lämmel and Andrei Varanovich MVC - a classic definition The Model is the application object The

More information

Node.js. Node.js Overview. CS144: Web Applications

Node.js. Node.js Overview. CS144: Web Applications Node.js Node.js Overview JavaScript runtime environment based on Chrome V8 JavaScript engine Allows JavaScript to run on any computer JavaScript everywhere! On browsers and servers! Intended to run directly

More information

AngularJS Intro Homework

AngularJS Intro Homework AngularJS Intro Homework Contents 1. Overview... 2 2. Database Requirements... 2 3. Navigation Requirements... 3 4. Styling Requirements... 4 5. Project Organization Specs (for the Routing Part of this

More information

Lecture 2. Object Orientation 1 / 50

Lecture 2. Object Orientation 1 / 50 Lecture 2 Object Orientation 1 / 50 Homework 1 Homework 1 was due last night You will be graded on: Correctness: 15 points (passing all RSpec tests) Style: 5 points (having no Rubocop style offenses) Best

More information

Whitehat Copycat Awebwer BluePrint. Tim Bekker introducing Copycat Sites...

Whitehat Copycat Awebwer BluePrint. Tim Bekker introducing Copycat Sites... Whitehat Copycat Awebwer BluePrint Tim Bekker introducing Copycat Sites... Create a Download Page with Opt in! I am going to tell you how you can create your own Download Page like www.shareadownload.com/download

More information

Create-A-Page Design Documentation

Create-A-Page Design Documentation Create-A-Page Design Documentation Group 9 C r e a t e - A - P a g e This document contains a description of all development tools utilized by Create-A-Page, as well as sequence diagrams, the entity-relationship

More information

Working with the Seagull Framework. By Demian Turner, Seagull Systems

Working with the Seagull Framework. By Demian Turner, Seagull Systems Working with the Seagull Framework By Demian Turner, Seagull Systems seagullproject.org Who is Demian Turner? Developing websites since 1996, using PHP since 1999 Committer on several open source projects:

More information

CIS192 Python Programming

CIS192 Python Programming CIS192 Python Programming Web Servers and Web APIs Raymond Yin University of Pennsylvania November 12, 2015 Raymond Yin (University of Pennsylvania) CIS 192 November 12, 2015 1 / 23 Outline 1 Web Servers

More information

Frontend Web Development with Angular. CC BY-NC-ND Carrot & Company GmbH

Frontend Web Development with Angular. CC BY-NC-ND Carrot & Company GmbH Frontend Web Development with Angular Agenda Questions Some infos Lecturing Todos Router NgModules Questions? Some Infos Code comments from us were made for improving your code. If you ignore them you

More information

Customer Redirect Pro for Magento 2

Customer Redirect Pro for Magento 2 Customer Redirect Pro for Magento 2 www.magepsycho.com (Quality extension provider for Magento 1 & Magento 2) Contents 1. Overview... 3 2. Installation... 4 3. Manage Settings... 5 3.1. General Settings...

More information

Building Block Installation - Admins

Building Block Installation - Admins Building Block Installation - Admins Overview To use your Blackboard Server with Panopto, you first need to install the Panopto Building Block on your Blackboard server. You then need to add Blackboard

More information

Section 1: How The Internet Works

Section 1: How The Internet Works Dreamweaver for Dummies Jared Covili jcovili@media.utah.edu (801) 585-5667 www.uensd.org/dummies Section 1: How The Internet Works The Basic Process Let's say that you are sitting at your computer, surfing

More information

Lecture 1. Basic Ruby 1 / 61

Lecture 1. Basic Ruby 1 / 61 Lecture 1 Basic Ruby 1 / 61 What does this do? 3.times do print 'Hello, world!' end 2 / 61 Why Ruby? Optimized for programmer happiness Used for Ruby on Rails Very popular web framework 3 / 61 Course Policies

More information

IBM emessage Version 9 Release 1 February 13, User's Guide

IBM emessage Version 9 Release 1 February 13, User's Guide IBM emessage Version 9 Release 1 February 13, 2015 User's Guide Note Before using this information and the product it supports, read the information in Notices on page 471. This edition applies to version

More information

Back-end architecture

Back-end architecture Back-end architecture Tiberiu Vilcu Prepared for EECS 411 Sugih Jamin 2 January 2018 https://education.github.com/pack 1 2 Outline HTTP 1. HTTP and useful web tools 2. Designing APIs 3. Back-end services

More information

DreamFactory Security Guide

DreamFactory Security Guide DreamFactory Security Guide This white paper is designed to provide security information about DreamFactory. The sections below discuss the inherently secure characteristics of the platform and the explicit

More information

More reading: A series about real world projects that use JavaServer Faces:

More reading: A series about real world projects that use JavaServer Faces: More reading: A series about real world projects that use JavaServer Faces: http://www.jsfcentral.com/trenches 137 This is just a revision slide. 138 Another revision slide. 139 What are some common tasks/problems

More information

Guides SDL Server Documentation Document current as of 04/06/ :35 PM.

Guides SDL Server Documentation Document current as of 04/06/ :35 PM. Guides SDL Server Documentation Document current as of 04/06/2018 02:35 PM. Overview This document provides the information for creating and integrating the SmartDeviceLink (SDL) server component with

More information

Destiny Library Manager

Destiny Library Manager Destiny Library Manager Setting Up One Search Your teachers and students can take advantage of your school s subscription databases all in one place through Destiny One Search. One Search saves staff and

More information

Customer Care Portal User Guide

Customer Care Portal User Guide Customer Care Portal User Guide Table of Contents Logging In...3 Live Chat... 3 Viewing your Cases...4 Logging a Case for Customer Support...4 Projects...6 Knowledge Base....6 Content.....7 Forms...7 Event

More information

HOW TO FLASK. And a very short intro to web development and databases

HOW TO FLASK. And a very short intro to web development and databases HOW TO FLASK And a very short intro to web development and databases FLASK Flask is a web application framework written in Python. Created by an international Python community called Pocco. Based on 2

More information

Connecting Angular and CFML

Connecting Angular and CFML Connecting Angular and CFML Trip Ward About Me Senior Technical Specialist at ICF Owner & Chief Consultant at Trir Software Software Architecture and Development ColdFusion(1998), Java, jquery, HTML5,

More information

Static Webpage Development

Static Webpage Development Dear Student, Based upon your enquiry we are pleased to send you the course curriculum for PHP Given below is the brief description for the course you are looking for: - Static Webpage Development Introduction

More information

CSC 405 Computer Security. Web Security

CSC 405 Computer Security. Web Security CSC 405 Computer Security Web Security Alexandros Kapravelos akaprav@ncsu.edu (Derived from slides by Giovanni Vigna and Adam Doupe) 1 The XMLHttpRequest Object Microsoft developers working on Outlook

More information

Building Web Applications With The Struts Framework

Building Web Applications With The Struts Framework Building Web Applications With The Struts Framework ApacheCon 2003 Session TU23 11/18 17:00-18:00 Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc. Slides: http://www.apache.org/~craigmcc/

More information

Lecture Overview. IN5290 Ethical Hacking. Lecture 4: Web hacking 1, Client side bypass, Tampering data, Brute-forcing

Lecture Overview. IN5290 Ethical Hacking. Lecture 4: Web hacking 1, Client side bypass, Tampering data, Brute-forcing Lecture Overview IN5290 Ethical Hacking Lecture 4: Web hacking 1, Client side bypass, Tampering data, Brute-forcing Summary - how web sites work HTTP protocol Client side server side actions Accessing

More information

Kendo UI. Builder by Progress : Using Kendo UI Designer

Kendo UI. Builder by Progress : Using Kendo UI Designer Kendo UI Builder by Progress : Using Kendo UI Designer Copyright 2017 Telerik AD. All rights reserved. December 2017 Last updated with new content: Version 2.1 Updated: 2017/12/22 3 Copyright 4 Contents

More information

Lecture 2. Object Orientation 1 / 51

Lecture 2. Object Orientation 1 / 51 Lecture 2 Object Orientation 1 / 51 Homework 1 Homework 1 was due at noon You will be graded on: Correctness: 15 points (passing all RSpec tests) Style: 5 points (having no Rubocop style offenses) Best

More information

ORB Education Quality Teaching Resources

ORB Education Quality Teaching Resources JavaScript is one of the programming languages that make things happen in a web page. It is a fantastic way for students to get to grips with some of the basics of programming, whilst opening the door

More information

Lecture 2. Object Orientation

Lecture 2. Object Orientation Lecture 2 Object Orientation 1 Homework 0 Grades Homework 0 grades were returned earlier this week Any questions? 2 Homework 1 Homework 1 is due tonight at 11:59pm You will be graded on: Correctness: 15

More information

This allows us to use the cookbook code that was downloaded with InstantRails, instead of a new copy of that code. Why is this important?

This allows us to use the cookbook code that was downloaded with InstantRails, instead of a new copy of that code. Why is this important? The Cookbook Application, cont. To bring up the Cookbook application, create a new Ruby project (rightclick in Package Explorer view, then New Project. We name the project cookbook and then deselect the

More information

Uniform Resource Locators (URL)

Uniform Resource Locators (URL) The World Wide Web Web Web site consists of simply of pages of text and images A web pages are render by a web browser Retrieving a webpage online: Client open a web browser on the local machine The web

More information

Early Data Analyzer Web User Guide

Early Data Analyzer Web User Guide Early Data Analyzer Web User Guide Early Data Analyzer, Version 1.4 About Early Data Analyzer Web Getting Started Installing Early Data Analyzer Web Opening a Case About the Case Dashboard Filtering Tagging

More information

:

: CS200 Assignment 5 HTML and CSS Due Monday February 11th 2019, 11:59 pm Readings and Resources On the web: http://validator.w3.org/ : a site that will check a web page for faulty HTML tags http://jigsaw.w3.org/css-validator/

More information

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted Announcements 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted 2. Install Komodo Edit on your computer right away. 3. Bring laptops to next class

More information

Electronic Committees (ecommittees) Frequently Asked Questions v1.0

Electronic Committees (ecommittees) Frequently Asked Questions v1.0 3 Electronic Committees (ecommittees) Frequently Asked Questions v1.0 SABS 2012-12-06 Table of Contents 1 Contents 1 Login and access... 3 1.1 How to access the ecommittee workspace... 3 1.1.1 Via the

More information

This tutorial is designed for software programmers who would like to learn the basics of ASP.NET Core from scratch.

This tutorial is designed for software programmers who would like to learn the basics of ASP.NET Core from scratch. About the Tutorial is the new web framework from Microsoft. is the framework you want to use for web development with.net. At the end this tutorial, you will have everything you need to start using and

More information

Chapter 11 Program Development and Programming Languages

Chapter 11 Program Development and Programming Languages Chapter 11 Program Development and Programming Languages permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. Programming

More information

FEWD START SCREENCAST!!!!

FEWD START SCREENCAST!!!! FEWD START SCREENCAST!!!! LET'S GET EVERYTHING SET UP! 1. Navigate to the FEWD 51 Dashboard (saraheholden.com/fewd51) and download the Lesson 5 starter code and slides. You'll want to keep the dashboard

More information

BEAWebLogic. Portal. Overview

BEAWebLogic. Portal. Overview BEAWebLogic Portal Overview Version 10.2 Revised: February 2008 Contents About the BEA WebLogic Portal Documentation Introduction to WebLogic Portal Portal Concepts.........................................................2-2

More information

Developing Ajax Applications using EWD and Python. Tutorial: Part 2

Developing Ajax Applications using EWD and Python. Tutorial: Part 2 Developing Ajax Applications using EWD and Python Tutorial: Part 2 Chapter 1: A Logon Form Introduction This second part of our tutorial on developing Ajax applications using EWD and Python will carry

More information

rails open-source web framework Nov 13, July 17, 2015

rails open-source web framework Nov 13, July 17, 2015 We are looking for people who share the idea of having a simple, it https://developerspace.com// Nov 3, 04 - y 7, Graphs Builds DESCRIPTION Understanding the MVC pattern is key to understanding Rails.

More information

7401ICT eservice Technology. (Some of) the actual examination questions will be more precise than these.

7401ICT eservice Technology. (Some of) the actual examination questions will be more precise than these. SAMPLE EXAMINATION QUESTIONS (Some of) the actual examination questions will be more precise than these. Basic terms and concepts Define, compare and discuss the following terms and concepts: a. HTML,

More information

Learn Ruby On Rails For Web Development Learn Rails The Fast And Easy Way

Learn Ruby On Rails For Web Development Learn Rails The Fast And Easy Way Learn Ruby On Rails For Web Development Learn Rails The Fast And Easy Way Learn Ruby on Rails by following along and building a Pinterest Clone website. Rails book Learn Ruby On Rails For Web Development

More information

Subscriptions and Recurring Payments 2.X

Subscriptions and Recurring Payments 2.X Documentation / Documentation Home Subscriptions and Recurring 2.X Created by Unknown User (bondarev), last modified by Unknown User (malynow) on Mar 22, 2017 Installation Set up cron (for eway) Configuration

More information

Web System Development by Ruby on Rails. Day 3(4/Oct/2012) First Project Internationalization

Web System Development by Ruby on Rails. Day 3(4/Oct/2012) First Project Internationalization Web System Development by Ruby on Rails Day 3(4/Oct/2012) First Project Internationalization Today s Goal (Continued) Run Rails 3 on CentOS, and generate the first project. Generate the bi-lingual screen

More information

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1 Web Programming and Design MPT Senior Cycle Tutor: Tamara Week 1 What will we cover? HTML - Website Structure and Layout CSS - Website Style JavaScript - Makes our Website Dynamic and Interactive Plan

More information