SlideShare a Scribd company logo
Ruby on Rails
A playful guide
Perry Carbonell | Sep 2013
Applications are typically constructed using a bunch of files located in your local folders. Ruby on Rails is no
different; it has a bunch of files embedded in particular folders which serve a particular purpose. Michael Hartl
describes this (re: table 1.1) as follows:
Here’s what you need
Sublime
Text
C:
localhost:3000 database
To start ROR, you need a file editor. Notepad comes default with most PC’s but the power of Sublime
Text is head and shoulders above the trusty Notepad. I’ll use this symbol to describe Sublime Text
more:
Like I said in my earlier statement,
files live in folders within your
computer. I’ll use this symbol to
describe folder directory: Folder Directory
You will also need a tool to run
commands on your computer.
Some people like the visual nature of
IDE’s for running commands. I’m a
little old school and use Git Bash to
run my commands. Here’s my
symbol:
You will eventually reach a stage where you will
need to deploy your code in your local
(development) environment. Here’s my
representation of your local including a database:
Finally you need to use your internet to get to a
few other resources such as:
GitHub (web-based version control)
Heroku (your cloud production platform)
Heroku database
GitHub site Git Version files
Blue to denote web-based. I’ll explain these more later.
Here’s what’s happening | Sublime Text
Sublime
Text
C:
localhost:3000
database
Directory
1
Heroku database
Git Hub
1 Use Sublime Text to code. With ROR, this could be anything from Ruby to HTML, CSS, Javascript languages. It
will therefore work to your advantage to have a good working knowledge of these languages prior working with
ROR.
2 These files live in several folders within your directory (re: slide 2).
2
Here’s what’s happening | Command Line
Sublime
Text
C:
localhost:3000
database
Directory
1
Heroku database
Git Hub
1 Use Command Line to make files, move files, commit, merge, push etc. Command lines are exactly that, they are
commands that execute some action on your application. I’m using Git Bash for this purpose.
2 Once you initially push, your code is uploaded to your development environment (locahost:3000).The application
is connected to a database (SQL Lite for standard ROR) and you use the command line to manipulate the database.
2
Here’s what’s happening | Git Hub & Heroku
Sublime
Text
localhost:3000
database
Directory
1
Heroku database
GitHub
C:
2
1 GitHub is used as a version control system. As soon as you’re happy with your development code, you can push
the code up to GitHub. You can now perform further development on your local environment knowing that you have
GitHub as back-up (it mimics the file and folder directory structure shaded in grey on the right..
2 Heroku can be treated as your production environment. It also has its own database which is important to note.
Here’s what’s happening | Dev vs Prod
Sublime
Text
C:
localhost:3000
database
Directory
Heroku database
Git Hub
Development
Environment
(local drive)
Production
Environment
(on the WEB)
Here’s what it really looks like
Sublime
Text
C:
Directory
My Representation The Real Thing
Here’s what it really looks like
My Representation The Real Thing
Heroku
GitHub
Here’s what’s happening | with HTML
C:
database
Directorystyle in CSS
behaviour in
JavaScript and
Ruby
structure in HTML
Wiki says:
It basically provides the structure for your web
page. Here’s a sample:
HyperText Markup Language (HTML) is the main markup language for creating
web pages and other information that can be displayed in a web browser.
HTML is written in the form of HTML elements consisting of tags enclosed in angle
brackets (like <html>), within the web page content. HTML tags most commonly
come in pairs like <h1> and </h1>, although some tags represent empty
elements and so are unpaired, for example <img>. The first tag in a pair is the
start tag, and the second tag is the end tag (they are also called opening tags and
closing tags). In between these tags web designers can add text, further tags,
My say:
Here’s what’s happening | with CSS
C:
database
Directorystyle in CSS
behaviour in
JavaScript and
Ruby
structure in HTML
Wiki says:
This is your presentation layer. Here’s a
sample:
Cascading Style Sheets (CSS) is a style sheet language used for describing the
presentation semantics (the look and formatting) of a document written in a
markup language. Its most common application is to style web pages written in
HTMLand XHTML, but the language can also be applied to any kind of XML
document, including plain XML, SVG and XUL.
CSS is designed primarily to enable the separation of document content (written in
HTML or a similar markup language) from document presentation, including
elements such as the layout, colors, and fonts.
My say:
Here’s what’s happening | Website
composition
C:
database
Directorystyle in CSS
behaviour in
JavaScript and
Ruby
structure in HTML
Wiki says:
It facilitates user interaction. Here’s a sample
embedded within HTML:
JavaScript (JS) is an interpreted computer programming language.[5]
As part of
web browsers, implementations allow client-side scripts to interact with the user,
control the browser, communicate asynchronously, and alter the document
contentthat is displayed.[5]
It has also become common in server-side
programming, game development and the creation of desktop applications.
My say:
Here’s what’s happening | with Ruby
C:
database
Directorystyle in CSS
behaviour in
JavaScript and
Ruby
structure in HTML
Wiki says:
Ruby on Rails is the framework whereas Ruby
is the language. Here’s a Ruby snip:
Ruby is a dynamic, reflective, object-oriented, general-purpose programming
language. It was designed and developed in the mid-1990s by Yukihiro "Matz"
Matsumoto in Japan.
Ruby embodies syntax inspired by Perl with Smalltalk-like features and was also
influenced by Eiffel and Lisp.[8]
It supports multiple programming paradigms,
including functional, object oriented, and imperative. It also has a dynamic type
system and automatic memory management.
My say:
Here’s what’s happening | with Command Line
C:
database
Directorystyle in CSS
behaviour in
JavaScript and
Ruby
structure in HTML
Wiki says:
Implement your code by giving it commands.
Here, I’m in the process of going in to my
working folder:
A command-line interface (CLI), also known as command-line user interface,
console user interface,[1]
and character user interface (CUI), is a means of
interacting with a computer program where the user (or client) issues commands
to the program in the form of successive lines of text (command lines).
The CLI was the primary means of interaction with most popular operating
systems in the 1970s and 1980s, including MS-DOS, CP/M, Unix, and Apple DOS.
The interface is usually implemented with a command line shell, which is a
program that accepts commands as text input and converts commands to
appropriate operating system functions.
My say:
Here’s what’s happening | with the database
C:
database
(db)
Directorystyle in CSS
behaviour in
JavaScript and
Ruby
structure in HTML
Wiki says:
The first sentence in the Wiki says it all.
FYI if you use ROR, here’s a link to some
Rails Command Lines. Within this you will find
the code
rake db:migrate
which is one of the most important command
you will be using (it modifies the db schema).
A database is an organized collection of data. The data are typically organized to
model relevant aspects of reality in a way that supports processes requiring this
information. For example, modeling the availability of rooms in hotels in a way that
supports finding a hotel with vacancies.
Database management systems (DBMSs) are specially designed applications that
interact with the user, other applications, and the database itself to capture and
analyze data. A general-purpose database management system (DBMS) is a
software system designed to allow the definition, creation, querying, update, and
administration of databases.
My say:
The Wrap
Now there’s a lot of things going on here for a beginner as you can see. There’s only so
much you can learn in a month’s time so when approaching something with a scope as
large as this, it’s probably not a bad idea to break things down into smaller bite size chunks.
Having a closer look into slides 10 - 15, basically the composition of a web app, I’ve decided
to go ‘Back to the Basics’ and pick-up the fundamentals in the order of the slides I have
listed i.e. HTML 5 first, CSS next and so on.
I hope these slides help others out there. At the very least, I intend to look back on this and
remind myself where it all began.
Until the next blog, take care out there and happy coding.
Perry Carbonell
marketmeasuresaustralia@gmail.com

More Related Content

Viewers also liked

Lunar Dilemma
Lunar DilemmaLunar Dilemma
Lunar Dilemma
guest4397819
 
Heisya rb vol3
Heisya rb vol3Heisya rb vol3
Heisya rb vol3
Ryoichi SEKIGUCHI
 
Building the Western Australian Twitter PLN (ECAWA 2013)
Building the Western Australian Twitter PLN (ECAWA 2013)Building the Western Australian Twitter PLN (ECAWA 2013)
Building the Western Australian Twitter PLN (ECAWA 2013)
Michael Graffin
 
Governor's Program Bill: Property Tax
Governor's Program Bill: Property TaxGovernor's Program Bill: Property Tax
Governor's Program Bill: Property Tax
Unshackle Upstate
 
Summary Of State Budget And Jobs Summit
Summary Of State Budget And Jobs SummitSummary Of State Budget And Jobs Summit
Summary Of State Budget And Jobs Summit
Unshackle Upstate
 
Imagine
ImagineImagine
Facebook Fan Page Video
Facebook Fan Page VideoFacebook Fan Page Video
Facebook Fan Page Video
Brad Sage
 
Microsoft power point novetats pasqua
Microsoft power point   novetats pasquaMicrosoft power point   novetats pasqua
Microsoft power point novetats pasqua
Purabiblioteca
 
Cabbagetown Toronto
Cabbagetown Toronto Cabbagetown Toronto
Cabbagetown Toronto
Brad Sage
 
City Manager Presentation
City Manager PresentationCity Manager Presentation
City Manager Presentation
The Development House
 
Shopcade Mobile app featured in After Nyne Magazine
Shopcade Mobile app featured in After Nyne MagazineShopcade Mobile app featured in After Nyne Magazine
Shopcade Mobile app featured in After Nyne Magazine
Nathalie Gaveau
 
Novetats setmana 15_al_22_de_juny
Novetats setmana 15_al_22_de_junyNovetats setmana 15_al_22_de_juny
Novetats setmana 15_al_22_de_juny
Purabiblioteca
 
Black & white
Black & whiteBlack & white
Black & white
Rapporteuse
 
NO ESTEM SOLS
NO ESTEM SOLSNO ESTEM SOLS
PlusConcept.Singapore.072016s
PlusConcept.Singapore.072016sPlusConcept.Singapore.072016s
PlusConcept.Singapore.072016s
Markus Kaub
 
Screens (Krems)
Screens (Krems)Screens (Krems)
Screens (Krems)
Sean Cubitt
 
Generation X Woodline, My Presentation (Eva Zwahlen)
Generation X Woodline, My Presentation (Eva Zwahlen)Generation X Woodline, My Presentation (Eva Zwahlen)
Generation X Woodline, My Presentation (Eva Zwahlen)
evazwa
 
Combatiendo Amenazas de Seguridad en la Nube - WatchGuard
Combatiendo Amenazas de Seguridad en la Nube - WatchGuardCombatiendo Amenazas de Seguridad en la Nube - WatchGuard
Combatiendo Amenazas de Seguridad en la Nube - WatchGuard
AEC Networks
 
POWER POINT cargols 2011-12
POWER POINT cargols 2011-12 POWER POINT cargols 2011-12
POWER POINT cargols 2011-12 Cucaferatona
 
CompañEros...
CompañEros...CompañEros...
CompañEros...
Angel
 

Viewers also liked (20)

Lunar Dilemma
Lunar DilemmaLunar Dilemma
Lunar Dilemma
 
Heisya rb vol3
Heisya rb vol3Heisya rb vol3
Heisya rb vol3
 
Building the Western Australian Twitter PLN (ECAWA 2013)
Building the Western Australian Twitter PLN (ECAWA 2013)Building the Western Australian Twitter PLN (ECAWA 2013)
Building the Western Australian Twitter PLN (ECAWA 2013)
 
Governor's Program Bill: Property Tax
Governor's Program Bill: Property TaxGovernor's Program Bill: Property Tax
Governor's Program Bill: Property Tax
 
Summary Of State Budget And Jobs Summit
Summary Of State Budget And Jobs SummitSummary Of State Budget And Jobs Summit
Summary Of State Budget And Jobs Summit
 
Imagine
ImagineImagine
Imagine
 
Facebook Fan Page Video
Facebook Fan Page VideoFacebook Fan Page Video
Facebook Fan Page Video
 
Microsoft power point novetats pasqua
Microsoft power point   novetats pasquaMicrosoft power point   novetats pasqua
Microsoft power point novetats pasqua
 
Cabbagetown Toronto
Cabbagetown Toronto Cabbagetown Toronto
Cabbagetown Toronto
 
City Manager Presentation
City Manager PresentationCity Manager Presentation
City Manager Presentation
 
Shopcade Mobile app featured in After Nyne Magazine
Shopcade Mobile app featured in After Nyne MagazineShopcade Mobile app featured in After Nyne Magazine
Shopcade Mobile app featured in After Nyne Magazine
 
Novetats setmana 15_al_22_de_juny
Novetats setmana 15_al_22_de_junyNovetats setmana 15_al_22_de_juny
Novetats setmana 15_al_22_de_juny
 
Black & white
Black & whiteBlack & white
Black & white
 
NO ESTEM SOLS
NO ESTEM SOLSNO ESTEM SOLS
NO ESTEM SOLS
 
PlusConcept.Singapore.072016s
PlusConcept.Singapore.072016sPlusConcept.Singapore.072016s
PlusConcept.Singapore.072016s
 
Screens (Krems)
Screens (Krems)Screens (Krems)
Screens (Krems)
 
Generation X Woodline, My Presentation (Eva Zwahlen)
Generation X Woodline, My Presentation (Eva Zwahlen)Generation X Woodline, My Presentation (Eva Zwahlen)
Generation X Woodline, My Presentation (Eva Zwahlen)
 
Combatiendo Amenazas de Seguridad en la Nube - WatchGuard
Combatiendo Amenazas de Seguridad en la Nube - WatchGuardCombatiendo Amenazas de Seguridad en la Nube - WatchGuard
Combatiendo Amenazas de Seguridad en la Nube - WatchGuard
 
POWER POINT cargols 2011-12
POWER POINT cargols 2011-12 POWER POINT cargols 2011-12
POWER POINT cargols 2011-12
 
CompañEros...
CompañEros...CompañEros...
CompañEros...
 

Similar to ROR basics

Ruby on rails for beginers
Ruby on rails for beginersRuby on rails for beginers
Ruby on rails for beginers
shanmukhareddy dasi
 
Rails
RailsRails
Rails
SHC
 
Html Tutor
Html TutorHtml Tutor
Html Tutor
Sachin MK
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
Sonia Simi
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
anides
 
Ncp computer appls web tech asish
Ncp computer appls  web tech asishNcp computer appls  web tech asish
Ncp computer appls web tech asish
NCP
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorial
sunniboy
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
TAInteractive
 
Ruby on Rails
Ruby on Rails Ruby on Rails
Ruby on Rails
thinkahead.net
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
TAInteractive
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails Siddhesh
Siddhesh Bhobe
 
Rails Rookies Bootcamp - Blogger
Rails Rookies Bootcamp - BloggerRails Rookies Bootcamp - Blogger
Rails Rookies Bootcamp - Blogger
Nathanial McConnell
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Balint Erdi
 
Iwt module 1
Iwt  module 1Iwt  module 1
Iwt module 1
SANTOSH RATH
 
Entity framework
Entity frameworkEntity framework
Entity framework
Mehdi jannati
 
Ruby on Rails
Ruby on RailsRuby on Rails
Rails interview questions
Rails interview questionsRails interview questions
Rails interview questions
Durgesh Tripathi
 
Website development-osgl
Website development-osglWebsite development-osgl
Website development-osgl
priyanka sharma
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web building
RC Morales
 
Content Management That Won't Rot Your Brain
Content Management That Won't Rot Your BrainContent Management That Won't Rot Your Brain
Content Management That Won't Rot Your Brain
Sean Cribbs
 

Similar to ROR basics (20)

Ruby on rails for beginers
Ruby on rails for beginersRuby on rails for beginers
Ruby on rails for beginers
 
Rails
RailsRails
Rails
 
Html Tutor
Html TutorHtml Tutor
Html Tutor
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Ncp computer appls web tech asish
Ncp computer appls  web tech asishNcp computer appls  web tech asish
Ncp computer appls web tech asish
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorial
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Ruby on Rails
Ruby on Rails Ruby on Rails
Ruby on Rails
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails Siddhesh
 
Rails Rookies Bootcamp - Blogger
Rails Rookies Bootcamp - BloggerRails Rookies Bootcamp - Blogger
Rails Rookies Bootcamp - Blogger
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Iwt module 1
Iwt  module 1Iwt  module 1
Iwt module 1
 
Entity framework
Entity frameworkEntity framework
Entity framework
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Rails interview questions
Rails interview questionsRails interview questions
Rails interview questions
 
Website development-osgl
Website development-osglWebsite development-osgl
Website development-osgl
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web building
 
Content Management That Won't Rot Your Brain
Content Management That Won't Rot Your BrainContent Management That Won't Rot Your Brain
Content Management That Won't Rot Your Brain
 

Recently uploaded

Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 

Recently uploaded (20)

Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 

ROR basics

  • 1. Ruby on Rails A playful guide Perry Carbonell | Sep 2013
  • 2. Applications are typically constructed using a bunch of files located in your local folders. Ruby on Rails is no different; it has a bunch of files embedded in particular folders which serve a particular purpose. Michael Hartl describes this (re: table 1.1) as follows:
  • 3. Here’s what you need Sublime Text C: localhost:3000 database To start ROR, you need a file editor. Notepad comes default with most PC’s but the power of Sublime Text is head and shoulders above the trusty Notepad. I’ll use this symbol to describe Sublime Text more: Like I said in my earlier statement, files live in folders within your computer. I’ll use this symbol to describe folder directory: Folder Directory You will also need a tool to run commands on your computer. Some people like the visual nature of IDE’s for running commands. I’m a little old school and use Git Bash to run my commands. Here’s my symbol: You will eventually reach a stage where you will need to deploy your code in your local (development) environment. Here’s my representation of your local including a database: Finally you need to use your internet to get to a few other resources such as: GitHub (web-based version control) Heroku (your cloud production platform) Heroku database GitHub site Git Version files Blue to denote web-based. I’ll explain these more later.
  • 4. Here’s what’s happening | Sublime Text Sublime Text C: localhost:3000 database Directory 1 Heroku database Git Hub 1 Use Sublime Text to code. With ROR, this could be anything from Ruby to HTML, CSS, Javascript languages. It will therefore work to your advantage to have a good working knowledge of these languages prior working with ROR. 2 These files live in several folders within your directory (re: slide 2). 2
  • 5. Here’s what’s happening | Command Line Sublime Text C: localhost:3000 database Directory 1 Heroku database Git Hub 1 Use Command Line to make files, move files, commit, merge, push etc. Command lines are exactly that, they are commands that execute some action on your application. I’m using Git Bash for this purpose. 2 Once you initially push, your code is uploaded to your development environment (locahost:3000).The application is connected to a database (SQL Lite for standard ROR) and you use the command line to manipulate the database. 2
  • 6. Here’s what’s happening | Git Hub & Heroku Sublime Text localhost:3000 database Directory 1 Heroku database GitHub C: 2 1 GitHub is used as a version control system. As soon as you’re happy with your development code, you can push the code up to GitHub. You can now perform further development on your local environment knowing that you have GitHub as back-up (it mimics the file and folder directory structure shaded in grey on the right.. 2 Heroku can be treated as your production environment. It also has its own database which is important to note.
  • 7. Here’s what’s happening | Dev vs Prod Sublime Text C: localhost:3000 database Directory Heroku database Git Hub Development Environment (local drive) Production Environment (on the WEB)
  • 8. Here’s what it really looks like Sublime Text C: Directory My Representation The Real Thing
  • 9. Here’s what it really looks like My Representation The Real Thing Heroku GitHub
  • 10. Here’s what’s happening | with HTML C: database Directorystyle in CSS behaviour in JavaScript and Ruby structure in HTML Wiki says: It basically provides the structure for your web page. Here’s a sample: HyperText Markup Language (HTML) is the main markup language for creating web pages and other information that can be displayed in a web browser. HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>), within the web page content. HTML tags most commonly come in pairs like <h1> and </h1>, although some tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, further tags, My say:
  • 11. Here’s what’s happening | with CSS C: database Directorystyle in CSS behaviour in JavaScript and Ruby structure in HTML Wiki says: This is your presentation layer. Here’s a sample: Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation semantics (the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTMLand XHTML, but the language can also be applied to any kind of XML document, including plain XML, SVG and XUL. CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the layout, colors, and fonts. My say:
  • 12. Here’s what’s happening | Website composition C: database Directorystyle in CSS behaviour in JavaScript and Ruby structure in HTML Wiki says: It facilitates user interaction. Here’s a sample embedded within HTML: JavaScript (JS) is an interpreted computer programming language.[5] As part of web browsers, implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document contentthat is displayed.[5] It has also become common in server-side programming, game development and the creation of desktop applications. My say:
  • 13. Here’s what’s happening | with Ruby C: database Directorystyle in CSS behaviour in JavaScript and Ruby structure in HTML Wiki says: Ruby on Rails is the framework whereas Ruby is the language. Here’s a Ruby snip: Ruby is a dynamic, reflective, object-oriented, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan. Ruby embodies syntax inspired by Perl with Smalltalk-like features and was also influenced by Eiffel and Lisp.[8] It supports multiple programming paradigms, including functional, object oriented, and imperative. It also has a dynamic type system and automatic memory management. My say:
  • 14. Here’s what’s happening | with Command Line C: database Directorystyle in CSS behaviour in JavaScript and Ruby structure in HTML Wiki says: Implement your code by giving it commands. Here, I’m in the process of going in to my working folder: A command-line interface (CLI), also known as command-line user interface, console user interface,[1] and character user interface (CUI), is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines). The CLI was the primary means of interaction with most popular operating systems in the 1970s and 1980s, including MS-DOS, CP/M, Unix, and Apple DOS. The interface is usually implemented with a command line shell, which is a program that accepts commands as text input and converts commands to appropriate operating system functions. My say:
  • 15. Here’s what’s happening | with the database C: database (db) Directorystyle in CSS behaviour in JavaScript and Ruby structure in HTML Wiki says: The first sentence in the Wiki says it all. FYI if you use ROR, here’s a link to some Rails Command Lines. Within this you will find the code rake db:migrate which is one of the most important command you will be using (it modifies the db schema). A database is an organized collection of data. The data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. For example, modeling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database management systems (DBMSs) are specially designed applications that interact with the user, other applications, and the database itself to capture and analyze data. A general-purpose database management system (DBMS) is a software system designed to allow the definition, creation, querying, update, and administration of databases. My say:
  • 16. The Wrap Now there’s a lot of things going on here for a beginner as you can see. There’s only so much you can learn in a month’s time so when approaching something with a scope as large as this, it’s probably not a bad idea to break things down into smaller bite size chunks. Having a closer look into slides 10 - 15, basically the composition of a web app, I’ve decided to go ‘Back to the Basics’ and pick-up the fundamentals in the order of the slides I have listed i.e. HTML 5 first, CSS next and so on. I hope these slides help others out there. At the very least, I intend to look back on this and remind myself where it all began. Until the next blog, take care out there and happy coding. Perry Carbonell marketmeasuresaustralia@gmail.com