SlideShare a Scribd company logo
Ruby on RailsvsASP.NET MVCSandroPaganottiSoftware Architect, Wave Factoryhttp://sandropaganotti.com/Twitter: @sandropaganottiSimone ChiarettaWeb Architect, Council of the EUhttp://codeclimber.net.nzTwitter: @simonechMilano, 19 Febbraio 2011
Join the Conf: theapp
Conference List
AttendeeRegistration
Join the Conf: themaking
The Model
Project Setuprails new join_the_conf -d mysqlcd join_the_confmate config/database.ymlrakedb:createrails server[File>New Project>ASP.NET MVC 3 Application]
InstallDependenciesmate Gemfilegem 'devise'gem 'rails_admin', :git => '...'gem 'haml‘bundle installInstall-Package MvcScaffolding
Create Modelrails generateresourceConferencename:stringdescription:textstart:dateend:datelocation:stringcapacity:integer -a indexpublic 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 BackOfficerails generaterails_admin:install_adminAdministratorrakedb:migraterails serverhttp://localhost:3000/adminScaffold Controller AttendeeScaffold Controller Conference[Build]http://localhost:2246/Admin/Conference
Validationclass Attendee < ActiveRecord::Basebelongs_to :conferencevalidates_presence_of :conference_id,:name, :emailvalidates_uniqueness_of :email,:scope => :conference_idend public class Attendee    {        public int Id { get; set; }        public intConferenceId { get; set; }        [Required] public string Name { get; set; }        [Required] public string Email { get; set; }        virtual public Conference Conference { get; set; }    }
Routingresources "conferences",:only => [:index] doresources "attendees",:only => [:index, :create]Endrake routespublic class ConferencesController : Controller public ViewResult Index()public class AttendeesController : Controllerpublic ViewResult Index()public ActionResultCreate(Attendeeattendee)
Controllerclass ConferencesController ...def index@conferences = Conference.all(:order=>'start DESC')endendpublic class AttendeesController : Controller{privateJTCContextcontext = new JTCContext();	public ViewResult Index()	{    		return View(context.Attendees.ToList());	}}
Layout!!! 5%html%head%titleJoin The Conf= stylesheet_link_tag :all= javascript_include_tag :defaults= csrf_meta_tag%body= yield<!DOCTYPE html><html><head>    <titleJoin The Conf</title>    <link href="@Url.Content("~/Content/frontend.css")" rel="stylesheet" type="text/css" />    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script></head><body>    <h1>Join The Conf</h1>        @RenderBody()</body></html>
Viewsconferences/index.html.haml%ul= render @conferencesconferences/index.cshtml<ul>@foreach (Conference item in ViewBag.Conferences){    @Html.Partial("_conference", item)}</ul>
Partial Viewsconferences/_conference.html.haml%li = "#{conference.name} - #{conference.start}"= link_to '(show attendees)',conference_attendees_path(conference)conferences/_conference.cshtml<li>@Model.Name: - @Model.Start @Html.ActionLink("(Register)","New","Attendees")</li>
Ad

Recommended

Introduction to Angular with TypeScript for .NET Developers
Introduction to Angular with TypeScript for .NET Developers
Laurent Duveau
 
Next Generation Automation in Ruckus Wireless
Next Generation Automation in Ruckus Wireless
David Ko
 
GvaScript Library
GvaScript Library
Mona Remlawi
 
Modern frontend in react.js
Modern frontend in react.js
Abdulsattar Mohammed
 
The new way to extend VSTS Build and Release
The new way to extend VSTS Build and Release
Jesse Houwing
 
Front matter: Next Level Front End Deployments on OpenShift
Front matter: Next Level Front End Deployments on OpenShift
Lance Ball
 
Matlab & C/C++ Interacting
Matlab & C/C++ Interacting
Hamid Jamali
 
Context API in React
Context API in React
Lucas Lira Gomes
 
Angular intro
Angular intro
Janarthan Paramanandam
 
The Flexible Layout Kit (how we got rid of web views). UA Mobile 2016.
The Flexible Layout Kit (how we got rid of web views). UA Mobile 2016.
UA Mobile
 
Clojure.tokyo.descjop
Clojure.tokyo.descjop
Kazuhiro Hara
 
Using Web Software Architecture in Traditional Desktop App Development
Using Web Software Architecture in Traditional Desktop App Development
Ben Lau
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using Typescript
Gil Fink
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4
Devang Garach
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
Bertrand Le Roy
 
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Garry Stewart
 
Griffon: Swing just got fun again
Griffon: Swing just got fun again
James Williams
 
«Управление логикой переходов между экранами приложения с помощью координатор...
«Управление логикой переходов между экранами приложения с помощью координатор...
Mail.ru Group
 
Ddd melbourne 2011 C# async ctp
Ddd melbourne 2011 C# async ctp
Pratik Khasnabis
 
Lamba scaffold webinar
Lamba scaffold webinar
Matt Billock
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
Laurent Duveau
 
How to meets Async and Task
How to meets Async and Task
Kouji Matsui
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
Augusto Lazaro
 
Summer Internship Project - Remote Render
Summer Internship Project - Remote Render
Yen-Kuan Wu
 
Local Lambda Debugging
Local Lambda Debugging
Matt Billock
 
XebiCon'17 : AxonFramework @ SGCIB (our experience) : (CQRS, Eventsourcing, A...
XebiCon'17 : AxonFramework @ SGCIB (our experience) : (CQRS, Eventsourcing, A...
Publicis Sapient Engineering
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
Piotr Benetkiewicz
 
Introduction to react native @ TIC NUST
Introduction to react native @ TIC NUST
Waqqas Jabbar
 
Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009
bturnbull
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
railsconf
 

More Related Content

What's hot (20)

Angular intro
Angular intro
Janarthan Paramanandam
 
The Flexible Layout Kit (how we got rid of web views). UA Mobile 2016.
The Flexible Layout Kit (how we got rid of web views). UA Mobile 2016.
UA Mobile
 
Clojure.tokyo.descjop
Clojure.tokyo.descjop
Kazuhiro Hara
 
Using Web Software Architecture in Traditional Desktop App Development
Using Web Software Architecture in Traditional Desktop App Development
Ben Lau
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using Typescript
Gil Fink
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4
Devang Garach
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
Bertrand Le Roy
 
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Garry Stewart
 
Griffon: Swing just got fun again
Griffon: Swing just got fun again
James Williams
 
«Управление логикой переходов между экранами приложения с помощью координатор...
«Управление логикой переходов между экранами приложения с помощью координатор...
Mail.ru Group
 
Ddd melbourne 2011 C# async ctp
Ddd melbourne 2011 C# async ctp
Pratik Khasnabis
 
Lamba scaffold webinar
Lamba scaffold webinar
Matt Billock
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
Laurent Duveau
 
How to meets Async and Task
How to meets Async and Task
Kouji Matsui
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
Augusto Lazaro
 
Summer Internship Project - Remote Render
Summer Internship Project - Remote Render
Yen-Kuan Wu
 
Local Lambda Debugging
Local Lambda Debugging
Matt Billock
 
XebiCon'17 : AxonFramework @ SGCIB (our experience) : (CQRS, Eventsourcing, A...
XebiCon'17 : AxonFramework @ SGCIB (our experience) : (CQRS, Eventsourcing, A...
Publicis Sapient Engineering
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
Piotr Benetkiewicz
 
Introduction to react native @ TIC NUST
Introduction to react native @ TIC NUST
Waqqas Jabbar
 
The Flexible Layout Kit (how we got rid of web views). UA Mobile 2016.
The Flexible Layout Kit (how we got rid of web views). UA Mobile 2016.
UA Mobile
 
Clojure.tokyo.descjop
Clojure.tokyo.descjop
Kazuhiro Hara
 
Using Web Software Architecture in Traditional Desktop App Development
Using Web Software Architecture in Traditional Desktop App Development
Ben Lau
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using Typescript
Gil Fink
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4
Devang Garach
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
Bertrand Le Roy
 
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Garry Stewart
 
Griffon: Swing just got fun again
Griffon: Swing just got fun again
James Williams
 
«Управление логикой переходов между экранами приложения с помощью координатор...
«Управление логикой переходов между экранами приложения с помощью координатор...
Mail.ru Group
 
Ddd melbourne 2011 C# async ctp
Ddd melbourne 2011 C# async ctp
Pratik Khasnabis
 
Lamba scaffold webinar
Lamba scaffold webinar
Matt Billock
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
Laurent Duveau
 
How to meets Async and Task
How to meets Async and Task
Kouji Matsui
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
Augusto Lazaro
 
Summer Internship Project - Remote Render
Summer Internship Project - Remote Render
Yen-Kuan Wu
 
Local Lambda Debugging
Local Lambda Debugging
Matt Billock
 
XebiCon'17 : AxonFramework @ SGCIB (our experience) : (CQRS, Eventsourcing, A...
XebiCon'17 : AxonFramework @ SGCIB (our experience) : (CQRS, Eventsourcing, A...
Publicis Sapient Engineering
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
Piotr Benetkiewicz
 
Introduction to react native @ TIC NUST
Introduction to react native @ TIC NUST
Waqqas Jabbar
 

Similar to Ruby on Rails vs ASP.NET MVC (20)

Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009
bturnbull
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
railsconf
 
Flex With Rubyamf
Flex With Rubyamf
Tony Hillerson
 
Intro to Ruby on Rails
Intro to Ruby on Rails
Mark Menard
 
Ruby On Rails Introduction
Ruby On Rails Introduction
Gustavo Andres Brey
 
Beyond rails new
Beyond rails new
Paul Oguda
 
Supa fast Ruby + Rails
Supa fast Ruby + Rails
Jean-Baptiste Feldis
 
Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)
Andre Foeken
 
Ruby/Rails
Ruby/Rails
rstankov
 
Ruby on rails
Ruby on rails
chamomilla
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Rails
codeinmotion
 
All I Need to Know I Learned by Writing My Own Web Framework
All I Need to Know I Learned by Writing My Own Web Framework
Ben Scofield
 
Rails 3 Beautiful Code
Rails 3 Beautiful Code
GreggPollack
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shin
tutorialsruby
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shin
tutorialsruby
 
Um roadmap do Framework Ruby on Rails, do Rails 1 ao Rails 4 - DevDay 2013
Um roadmap do Framework Ruby on Rails, do Rails 1 ao Rails 4 - DevDay 2013
Joao Lucas Santana
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding Guideline
Nascenia IT
 
Ruby on Rails na Unip
Ruby on Rails na Unip
Fabio Akita
 
Ruby On Rails
Ruby On Rails
Gautam Rege
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVC
Alan Dean
 
Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009
bturnbull
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
railsconf
 
Intro to Ruby on Rails
Intro to Ruby on Rails
Mark Menard
 
Beyond rails new
Beyond rails new
Paul Oguda
 
Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)
Andre Foeken
 
Ruby/Rails
Ruby/Rails
rstankov
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Rails
codeinmotion
 
All I Need to Know I Learned by Writing My Own Web Framework
All I Need to Know I Learned by Writing My Own Web Framework
Ben Scofield
 
Rails 3 Beautiful Code
Rails 3 Beautiful Code
GreggPollack
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shin
tutorialsruby
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shin
tutorialsruby
 
Um roadmap do Framework Ruby on Rails, do Rails 1 ao Rails 4 - DevDay 2013
Um roadmap do Framework Ruby on Rails, do Rails 1 ao Rails 4 - DevDay 2013
Joao Lucas Santana
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding Guideline
Nascenia IT
 
Ruby on Rails na Unip
Ruby on Rails na Unip
Fabio Akita
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVC
Alan Dean
 
Ad

More from Simone Chiaretta (10)

Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
Simone Chiaretta
 
OpenROV: Node.js takes a dive into the ocean
OpenROV: Node.js takes a dive into the ocean
Simone Chiaretta
 
La UX delle cose
La UX delle cose
Simone Chiaretta
 
UGIALT.net Keynote
UGIALT.net Keynote
Simone Chiaretta
 
What's new in asp.net mvc 4
What's new in asp.net mvc 4
Simone Chiaretta
 
FeedTso, History of a WP7 FeedReader
FeedTso, History of a WP7 FeedReader
Simone Chiaretta
 
Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)
Simone Chiaretta
 
The ViewModel pattern
The ViewModel pattern
Simone Chiaretta
 
ASP.NET MVC Extensibility
ASP.NET MVC Extensibility
Simone Chiaretta
 
Lavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.com
Simone Chiaretta
 
Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
Simone Chiaretta
 
OpenROV: Node.js takes a dive into the ocean
OpenROV: Node.js takes a dive into the ocean
Simone Chiaretta
 
What's new in asp.net mvc 4
What's new in asp.net mvc 4
Simone Chiaretta
 
FeedTso, History of a WP7 FeedReader
FeedTso, History of a WP7 FeedReader
Simone Chiaretta
 
Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)
Simone Chiaretta
 
Lavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.com
Simone Chiaretta
 
Ad

Recently uploaded (20)

No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 

Ruby on Rails vs ASP.NET MVC