Ruby on Rails vs ASP.NET MVC Simone Chiaretta Web Architect, Council of the EU Milano, 19 Febbraio 2011 Sandro.

Slides:



Advertisements
Similar presentations
Single Page Apps with Breeze and Ruby.
Advertisements

건전지로 달리는 쟝고 세미나. 정재성 Django Web Framework CGI.
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.
Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
Introduction to MVC Action Methods, Edit View, and a Search Feature NTPCUG Dr. Tom Perkins.
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
Building Modern Websites with ASP.NET Rachel Appel
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.
CS 142 Lecture Notes: Rails ActiveRecordSlide 1 Model for Student Table SELECT * FROM students; | id | name.
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
CS 683 Emerging Technologies Fall Semester, 2005 Doc 23 Rails Model Example Nov 17, 2005 Copyright ©, All rights reserved SDSU & Roger Whitney, 5500.
24-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 Creating a Rails Application Carol E Wolf CS396X.
Ruby on Rails ::The New Gem of Web Development Ross Pallan IT Project Manager Argonne National Laboratory
Ruby on Rails (Slides modified by ements-2ed.shtml)
Ruby on Rails: An Introduction JA-SIG Summer Conference 2007 Michael Irion The University of Tulsa.
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.
1 Dr Alexiei Dingli Web Science Stream Models, Views and Controllers.
Learning WebMatrix: Part 2 of 3 Akber Alwani ]
Brakeman and Jenkins: The Duo Detects Defects in Ruby on Rails Code Justin Collins Tin Zaw AppSec USA September 23, 2011.
BIT 286: Web Applications Lecture 04 : Thursday, January 15, 2015 ASP.Net MVC - Models.
Chapter 4.1 – Deeper into Rails Maciej Mensfeld Presented by: Maciej Mensfeld Deeper into Rails mensfeld.pl github.com/mensfeld senior.
Danial Parsa Negin Parya.  HTML Abstraction Markup Language  Doesn’t use of traditional inline coding.  Makes markup as elegant as it can be.  Haml's.
Why rails? Carlos Kirkconnell. Google Happiness leads to Productivity Happiness Matters.
1 Dr Alexiei Dingli Web Science Stream Advanced ROR.
Standalone Java Application vs. Java Web Application
By: Maksim Surguy & Cesar Acosta require 'sinatra‘ get ‘/' do "Hello World!" end.
Introduction to ASP.NET MVC Information for this presentation was taken from Pluralsight Building Applications with ASP.NET MVC 4.
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.
CWCW System Demo Campus Web Council of Wisconsin.
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.
© Copyright IBM Corporation 2007 AP/Americas April 15-18, 2007 Anaheim, California Introduction to RubyOnRails - a J2EE replacement? Russell Scheerer –
Ruby and Rails James Crisp.NET Practice Lead ThoughtWorks Australia From aperspective.
Associations INFO 2310: Topics in Web Design and Programming.
1 Dr Alexiei Dingli Web Science Stream A ROR Blog.
Ruby on Rails WTF? Created by Matz in 1993 Inspired by Smalltalk Rubygems = CSPAN Rake = ant Rdoc = javadoc.
Photo Gallery INFO 2310: Topics in Web Design and Programming.
CS 142 Lecture Notes: Rails ActiveRecordSlide 1 Model for Student Table SELECT * FROM students; | id | name.
CS 142 Lecture Notes: Rails ActiveRecordSlide 1 Model for Student Table SELECT * FROM students; | id | name.
Ruby on Rails: Databases. Rails Database Familiar Table Concept Naming convention – lower case, plural (i.e. tweets) How to Access (find), Update, Delete.
ASP.NET MVC Intro class MainContoller { function Index() {... raw data HTML CSS JavaScript REQUEST RESPONSE.
RUBY ON RAILS (RoR) Ishwor Khadka. Why Ruby on Rails?
Chapter 15 © 2013 by Pearson Overview of Rails - Rails is a development framework for Web-based applications - Based on MVC architecture for applications.
Lecture 13b Rails – Controllers and Views Topics SaaSSaaS Readings: SaaS book Ch March 3, 2014 CSCE 740 Software Engineering.
Introduction to Ruby&Rails Yuri Veremeyenko Monica Verma.
1 Dr Alexiei Dingli Web Science Stream Installing ROR.
Developer track Marta Ribeiro
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.
Introduction to information systems RUBY ON RAILS dr inż. Tomasz Pieciukiewicz.
CS 160 and CMPE/SE 131 Software Engineering February 11 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
Nivo 300 ASP.NET MVC 4 Danijel Malik Artifis Danijel Malik s.p.
Advanced Migration By Aye Mon Tun.  To change database schema in consistent and easy way  In ruby code Migration? 11/25/2013 2Web Application Engineering.
BIT 286: Web Applications ASP.Net MVC. Objectives Applied MVC overview Controllers Intro to Routing Views ‘Convention over configuration’ Layout files.
Rails 入门 锦江国际电子商务有限公司 Jin Jiang International E - Commerce Co., Ltd. Simon.Huang 2012/9/9.
Melbourne LUG Presentation Learning Rails and Ruby - making webapps easier.
Mid-Hudson Valley Linux Users Group Ruby on Rails Web Development is Fun Again MHVLUG Meeting Jan 7 th 2009 Sean Dague sean.dague.net.
Build Data Driven Apps with ASP.NET Core Rachel Appel.
C#: ASP.NET MVC Overview
Ruby on Rails Model of MVC
Bruce Scharlau, University of Aberdeen, 2017
Model for Student Table
05 | Customizing Views Jon Galloway | Development Platform Evangelist
Model for Student Table
C# - Razor Pages Db/Scaffolding/Async
Presentation transcript:

Ruby on Rails vs ASP.NET MVC Simone Chiaretta Web Architect, Council of the EU Milano, 19 Febbraio 2011 Sandro Paganotti Software Architect, Wave Factory

Join the Conf: the app

Conference List

Attendee Registration

Join the Conf: the making

The Model

Project Setup rails new join_the_conf -d mysql cd join_the_conf mate config/database.yml rake db:create rails server [File>New Project>ASP.NET MVC 3 Application]

Install Dependencies mate Gemfile gem 'devise' gem 'rails_admin', :git => '...' gem 'haml‘ bundle install Install-Package MvcScaffolding

Create Model rails generate resource Conference name:string description:text start:date end:date location:string capacity:integer -a index public class Conference { public int Id { get; set; } public string Name { get; set; } public string Description { get; set; } public DateTime Start { get; set; } public DateTime End { get; set; } public string Location { get; set; } public int Capacity { get; set; } }

Create BackOffice rails generate rails_admin:install_admin Administrator rake db:migrate rails server Scaffold Controller Attendee Scaffold Controller Conference [Build]

Validation class Attendee < ActiveRecord::Base belongs_to :conference validates_presence_of :conference_id, :name, : validates_uniqueness_of : , :scope => :conference_id end public class Attendee { public int Id { get; set; } public int ConferenceId { get; set; } [Required] public string Name { get; set; } [Required] public string { get; set; } virtual public Conference Conference { get; set; } }

Routing resources "conferences", :only => [:index] do resources "attendees", :only => [:index, :create] End rake routes public class ConferencesController : Controller public ViewResult Index() public class AttendeesController : Controller public ViewResult Index() public ActionResult Create(Attendee attendee)

Controller class ConferencesController... def = Conference.all( :order=>'start DESC') end public class AttendeesController : Controller { private JTCContext context = new JTCContext(); public ViewResult Index() { return View(context.Attendees.ToList()); }

Layout !!! 5 %html %head %title Join The Conf = stylesheet_link_tag :all = javascript_include_tag :defaults = csrf_meta_tag %body= yield Join The

Views conferences/index.html.haml %ul= (Conference item in ViewBag.Conferences) item) }

Partial Views conferences/_conference.html.haml %li = "#{conference.name} - #{conference.start}" = link_to '(show attendees)', conference_attendees_path(conference) @Html.ActionLink("(Register)","New","Attendees")