SlideShare a Scribd company logo
1 of 17
on Why Rails? How Rails? Please find latest version of the presentation at  http://viridian.in/academic_platform
Web World ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Software as a Service ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Why Rails? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Why is Rails difficult to learn? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
But the question still remains… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Whose using Rails? … why is Viridians on Rails?
LEARNING TO LEARN  RAILS YOURSELF  Rails is based on conventions. To start, you need to know the basics. But from then on, learning rails is all about self-experimenting, Googling and discovering new conventions / plugins / gems / open source APIs which solve or simplify your problems.
Dev. environment  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rails project Note:  Gem  is the ruby equivalent of Java jar.  Plugin  is nothing but an unpacked jar file. Gem code cannot be changed but plugin code can be changed.
Is my env.  working fine? *Note: 127.0.0.1 is localhost by default in Windows
Getting started… Types of methods for Models: - Virtual Attributes - Static Methods
Rails Magic in MVC terms (Gem) (Gem) (Gem)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Migrations & Rake Check your application at http://localhost:3000/contacts/
Other basics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GIT Version Control ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Your friends ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ritvvij Parrikh http://viridian.in   [email_address] http://groups.google.com/group/viridian_in   Thank You! Create a Viridians account at  http://my.viridian.in

More Related Content

What's hot

Apache Etch Introduction @ FOSDEM 2011
Apache Etch Introduction @ FOSDEM 2011Apache Etch Introduction @ FOSDEM 2011
Apache Etch Introduction @ FOSDEM 2011
grandyho
 

What's hot (20)

Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
 
ASP.NET 5: What's the Big Deal
ASP.NET 5: What's the Big DealASP.NET 5: What's the Big Deal
ASP.NET 5: What's the Big Deal
 
Dotnet Basics Presentation
Dotnet Basics PresentationDotnet Basics Presentation
Dotnet Basics Presentation
 
The Modern Java Web Developer - Denver JUG 2013
The Modern Java Web Developer - Denver JUG 2013The Modern Java Web Developer - Denver JUG 2013
The Modern Java Web Developer - Denver JUG 2013
 
Docker meetup-nyc-v1
Docker meetup-nyc-v1Docker meetup-nyc-v1
Docker meetup-nyc-v1
 
Creating a custom API for a headless Drupal
Creating a custom API for a headless DrupalCreating a custom API for a headless Drupal
Creating a custom API for a headless Drupal
 
Introduction to MERN Stack
Introduction to MERN StackIntroduction to MERN Stack
Introduction to MERN Stack
 
Apache Etch Introduction @ FOSDEM 2011
Apache Etch Introduction @ FOSDEM 2011Apache Etch Introduction @ FOSDEM 2011
Apache Etch Introduction @ FOSDEM 2011
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 
Spring Mvc
Spring MvcSpring Mvc
Spring Mvc
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc Technologies
 
Scripted - Embracing Eclipse Orion
Scripted - Embracing Eclipse OrionScripted - Embracing Eclipse Orion
Scripted - Embracing Eclipse Orion
 
JavaCro'14 - Hybrid mobile apps – deploy Java web application on Android to r...
JavaCro'14 - Hybrid mobile apps – deploy Java web application on Android to r...JavaCro'14 - Hybrid mobile apps – deploy Java web application on Android to r...
JavaCro'14 - Hybrid mobile apps – deploy Java web application on Android to r...
 
NodeJs-resume
NodeJs-resumeNodeJs-resume
NodeJs-resume
 
intoduction to Grails Framework
intoduction to Grails Frameworkintoduction to Grails Framework
intoduction to Grails Framework
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Grails At Linked
Grails At LinkedGrails At Linked
Grails At Linked
 
Introduction to Ibatis by Rohit
Introduction to Ibatis by RohitIntroduction to Ibatis by Rohit
Introduction to Ibatis by Rohit
 
MERN stack roadmap
MERN stack roadmapMERN stack roadmap
MERN stack roadmap
 
APEX Alpe Adria 2019 - JavaScript in APEX - do it right!
APEX Alpe Adria 2019 -  JavaScript in APEX - do it right!APEX Alpe Adria 2019 -  JavaScript in APEX - do it right!
APEX Alpe Adria 2019 - JavaScript in APEX - do it right!
 

Viewers also liked

Viewers also liked (9)

Revolutia celor 5 reguli pentru o piata adevarata de fermieri si producatori ...
Revolutia celor 5 reguli pentru o piata adevarata de fermieri si producatori ...Revolutia celor 5 reguli pentru o piata adevarata de fermieri si producatori ...
Revolutia celor 5 reguli pentru o piata adevarata de fermieri si producatori ...
 
Treball PràCtiques Manel
Treball PràCtiques ManelTreball PràCtiques Manel
Treball PràCtiques Manel
 
140conf Presentation | Nairobi Feb 2010
140conf Presentation | Nairobi Feb 2010140conf Presentation | Nairobi Feb 2010
140conf Presentation | Nairobi Feb 2010
 
In bucataria Violetei se aduna multi prieteni…
In bucataria Violetei se aduna multi prieteni…In bucataria Violetei se aduna multi prieteni…
In bucataria Violetei se aduna multi prieteni…
 
Omgaan met nieuwe media
Omgaan met nieuwe mediaOmgaan met nieuwe media
Omgaan met nieuwe media
 
Macelari din toata Romania, uniti-va!
Macelari din toata Romania, uniti-va!Macelari din toata Romania, uniti-va!
Macelari din toata Romania, uniti-va!
 
Politica de calitate din pachetul de reformă a PAC si lanturile scurte
Politica de calitate din pachetul de reformă a PAC si lanturile scurtePolitica de calitate din pachetul de reformă a PAC si lanturile scurte
Politica de calitate din pachetul de reformă a PAC si lanturile scurte
 
Prayer quotes for online
Prayer quotes for onlinePrayer quotes for online
Prayer quotes for online
 
Ouale de la sibieni sunt mai naturale, stiati ?!
Ouale de la sibieni sunt mai naturale, stiati ?!Ouale de la sibieni sunt mai naturale, stiati ?!
Ouale de la sibieni sunt mai naturale, stiati ?!
 

Similar to Viridians on Rails

Ruby Rails Web Development.pdf
Ruby Rails Web Development.pdfRuby Rails Web Development.pdf
Ruby Rails Web Development.pdf
Ayesha Siddika
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on rails
pmashchak
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
lubnayasminsebl
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
arif44
 

Similar to Viridians on Rails (20)

Rails Concept
Rails ConceptRails Concept
Rails Concept
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
A Tour of Ruby On Rails
A Tour of Ruby On RailsA Tour of Ruby On Rails
A Tour of Ruby On Rails
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Ruby Rails Web Development.pdf
Ruby Rails Web Development.pdfRuby Rails Web Development.pdf
Ruby Rails Web Development.pdf
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on rails
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
 
Practical WebAssembly with Apex, wasmRS, and nanobus
Practical WebAssembly with Apex, wasmRS, and nanobusPractical WebAssembly with Apex, wasmRS, and nanobus
Practical WebAssembly with Apex, wasmRS, and nanobus
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
 
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
 
Building Application with Ruby On Rails Framework
Building Application with Ruby On Rails FrameworkBuilding Application with Ruby On Rails Framework
Building Application with Ruby On Rails Framework
 
Laravel - A Trending PHP Framework
Laravel - A Trending PHP FrameworkLaravel - A Trending PHP Framework
Laravel - A Trending PHP Framework
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig Presentation
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09
 
Dev streams2
Dev streams2Dev streams2
Dev streams2
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Intro to Sails.js
Intro to Sails.jsIntro to Sails.js
Intro to Sails.js
 

Recently uploaded

Recently uploaded (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Viridians on Rails

  • 1. on Why Rails? How Rails? Please find latest version of the presentation at http://viridian.in/academic_platform
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. LEARNING TO LEARN RAILS YOURSELF Rails is based on conventions. To start, you need to know the basics. But from then on, learning rails is all about self-experimenting, Googling and discovering new conventions / plugins / gems / open source APIs which solve or simplify your problems.
  • 8.
  • 9. Rails project Note: Gem is the ruby equivalent of Java jar. Plugin is nothing but an unpacked jar file. Gem code cannot be changed but plugin code can be changed.
  • 10. Is my env. working fine? *Note: 127.0.0.1 is localhost by default in Windows
  • 11. Getting started… Types of methods for Models: - Virtual Attributes - Static Methods
  • 12. Rails Magic in MVC terms (Gem) (Gem) (Gem)
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Ritvvij Parrikh http://viridian.in [email_address] http://groups.google.com/group/viridian_in Thank You! Create a Viridians account at http://my.viridian.in

Editor's Notes

  1. Ramesh - Vista
  2. Start -> Run -> cmd > cd C: ubyonrails > use_ruby > cd C: ubyonrails ails_apps > rails project_name -d mysql <<project_name>>/ ..../app ......../controller -> A controller handles a web request from the user. ......../helpers -> Functions which help GUI mainly. ......../models -> Each file corresponds to a table in database. ......../views ............../layouts -> template of view files. ............../<controller_name> -> folder corresponding to each controller. ................../viewfiles.html.erb -> Run it through ruby interpreteur and generate html file. A view file corresponding to each function in a controller. ..../config ......../environments -> Holds 3 configuration files one each for production, test and development env. ......../initializers -> Constants. ......../environment file -> General configuration. ......../database.yml file -> Database connection configuration per environment (prod, test, dev). ......../routes file -> Routing of incoming web requests to appropriate code. ..../db ......../migrate -> Holds migration files to creata tables, upload data, upload test data, etc. (like SQL scripts) ......../seed ............../always -> yml files for reference data. ............../before_others -> Holds yml files needed to be run always first. ......../schema.rb -> Holds database table structures. Rails automatically creates it. Never manually change it. ......../seeds.rb -> ignore. ..../doc -> RubyDocs. Ignore not important ..../lib -> ignore ..../log -> ignore ..../public ......../images -> Holds pictures that are to be shown on website. ......../javascript -> Javascript. ......../stylesheets -> CSS. ..../private -> Does not come with rails but at Viridians we add this folder to store user images and files. The public folder is exposed and hence a security risk. ..../script -> Scripts to create, manage and launch various rails services. ..../test -> ignore ..../tmp -> ignore ..../vendor ......../plugins -> 3rd party Plugins used by the project. ......../gems -> Holds 3rd party gems which have been frozen. README-> ignore Rakefile-> ignore
  3. Start MYSQL Server   > cd project_name > ruby script/server => Booting Mongrel => Rails 2.3.2 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server   Go to browser and type http://localhost:3000/
  4. > ruby scriptgenerate scaffold contact name:string weblink:string email:string password:string -> Creates contacts_controller with new, create, edit, update, delete, show, index methods. Contacts model and contacts view folder with new, edit, show, index view files. Links accessible are http://website.com/contacts/new http://website.com/contacts/edit/1 http://website.com/contacts/show/1 http://website.com/contacts/index   > ruby scriptgenerate controller password -> Rails promotes creating restful design. Now considering, we need to create 3 functions, edit_password, forgot_password, create_random_password. Instead of adding them to contacts controller, create a dummy controller called passwords and dump these functions in the passwords controller.   > ruby scriptgenerate model page name:string header_str:string -> Creates a model file alone / table.   rake db:drop -> Drop database schema   rake db:create -> Add database schema   rake db:migrate RAILS_ENV=production VERSION=<<>> -> Create tables and upload datavalues based on db/migrations files   > ruby script/server => Booting Mongrel => Rails 2.3.2 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server
  5. rake db:drop -> Drop database schema rake db:create -> Add database schema  rake db:migrate RAILS_ENV=production VERSION=<<>> -> Create tables and upload datavalues based on db/migrations files   > ruby script/server => Booting Mongrel => Rails 2.3.2 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server
  6. Sessions in Rails Sessions configuration at …configinitializerssession_store.rb ActionController::Base.session = { :key => '_blabla', :secret => ‘….‘} ActionController::Base.session_store = :active_record_store Store session in DB at …dbmigratecreate_tables.rb  sessions table Some functions at …appcontrollersapplication_controller.rb current_user_session, current_user, require_user, require_no_user Methods in Models User Model Virtual attributes on object def name return first_name + last_name end Static Methods def self.randomize_username …. End Database queries User.find_by_first_name(‘Vikram’) User.all(:conditions => {:first_name => ‘Vikram’, :last_name => ‘Aditya’}, :order => “created_at DESC”) User.first(:conditions => {:first_name => ‘Vikram’})