Ruby on Rails (Slides modified by ements-2ed.shtml)

Slides:



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

Client-server practices DSC340 Mike Pangburn. Agenda Overview of client-server development Editing on client (e.g., Notepad) or directly on server (e.g.,
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.
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.
1 Web Servers / Deployment Alastair Dawes Original by Bhupinder Reehal.
Chapter Apache Installation on Linux. Acknowledgement The contribution made by Darrin Morison is acknowledged.
Ruby on Rails CSE 190M, Spring 2009 Week 7. Customizing Our Views In our blog example, our entries were ordered from oldest to newest We can order them.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
Creating WordPress Websites. Creating a site on your computer Local server Local WordPress installation Setting Up Dreamweaver.
CS 683 Emerging Technologies Fall Semester, 2005 Doc 21 Rails Intro Nov 10, 2005 Copyright ©, All rights reserved SDSU & Roger Whitney, 5500 Campanile.
Methods for Rails. File Structures This is taken directly from app Holds all the code that's specific.
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.
27-Jun-15 Rails. What is Rails? Rails is a framework for building web applications This involves: Getting information from the user (client), using HTML.
Creating a wiki blog. Run apps that come with instant rails distribution select I /rails applications/open ruby console window Cd to cookbook or typo.
Ruby on Rails CSE 190M, Spring 2009 Week 5. Installing Rails First, install Ruby with RubyGems Then, install the Rails gem gem install rails -version=2.3.2.
Ruby on Rails Creating a Rails Application Carol E Wolf CS396X.
How the web work Web Server Web browser DNS Server
3.02G Website Components 3.02 Develop webpages.. Website Components  The website MUST contain an Index/Home Page.  A business website should contain:
1 Deploying a Web Application. 2 Virtual Directories Web servers map URLs to directories in their file systems. Called virtual directories. Normally one.
IS 426: Information Systems Construction in Modern Society Downloading and exploring oracle development environments.
October 10, 2014 Coding For UX : Part 1 localhost 45 Main St #220 BKLN / / hugeinc.com.
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,
Rails and Grails. To get started Make sure you have java installed You can get the sdk and jre at:
Deploying Ruby on Rails How to make your application actually serve Dan Buettner 18 Oct 2007.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
INTRODUCTION TO DREAMWEAVER 8. What we already know…  Design basics  Contrast  Repetition  Alignment  Repetition  HTML.
Basic Programming in Ruby Today’s Topics: Introduction last class irb history log Methods Classes (briefly) Using 3 rd Party Libraries rubygems ‘ require.
2nd Semester Meeting 2 Matt Bernstein, Paul Capelli, Jared Segal January 22, 2008.
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.
Tomcat Setup BCIS 3680 Enterprise Programming. Getting Web Apps to Work  Verify that Tomcat works.  Understand how context works.  Create folders/files.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Installation and Testing.
Lecture 11 Rails Topics SaaSSaaS Readings: SaaS book Ch February CSCE 740 Software Engineering.
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.
Ruby on Rails (Slides modified by ements-2ed.shtml)
Associations INFO 2310: Topics in Web Design and Programming.
Ruby on Rails Presenter: Michael Mayer 30-March-2006 Network RPI This presentation was adapted from a ThoughtWise presentation By Obie Fernandez;
Ruby on Rails on Ubuntu Bradley Taylor Rails Machine, LLC
1 Session 1: Introduction to PHP & MySQL iNET Academy Open Source Web Development.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
What is a port The Ports Collection is essentially a set of Makefiles, patches, and description files placed in /usr/ports. The port includes instructions.
Chapter 15 © 2013 by Pearson Overview of Rails - Rails is a development framework for Web-based applications - Based on MVC architecture for applications.
Create, Update and Delete Carol Wolf Computer Science.
WAMP Windows Apache MySQL and PHP i.e. “WAMP”. Why WAMP? WampServer is a Windows web development environment. It allows you to create and test web pages.
ET710 HTML Paths: Dot Dot Slash Notation. Directory (folder) Hierarchy. We can think of a computer’s file structure as a tree with branches. The trunk.
Studio Fx on Rails Demonstrating the Studio Fx API.
Unit 1 – Web Concepts Instructor: Brent Presley.
1 Dr Alexiei Dingli Web Science Stream Installing ROR.
Ruby on Rails Controller of MVC. Routes How we map URIs like /tweets/1 to calling the show method of the Controller.
Rails and routing INFO 2310: Topics in Web Design and Programming.
CS 160 and CMPE/SE 131 Software Engineering February 9 Class Meeting Department of Computer Science Department of Computer Engineering San José State University.
LECTURE 14 Web Frameworks. WEB DEVELOPMENT CONTINUED Web frameworks are collections of packages or modules which allow developers to write web applications.
Tomcat Setup BCIS 3680 Enterprise Programming. One-Click Tomcat Setup 2  This semester we’ll try to set up Tomcat with a PowerShell script.  Preparation.
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.
WMarket For Adminstrators Manual Installation. Basic Dependencies To install your own WMarket instance, you are required to install the following software:
Building Your Own Website Using:. Install & configure LAMP. Download WordPress and run it as a local website on your Raspberry Pi. Configure WordPress.
Glencoe Introduction to Web Design Chapter 4 XHTML Basics 1 Review Do you remember the vocabulary terms from this chapter? Use the following slides to.
Introduction to Dynamic Web Programming
Play Framework: Introduction
بسم الله الرحمن الرحيم.
Bruce Scharlau, University of Aberdeen, 2017
FTP and UNIX TOPICS Exploring your Web Hosting Site FTP UNIX
How files are organized
Chapter 15 Introduction to Rails.
System & Network Administration (MCSA & RHCSA)
Establish, configure and maintain a website/system
Presentation transcript:

Ruby on Rails (Slides modified by ements-2ed.shtml)

Installing Rails First, install Ruby with RubyGems Then, install the Rails gem gem install rails -version= include-dependencies Test that Rails is now installed in the terminal by just typing "rails". If it is installed, you should get a description on how to use it rails

What is Ruby on Rails? Rails is… – Written in Ruby – A web development framework – For development of web applications written in Ruby Benefits of Rails – Built-in functionality – Encourages good software development practices – Open source and lots of community support

What is Ruby on Rails?

Disadvantages of Rails Steep learning curve – Common Terminal Commands cd – change directory ls – list file and folders in current folder Lots of "magic" – Not always clear how things are being done – Not always obvious how to change or debug Ruby Magic Deployment……

Creating a New Rails App We simply call the Rails gem and give it the path to our new application Create your Rails application! rails –d mysql path/to/application Example rails –d mysql my_app This will spit out a bunch of files that compose your new Ruby web application

Starting Your Application If you are working on your own computer, you must start your rails app – Open your application folder (C:\my_app) – Start Webrick, the built-in webserver ruby script/server

Viewing Your Application Working locally – Open a browser and view the app on localhost with port

Viewing Your Application A new application will show you this page

Navigating the Rails File System When we open our project (C:\my_app), we see a number of folders For now, we will only be interested in a few of them – The "app" folder, specifically "app\views" – The "config" folder

The "app" Folder The "app" folder deals with the actual code of our application. It will hold all of our... – Objects ("models"), –.erb files ("views"), and… – code to work between the two ("controllers")

The "config" Folder The "config" folder will be where we configure particular settings of our Rails application We will tell our application how to setup the URLs of our app in the "routes.rb" file Eventually, we will tell our app how to connect to a particular database in the "database.yml" file

Making a Custom Homepage Instead of the standard "Welcome Aboard" page, we want to create our own front page To do this, we will – Remove/rename the default index.html page in our "public" folder – Create a "index.html.erb" file in our views to represent our home page – Create a route in our "config\routes.rb" file tell Rails to deal our custom home page as the default instead of index.html get “home/index” root :to => 'home#index'

Custom Homepage Step-by-Step Delete "public\index.html" file Create "home" folder in "views" with "index.html.erb" file for custom home page In "app\controllers", create a file named home_controller that defines a class called HomeController that inherits from ApplicationController Create an empty index folder "index" method in the home_controller /*Update routes with the following lines map.home '/', :controller => 'home' map.connect '', :controller => 'home' */ NOT NECESSARY