Ruby on Rails by Manik Juneja

Slides:



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

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.
Web Applications Development Using Coldbox Platform Eddie Johnston.
Fabian Vilers Hands on ASP.NET MVC.
Ruby on Rails by Manik Juneja Ruby On Rails. Ruby on Rails by Manik Juneja Rails is a Web Application development framework. Based on the MVC pattern.
XML and Ruby on Rails Jennifer Andrews LIS 531F April 25,2007.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Ruby on Rails a popular web application framework, aimed to increase the speed and ease of web development Ruby on Rails, Tim Zappe.
Multiple Tiers in Action
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.
Software Architecture Patterns (2). what is architecture? (recap) o an overall blueprint/model describing the structures and properties of a "system"
Direct Congress Dan Skorupski Dan Vingo. Inner workings Reminder: MVC design pattern Procedural view: From request to response o Request passed to a view.
Justin Klein Keane Drupal Training Session 1 Introduction to Drupal.
UNIT-V The MVC architecture and Struts Framework.
Ruby on Rails: An Introduction JA-SIG Summer Conference 2007 Michael Irion The University of Tulsa.
A little engineering on Rails Robert W. Hasker. Goals Intro to the Rails framework ▫Basic concepts: MVC, Active Record ▫A bit of Ruby Using Rails to build.
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/
Storm-The-Castle an introduction to MVC, AR design pattern using Castle MonoRail and ActiveRecord rev 2 Date: 2009/10/04.
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.
Rails and Grails. To get started Make sure you have java installed You can get the sdk and jre at:
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
UC Berkeley Hello Rails. Review: MVC Goal: separate organization of data (model) from UI & presentation (view) by introducing controller –mediates user.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
WaveMaker Visual AJAX Studio 4.0 Training Authentication.
1 An Introduction to the Development of Web Applications using Ruby on Rails with Ajax Ansgar Berhorn, B.Sc. and Mike Rowe, Ph.D.
MVC & ActiveRecord by Christian Mohr & Mohamed Souiai.
1 Dr Alexiei Dingli Web Science Stream Introducing Rails.
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.
Lecture 11 Rails Topics SaaSSaaS Readings: SaaS book Ch February CSCE 740 Software Engineering.
The Active Record Paradigm Databases in Database-Centric Web Site Development.
JDeveloper 10g and Oracle ADF Business Components Getting the Most Out of Your Data Avrom Roy-Faderman Senior Programmer November, 2005.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
Ruby on Rails By S. Christopher Hellriegel. Overview 1. What is Ruby on Rails? 2. What is MVC? 3. Simple example 4. Wow, that was cool!
Chapter 15 © 2013 by Pearson Overview of Rails - Rails is a development framework for Web-based applications - Based on MVC architecture for applications.
How I spend my money Software architecture course Mohan, Maxim.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Introduction to Ruby&Rails Yuri Veremeyenko Monica Verma.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
Introduction to information systems RUBY ON RAILS dr inż. Tomasz Pieciukiewicz.
ASP.NET MVC An Introduction. What is MVC The Model-View-Controller (MVC) is an architectural pattern separates an application into three main components:
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
CS 160 and CMPE/SE 131 Software Engineering February 11 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
Model-View-Controller an introduction to MVC design pattern with Castle.MonoRail Presentation: v1.0 Prepared by: Chorn Sokun
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.
1 Rails for the Ruby-Impaired John Paul Ashenfelter CTO/Transitionpoint.
National College of Science & Information Technology.
Facelets Mimi Opkins CECS493 Fall Facelets  User interfaces are typically a web application’s most volatile aspect during development, and they.
Cake PHP – OOPS approach for PHP
Ruby on What? A brief introduction to Rails Christopher Hoskin Faculty of History 12th Annual IT Support Staff Conference 21st June 2007, St. Catherine's.
What is Laravel ? By Georgi Genov.
Yii.
IST 220 – Intro to Databases
Introduction to Dynamic Web Programming
Working in the Forms Developer Environment
Server Concepts Dr. Charles W. Kann.
Tutorial 6 Topic: jQuery and jQuery Mobile Li Xu
JavaScript: ExpressJS Overview
CO6025 Advanced Programming
…and web frameworks in general
MVC Framework, in general.
Bruce Scharlau, University of Aberdeen, 2017
Ruby on Rails by Manik Juneja
Chapter 15 Introduction to Rails.
Web Development Using ASP .NET
…and web frameworks in general
ASP.NET MVC Web Development
Presentation transcript:

Ruby on Rails by Manik Juneja

Ruby on Rails by Manik Juneja About Rails Rails is a Web Application development framework. Based on the MVC pattern Gives a pure Ruby development environment Created by DHH of 37signals. Is open source Some sites running on RoR are basecamp, tadalist, writeboard, Campfire, 43things, odeo, Blinksale, Bubbleshare, Calendarhub, Nativetext, Numsum, Sproutit, Suprglu Some open source applications built on RoR are typo, hieraki2 Ruby on Rails by Manik Juneja

Ruby on Rails by Manik Juneja Rail’s Philosophy DRY( Don’t Repeat Yourself) Every piece of knowledge should be expressed in just one place Convention over configuration Sensible defaults for just about every aspect of your application. If you need to overwrite the convention Rails makes that easy too. The MVC architecture Ruby on Rails by Manik Juneja

Ruby on Rails by Manik Juneja What is a Model? Model stores the state of the application Sometime this state is Transient (Session) Permanent (database) Model = data + business rules that apply to it. Ruby on Rails by Manik Juneja

Model: Object Relational Mapping DB is relational Ruby is Object Oriented Table Class Row Object Columns Attributes Table Level operations Class Methods Row Level operations Object Methods ActiveRecord Module provides ORM in Rails. Ruby on Rails by Manik Juneja

ActiveRecord: Getting Started Specify database access details in config/database.yml file Create a subclass of ActiveRecord::Base class Give it a name. (By default, Active Record assumes that the name of the table is the plural form of the name of the class. By default id is the primary key ) Ruby on Rails by Manik Juneja

ActiveRecord: Class methods Class Methods ( = Table level operations) Ruby on Rails by Manik Juneja

ActiveRecord: Instance methods Ruby on Rails by Manik Juneja

ActiveRecord Relationships: one to many Ruby on Rails by Manik Juneja

ActiveRecord Relationships: many to many Ruby on Rails by Manik Juneja

ActiveRecord: Other Features Transaction Handling Acts as (list, tree) Aggregation Validation Callback etc Ruby on Rails by Manik Juneja

ActionPack : where the action happens Action Pack lies at the heart of Rails applications. It consists of two Ruby modules, ActionController and ActionView. Together, they provide support for processing incoming requests and generating outgoing responses. Ruby on Rails by Manik Juneja

Ruby on Rails by Manik Juneja ActionController Controller orchestrates the application Receives external input Processes internal action Responds to user Receives external input In the form of a url like http://mysite.com/user/show/1 File config/routes.rb, is used to map external requests to internal actions. controller user action show id 1 Ruby on Rails by Manik Juneja

ActionController: action Controller looks for a public instance method with the same name as the incoming action Controller has access to the execution environment via objects such as request, params, response, cookies, session, header Ruby on Rails by Manik Juneja

ActionController : filter Filters enable wrapping of controllers’ actions — you can write a chunk of code once and have called before or after any number of actions in your controller This is very useful in authentication, logging etc. Ruby on Rails by Manik Juneja

Ruby on Rails by Manik Juneja ActionView The ActionView module encapsulates the functionality needed to render templates. A Template is text embedded with ruby code ( in erb tags <% ….. %> All instance variables of the controller are available in the template. Ruby on Rails by Manik Juneja

Layouts, Partials, Components Honoring DRY Many pages share the same header, footer, sidebar (use layouts) Multiple pages may contain same snippet of rendered HTML (use partials) Same functionality may appear on multiple pages ( use components ) Ruby on Rails by Manik Juneja

Ruby on Rails by Manik Juneja Pagination Rails has inbuilt pagination support at both controller and view level Ruby on Rails by Manik Juneja

Ruby on Rails by Manik Juneja Ajax on Rails Rails has inbuilt support for Ajax It has prototype, effects, drag drop and control JavaScript libraries built in. JavaScriptHelper module which wrap JavaScript access in ruby code. Ruby on Rails by Manik Juneja

Must Mention, before I Thank You Action Mailer Action Web Service Testing Framework Rake Ruby on Rails by Manik Juneja

Ruby on Rails by Manik Juneja THANK YOU Ruby on Rails by Manik Juneja