SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
www.edureka.co/ruby-on-rails
View Ruby On Rails course details at www.edureka.co/ruby-on-rails
For Queries:
Post on Twitter @edurekaIN: #askEdureka
Post on Facebook /edurekaIN
For more details please contact us:
US : 1800 275 9730 (toll free)
INDIA : +91 88808 62004
Email us : webinars@edureka.co
Building Application With Ruby On Rails Framework
Slide 2Slide 2Slide 2 www.edureka.co/ruby-on-rails
 Introduction to Ruby on Rails Framework
 Features of Ruby on Rails
 MVC Architecture
 Building Rails Application
What will you learn today?
Slide 3Slide 3Slide 3 www.edureka.co/ruby-on-rails
9 Reasons Why You Should Learn Ruby
It is easy to learn Saves time by writing more with less Create web apps quickly and with ease
It is free of charge Ruby can be customized
Slide 4Slide 4Slide 4 www.edureka.co/ruby-on-rails
9 Reasons Why You Should Learn Ruby (Contd.)
It is Portable Learning Ruby helps you get a job
Make your own Domain Specific Language
The community will help
www.rubyonrails.org/community
DSL
Slide 5Slide 5Slide 5 www.edureka.co/ruby-on-rails
Ruby on Rails
 Ruby on Rails is a full-stack framework
» Used to developing web applications
» It is working under the Model-View-Control pattern
» It is an open source framework
 Ruby on Rails framework is familiar for
» Simplicity
» Productivity
» Speed of development
» Reliable Solutions
 Ruby is an Object Oriented Programming language
 Ruby has simple English like syntax
 Using Ruby you will write less code
Slide 6Slide 6Slide 6 www.edureka.co/ruby-on-rails
Examples of Application built on Ruby on Rails
Slide 7Slide 7Slide 7 www.edureka.co/ruby-on-rails
Rails Golden Rule 1 : DRY
 DRY just means "Don't Repeat Yourself". Make sure that when you write code, you only write it one time.
 The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative
representation within a system."
Reference: https://maurits.wordpress.com
Slide 8Slide 8Slide 8 www.edureka.co/ruby-on-rails
Rails Golden Rule 2 : Convention Over Configuration
 Convention over configuration (also known as coding by convention) is a software design paradigm which seeks
to :
 For example, if there is a class Sale in the model, the corresponding table in the database is called "sales" by default.
It is only if one deviates from this convention, such as calling the table "product sales", that one needs to write code
regarding these names.
Not losing
flexibility
Decrease
number of
decisions on
developers
Gain
Simplicity
Slide 9Slide 9Slide 9 www.edureka.co/ruby-on-rails
Rails MVC Architecture
Slide 10Slide 10Slide 10 www.edureka.co/ruby-on-rails
 Rails application can be created using the following command
>rails new app_name
 When you create an application using the rails helper script, you can see that a new directly structure is
created for your application. The directory structure will have to following directories that will be explained in
the next slide.
Creating a Rails Application
Slide 11Slide 11Slide 11 www.edureka.co/ruby-on-rails
Directory Layout
File /Folder Purpose
app/
Contains the controllers, models, views, helpers, mailers and assets for your
application.
bin/
Contains the rails script that starts your app and can contain other scripts you use to
deploy or run your application.
config/ Configure your application's routes, database, and more
condig.ru Rack configuration for Rack based servers used to start the application.
db/ Contains your current database schema, as well as the database migrations
Gemfile
Gemfile.lock
These files allow you to specify what gem dependencies are needed for your Rails
application. These files are used by the Bundler gem.
Lib/ Extended modules for you application
Log/ Application log files
Slide 12Slide 12Slide 12 www.edureka.co/ruby-on-rails
Directory Layout (Contd.)
File /Folder Purpose
public/ The only folder seen by the world as-is. Contains static files and compiled assets.
Rakefile
This file locates and loads tasks that can be run from the command line. Rather than
changing Rakefile, you should add your own tasks by adding files to the lib/tasks
directory of your application
README.rdoc
This is a brief instruction manual for your application. You should edit this file to tell
others what your application does, how to set it up, and so on.
test/ Unit tests, fixtures, and other test apparatus.
tmp/ Temporary files (like cache, pid, and session files).
Vendor/
A place for all third-party code. In a typical Rails application this includes vendor’s
gems.
Slide 13Slide 13Slide 13 www.edureka.co/ruby-on-rails
 Rails application can be booted using the
following command
>rails server
 This command will fire up WEBrick, a web
server distributed with Ruby.
» Default environment is development
» Default port is 3000
» http://127.0.0.1:3000
Running Rails Application
Slide 14Slide 14Slide 14 www.edureka.co/ruby-on-rails
To see your application in action, open a browser window and navigate to http://localhost:3000
Running Rails Application (Contd.)
Slide 15Slide 15Slide 15 www.edureka.co/ruby-on-rails
Creating Rails Views and Controller
 Create first controller
>rails generate controller home
 Create new file and store with name index.html.erb
>rails g controller home index
 Add the content to index.html.erb file
<h1>Hello, Rails!</h1>
 Open the file config/routes.rb in your editor. Remove
the comment “#” and change root to
# root ‘home#index'
Slide 16Slide 16Slide 16 www.edureka.co/ruby-on-rails
Creating Rails Views and Controller (Contd.)
Launch the web server again and navigate to http://localhost:3000 in your browser.
Slide 17 www.edureka.co/angular-jsSlide 17Slide 17Slide 17
Certifications
Get certified in Ruby On Rails by Edureka
Edureka's Ruby On Rails course:
• It covers all the fundamental concepts of OOPS and Web Applications, Ruby scripting, MVC architecture to advanced topics like
Gemified plugins, Application deployments, API conventions, cloud support by Heroku, Front End, and Back End DB
collaborations etc.
• It will enable learners to build web applications using the powerful Rails framework and the highly dynamic, object-oriented
Ruby language. Participants will also get to implement one project towards the end of the course.
• Online Live Courses: 30 hours
• Assignments: 25 hours
• Project: 20 hours
• Lifetime Access + 24 X 7 Support
Go to www.edureka.co/ruby-on-rails
Batch starts from 24th October (Weekend)
Thank You
Questions/Queries/Feedback
Recording and presentation will be made available to you within 24 hours

Más contenido relacionado

La actualidad más candente

New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0
Buu Nguyen
 
Wso2 product release webinar introducing jaggery
Wso2 product release webinar   introducing jaggeryWso2 product release webinar   introducing jaggery
Wso2 product release webinar introducing jaggery
WSO2
 

La actualidad más candente (20)

Chapter 1 (asp.net over view)
Chapter 1 (asp.net over view)Chapter 1 (asp.net over view)
Chapter 1 (asp.net over view)
 
A Work Day Of A Web Developer
A Work Day Of A Web DeveloperA Work Day Of A Web Developer
A Work Day Of A Web Developer
 
Flex Introduction
Flex Introduction Flex Introduction
Flex Introduction
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Web Development In 2018
Web Development In 2018Web Development In 2018
Web Development In 2018
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 
Be Happy With Ruby on Rails - Ecosystem
Be Happy With Ruby on Rails - EcosystemBe Happy With Ruby on Rails - Ecosystem
Be Happy With Ruby on Rails - Ecosystem
 
Laravel Eloquent ORM
Laravel Eloquent ORMLaravel Eloquent ORM
Laravel Eloquent ORM
 
Asp.net
 Asp.net Asp.net
Asp.net
 
Tutorial asp.net
Tutorial  asp.netTutorial  asp.net
Tutorial asp.net
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )
 
Ruby On Rails Starter Kit
Ruby On Rails Starter KitRuby On Rails Starter Kit
Ruby On Rails Starter Kit
 
A Tour of Ruby On Rails
A Tour of Ruby On RailsA Tour of Ruby On Rails
A Tour of Ruby On Rails
 
Rutgers - Active Server Pages
Rutgers - Active Server PagesRutgers - Active Server Pages
Rutgers - Active Server Pages
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0
 
Quick Start: ActiveScaffold
Quick Start: ActiveScaffoldQuick Start: ActiveScaffold
Quick Start: ActiveScaffold
 
Laravel presentation
Laravel presentationLaravel presentation
Laravel presentation
 
Wso2 product release webinar introducing jaggery
Wso2 product release webinar   introducing jaggeryWso2 product release webinar   introducing jaggery
Wso2 product release webinar introducing jaggery
 
How to Install and Configure Drupal CMS
How to Install and Configure Drupal CMSHow to Install and Configure Drupal CMS
How to Install and Configure Drupal CMS
 

Destacado

Sai wire manufacturing
Sai wire manufacturingSai wire manufacturing
Sai wire manufacturing
ritusingh1905
 

Destacado (12)

Contenido examen final
Contenido examen finalContenido examen final
Contenido examen final
 
W mach02 (1)
W mach02 (1)W mach02 (1)
W mach02 (1)
 
Geometria i
Geometria iGeometria i
Geometria i
 
10 vietnamese foods you need to try
10 vietnamese foods you need to try10 vietnamese foods you need to try
10 vietnamese foods you need to try
 
Feide med sterk autentisering 13102015
Feide med sterk autentisering 13102015Feide med sterk autentisering 13102015
Feide med sterk autentisering 13102015
 
Sai wire manufacturing
Sai wire manufacturingSai wire manufacturing
Sai wire manufacturing
 
ashutosh
ashutoshashutosh
ashutosh
 
Last PP - Inês
Last PP - InêsLast PP - Inês
Last PP - Inês
 
AccessBank Investor presentation Q3 2014
AccessBank Investor presentation Q3 2014AccessBank Investor presentation Q3 2014
AccessBank Investor presentation Q3 2014
 
Representation of Ethnicity in Hotel Babylon
Representation of Ethnicity in Hotel BabylonRepresentation of Ethnicity in Hotel Babylon
Representation of Ethnicity in Hotel Babylon
 
Contenido 2do. parcial 2016
Contenido 2do. parcial 2016Contenido 2do. parcial 2016
Contenido 2do. parcial 2016
 
BOOK - IBM Sterling B2B Integration and Managed File Transfer Solutions
BOOK - IBM Sterling B2B Integration and Managed File Transfer SolutionsBOOK - IBM Sterling B2B Integration and Managed File Transfer Solutions
BOOK - IBM Sterling B2B Integration and Managed File Transfer Solutions
 

Similar a Building Application with Ruby On Rails Framework

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
Vineet Chaturvedi
 
Rails
RailsRails
Rails
SHC
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorial
sunniboy
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on rails
pmashchak
 
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
cNguyn506241
 

Similar a Building Application with Ruby On Rails Framework (20)

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
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
 
Aspose pdf
Aspose pdfAspose pdf
Aspose pdf
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
 
Rails
RailsRails
Rails
 
Ruby on Rails introduction
Ruby on Rails introduction Ruby on Rails introduction
Ruby on Rails introduction
 
Rails Concept
Rails ConceptRails Concept
Rails Concept
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Ruby Rails Web Development.pdf
Ruby Rails Web Development.pdfRuby Rails Web Development.pdf
Ruby Rails Web Development.pdf
 
rails.html
rails.htmlrails.html
rails.html
 
rails.html
rails.htmlrails.html
rails.html
 
RoR guide_p1
RoR guide_p1RoR guide_p1
RoR guide_p1
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorial
 
Ruby On Rails - Rochester K Linux User Group
Ruby On Rails - Rochester K Linux User GroupRuby On Rails - Rochester K Linux User Group
Ruby On Rails - Rochester K Linux User Group
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on rails
 
Ruby On Rails Basics
Ruby On Rails BasicsRuby On Rails Basics
Ruby On Rails Basics
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
 
Supa fast Ruby + Rails
Supa fast Ruby + RailsSupa fast Ruby + Rails
Supa fast Ruby + Rails
 
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
       Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber       Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
 

Más de Edureka!

Más de Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Building Application with Ruby On Rails Framework

  • 1. www.edureka.co/ruby-on-rails View Ruby On Rails course details at www.edureka.co/ruby-on-rails For Queries: Post on Twitter @edurekaIN: #askEdureka Post on Facebook /edurekaIN For more details please contact us: US : 1800 275 9730 (toll free) INDIA : +91 88808 62004 Email us : webinars@edureka.co Building Application With Ruby On Rails Framework
  • 2. Slide 2Slide 2Slide 2 www.edureka.co/ruby-on-rails  Introduction to Ruby on Rails Framework  Features of Ruby on Rails  MVC Architecture  Building Rails Application What will you learn today?
  • 3. Slide 3Slide 3Slide 3 www.edureka.co/ruby-on-rails 9 Reasons Why You Should Learn Ruby It is easy to learn Saves time by writing more with less Create web apps quickly and with ease It is free of charge Ruby can be customized
  • 4. Slide 4Slide 4Slide 4 www.edureka.co/ruby-on-rails 9 Reasons Why You Should Learn Ruby (Contd.) It is Portable Learning Ruby helps you get a job Make your own Domain Specific Language The community will help www.rubyonrails.org/community DSL
  • 5. Slide 5Slide 5Slide 5 www.edureka.co/ruby-on-rails Ruby on Rails  Ruby on Rails is a full-stack framework » Used to developing web applications » It is working under the Model-View-Control pattern » It is an open source framework  Ruby on Rails framework is familiar for » Simplicity » Productivity » Speed of development » Reliable Solutions  Ruby is an Object Oriented Programming language  Ruby has simple English like syntax  Using Ruby you will write less code
  • 6. Slide 6Slide 6Slide 6 www.edureka.co/ruby-on-rails Examples of Application built on Ruby on Rails
  • 7. Slide 7Slide 7Slide 7 www.edureka.co/ruby-on-rails Rails Golden Rule 1 : DRY  DRY just means "Don't Repeat Yourself". Make sure that when you write code, you only write it one time.  The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." Reference: https://maurits.wordpress.com
  • 8. Slide 8Slide 8Slide 8 www.edureka.co/ruby-on-rails Rails Golden Rule 2 : Convention Over Configuration  Convention over configuration (also known as coding by convention) is a software design paradigm which seeks to :  For example, if there is a class Sale in the model, the corresponding table in the database is called "sales" by default. It is only if one deviates from this convention, such as calling the table "product sales", that one needs to write code regarding these names. Not losing flexibility Decrease number of decisions on developers Gain Simplicity
  • 9. Slide 9Slide 9Slide 9 www.edureka.co/ruby-on-rails Rails MVC Architecture
  • 10. Slide 10Slide 10Slide 10 www.edureka.co/ruby-on-rails  Rails application can be created using the following command >rails new app_name  When you create an application using the rails helper script, you can see that a new directly structure is created for your application. The directory structure will have to following directories that will be explained in the next slide. Creating a Rails Application
  • 11. Slide 11Slide 11Slide 11 www.edureka.co/ruby-on-rails Directory Layout File /Folder Purpose app/ Contains the controllers, models, views, helpers, mailers and assets for your application. bin/ Contains the rails script that starts your app and can contain other scripts you use to deploy or run your application. config/ Configure your application's routes, database, and more condig.ru Rack configuration for Rack based servers used to start the application. db/ Contains your current database schema, as well as the database migrations Gemfile Gemfile.lock These files allow you to specify what gem dependencies are needed for your Rails application. These files are used by the Bundler gem. Lib/ Extended modules for you application Log/ Application log files
  • 12. Slide 12Slide 12Slide 12 www.edureka.co/ruby-on-rails Directory Layout (Contd.) File /Folder Purpose public/ The only folder seen by the world as-is. Contains static files and compiled assets. Rakefile This file locates and loads tasks that can be run from the command line. Rather than changing Rakefile, you should add your own tasks by adding files to the lib/tasks directory of your application README.rdoc This is a brief instruction manual for your application. You should edit this file to tell others what your application does, how to set it up, and so on. test/ Unit tests, fixtures, and other test apparatus. tmp/ Temporary files (like cache, pid, and session files). Vendor/ A place for all third-party code. In a typical Rails application this includes vendor’s gems.
  • 13. Slide 13Slide 13Slide 13 www.edureka.co/ruby-on-rails  Rails application can be booted using the following command >rails server  This command will fire up WEBrick, a web server distributed with Ruby. » Default environment is development » Default port is 3000 » http://127.0.0.1:3000 Running Rails Application
  • 14. Slide 14Slide 14Slide 14 www.edureka.co/ruby-on-rails To see your application in action, open a browser window and navigate to http://localhost:3000 Running Rails Application (Contd.)
  • 15. Slide 15Slide 15Slide 15 www.edureka.co/ruby-on-rails Creating Rails Views and Controller  Create first controller >rails generate controller home  Create new file and store with name index.html.erb >rails g controller home index  Add the content to index.html.erb file <h1>Hello, Rails!</h1>  Open the file config/routes.rb in your editor. Remove the comment “#” and change root to # root ‘home#index'
  • 16. Slide 16Slide 16Slide 16 www.edureka.co/ruby-on-rails Creating Rails Views and Controller (Contd.) Launch the web server again and navigate to http://localhost:3000 in your browser.
  • 17. Slide 17 www.edureka.co/angular-jsSlide 17Slide 17Slide 17 Certifications Get certified in Ruby On Rails by Edureka Edureka's Ruby On Rails course: • It covers all the fundamental concepts of OOPS and Web Applications, Ruby scripting, MVC architecture to advanced topics like Gemified plugins, Application deployments, API conventions, cloud support by Heroku, Front End, and Back End DB collaborations etc. • It will enable learners to build web applications using the powerful Rails framework and the highly dynamic, object-oriented Ruby language. Participants will also get to implement one project towards the end of the course. • Online Live Courses: 30 hours • Assignments: 25 hours • Project: 20 hours • Lifetime Access + 24 X 7 Support Go to www.edureka.co/ruby-on-rails Batch starts from 24th October (Weekend)
  • 18. Thank You Questions/Queries/Feedback Recording and presentation will be made available to you within 24 hours