SlideShare a Scribd company logo
1 of 28
Applied  Ruby on Rails & AJAX An insight into the technology and principles behind a social networking community
Who am I? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What we’ll cover (aka the essentials) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The essentials continued ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Why would I use Ruby On Rails? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MVC
Crash Course [root@srv31 docs]# rails ror create create  app/controllers create  app/helpers create  app/models create  app/views/layouts create  config/environments create  components create  db create  doc create  lib create  lib/tasks create  log create  public/images ... Creating a bare application on Rails [root@srv31 docs]# rails ror
Do it with Scaffolding [root@srv31 ror]# ruby script/generate scaffold user exists  app/controllers/ exists  app/helpers/ create  app/views/users exists  test/functional/ dependency  model exists  app/models/ exists  test/unit/ exists  test/fixtures/ create  app/models/user.rb ruby script/generate scaffold user CRUD = ‘C’reate, ‘R’ead, ‘U’pdate, ‘D’elete
Experience the magic http://localhost:3000/users http://localhost:3000/users/new
Find functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
URLs in ROR <%= link_to “Reply”, :controller=>”posts”, :action=>“reply”, :id=>4  %>
What is Adoppt ,[object Object],[object Object],[object Object]
 
 
Ajaxifying the login  form ,[object Object],<%=  link_to  “Login”, :controller=>”member”, :action=>”login” %> Typical form in ROR <%=  link_to_remote  “Login”,  :url=>{ :controller=>”member”, :action=>”login” }, :update => “loginform”, :loading => “Element.toggle($(‘loading’))”, :complete => “Element.toggle($(‘loading’))” %> Same form ‘AJAXified’
 
Relationships / Validations ,[object Object],[object Object],[object Object],[object Object],class Portal < ActiveRecord::Base has_many  :subscriptions has_many  :favorites belongs_to  :member validates_presence_of  :portal_name validates_presence_of  :portal_description validates_presence_of  :portal_url validates_uniqueness_of  :portal_url … end
HABTM using Subscriptions class  Member has_many :subscriptions end  class  Portal has_many :subscriptions end class  Subscription   belongs_to :member  belongs_to :portal end
Self referential relationships ,[object Object],[object Object],class Member < ActiveRecord::Base has_and_belongs_to_many  :friends, : class_name  => &quot;Member&quot;, : join_table  => &quot;friends_members&quot;, : association_foreign_key  => &quot;friend_id&quot;, : foreign_key  => &quot;member_id&quot;, : after_add  => :become_friend_with_friend, : after_remove  => :end_friendship end
Using relationships ,[object Object],@portal = Portal.new @favorites = @portal.favorites 2. Which members are subscribed? @portal = Portal.new @members = @portal.subscriptions @member = Member.new @member_portals = @member.portals 3. Which portals a member is subscribed to? 4. Which members are friends of a member? @member = Member.new @friends = @member.friends
Transactions (InnoDB) Member.transaction(@member, @friend) do @member.friends << @friend unless  @member.friends.include?(@friend) @friend.friends << @member unless  @friend.friends.include?(@member) end
Blog Claims def claim_verify @wb= Weblog.find_by_url(@params[:url]) require 'open-uri‘ @found =  open(@wb.url).read.include?(@wb.v_key) end
Tagging ,[object Object]
Tagging class  Article  < ActiveRecord::Base acts_as_taggable  :join_class_name => ' TagArticle ‘ class  TagArticle belongs_to :article, :class_name => ' Article ', :foreign_key => 'article_id‘ @tagged = Article.tags_count(:limit => 10) Tagging an article @article = Article.new @article.tag “mysql conference ror” Tags for an article @tags = @article.tags() Tag Cloud (Tom Fakes)
In place editing class BlogsController < ApplicationController  in_place_edit_for  :weblog, :description <%=  in_place_editor_field  :weblog, :description, :value=>''  %> In your views file In your model
Recap ,[object Object]
Where to learn more ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Q&A

More Related Content

What's hot

Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails: Building Web Applications Is Fun Again!Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails: Building Web Applications Is Fun Again!judofyr
 
From Java to Ruby...and Back
From Java to Ruby...and BackFrom Java to Ruby...and Back
From Java to Ruby...and BackAnil Hemrajani
 
Digpen 7: Why choose Laravel?
Digpen 7: Why choose Laravel?Digpen 7: Why choose Laravel?
Digpen 7: Why choose Laravel?John Blackmore
 
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 GroupJose de Leon
 
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 DrupalExove
 
XFILES, the APEX 4 version - The truth is in there
XFILES, the APEX 4 version - The truth is in thereXFILES, the APEX 4 version - The truth is in there
XFILES, the APEX 4 version - The truth is in thereRoel Hartman
 
Alexander Zeng
Alexander ZengAlexander Zeng
Alexander ZengAlex Zeng
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Wen-Tien Chang
 
A Gentle introduction to Web Development & Django
A Gentle introduction to Web Development & DjangoA Gentle introduction to Web Development & Django
A Gentle introduction to Web Development & DjangoPRASANNAVENK
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
 
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Exove
 
Back to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentBack to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentClint LaForest
 
Web Development In 2018
Web Development In 2018Web Development In 2018
Web Development In 2018Traversy Media
 
Web UI migration
Web UI migrationWeb UI migration
Web UI migrationDoug Lucy
 
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!Evan Mullins
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web developmentMohammed Safwat
 
Twitter - Architecture and Scalability lessons
Twitter - Architecture and Scalability lessonsTwitter - Architecture and Scalability lessons
Twitter - Architecture and Scalability lessonsAditya Rao
 
Web Design World Flickr
Web Design World FlickrWeb Design World Flickr
Web Design World Flickrroyans
 

What's hot (20)

Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails: Building Web Applications Is Fun Again!Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails: Building Web Applications Is Fun Again!
 
From Java to Ruby...and Back
From Java to Ruby...and BackFrom Java to Ruby...and Back
From Java to Ruby...and Back
 
Digpen 7: Why choose Laravel?
Digpen 7: Why choose Laravel?Digpen 7: Why choose Laravel?
Digpen 7: Why choose Laravel?
 
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
 
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
 
XFILES, the APEX 4 version - The truth is in there
XFILES, the APEX 4 version - The truth is in thereXFILES, the APEX 4 version - The truth is in there
XFILES, the APEX 4 version - The truth is in there
 
Alexander Zeng
Alexander ZengAlexander Zeng
Alexander Zeng
 
Oracle APEX Nitro
Oracle APEX NitroOracle APEX Nitro
Oracle APEX Nitro
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
 
A Gentle introduction to Web Development & Django
A Gentle introduction to Web Development & DjangoA Gentle introduction to Web Development & Django
A Gentle introduction to Web Development & Django
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
 
Back to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentBack to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web Development
 
Spring In Alfresco Ecm
Spring In Alfresco EcmSpring In Alfresco Ecm
Spring In Alfresco Ecm
 
Web Development In 2018
Web Development In 2018Web Development In 2018
Web Development In 2018
 
Web UI migration
Web UI migrationWeb UI migration
Web UI migration
 
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!
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
Twitter - Architecture and Scalability lessons
Twitter - Architecture and Scalability lessonsTwitter - Architecture and Scalability lessons
Twitter - Architecture and Scalability lessons
 
Web Design World Flickr
Web Design World FlickrWeb Design World Flickr
Web Design World Flickr
 

Viewers also liked

planning_workshop
planning_workshopplanning_workshop
planning_workshopwebuploader
 
SLBizU_PublicVideo_0705
SLBizU_PublicVideo_0705SLBizU_PublicVideo_0705
SLBizU_PublicVideo_0705webuploader
 
Prioritization_EHS_Research_Needs_Engineered_Nanoscale_Materials
Prioritization_EHS_Research_Needs_Engineered_Nanoscale_MaterialsPrioritization_EHS_Research_Needs_Engineered_Nanoscale_Materials
Prioritization_EHS_Research_Needs_Engineered_Nanoscale_Materialswebuploader
 
SocialNetworkingSitesandtheJobSearch
SocialNetworkingSitesandtheJobSearchSocialNetworkingSitesandtheJobSearch
SocialNetworkingSitesandtheJobSearchwebuploader
 
INFO4990_Hossain
INFO4990_HossainINFO4990_Hossain
INFO4990_Hossainwebuploader
 

Viewers also liked (8)

planning_workshop
planning_workshopplanning_workshop
planning_workshop
 
SLBizU_PublicVideo_0705
SLBizU_PublicVideo_0705SLBizU_PublicVideo_0705
SLBizU_PublicVideo_0705
 
G060065-00
G060065-00G060065-00
G060065-00
 
Prioritization_EHS_Research_Needs_Engineered_Nanoscale_Materials
Prioritization_EHS_Research_Needs_Engineered_Nanoscale_MaterialsPrioritization_EHS_Research_Needs_Engineered_Nanoscale_Materials
Prioritization_EHS_Research_Needs_Engineered_Nanoscale_Materials
 
presentation29
presentation29presentation29
presentation29
 
SocialNetworkingSitesandtheJobSearch
SocialNetworkingSitesandtheJobSearchSocialNetworkingSitesandtheJobSearch
SocialNetworkingSitesandtheJobSearch
 
INFO4990_Hossain
INFO4990_HossainINFO4990_Hossain
INFO4990_Hossain
 
nai_bud
nai_budnai_bud
nai_bud
 

Similar to mashraqi_farhan

Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsJohn Brunswick
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on RailsDiki Andeas
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's CodeWildan Maulana
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecordMark Menard
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialYi-Ting Cheng
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebPatrick Chanezon
 
Action Controller Overview, Season 2
Action Controller Overview, Season 2Action Controller Overview, Season 2
Action Controller Overview, Season 2RORLAB
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기lanslote
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real worldAtul Chhoda
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real worldAtul Chhoda
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developersGlen Gordon
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座Li Yi
 

Similar to mashraqi_farhan (20)

Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
Hi5 Open Social
Hi5   Open SocialHi5   Open Social
Hi5 Open Social
 
API Design Tour: Dell
API Design Tour: DellAPI Design Tour: Dell
API Design Tour: Dell
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's Code
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecord
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
 
Action Controller Overview, Season 2
Action Controller Overview, Season 2Action Controller Overview, Season 2
Action Controller Overview, Season 2
 
Restful design at work v2.0
Restful design at work v2.0Restful design at work v2.0
Restful design at work v2.0
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real world
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real world
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
 
Merb Router
Merb RouterMerb Router
Merb Router
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 

More from webuploader

Michael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_NetworkingMichael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_Networkingwebuploader
 
cyberSecurity_Milliron
cyberSecurity_MillironcyberSecurity_Milliron
cyberSecurity_Millironwebuploader
 
LiveseyMotleyPresentation
LiveseyMotleyPresentationLiveseyMotleyPresentation
LiveseyMotleyPresentationwebuploader
 
FairShare_Morningstar_022607
FairShare_Morningstar_022607FairShare_Morningstar_022607
FairShare_Morningstar_022607webuploader
 
3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling3_System_Requirements_and_Scaling
3_System_Requirements_and_Scalingwebuploader
 
ScalabilityAvailability
ScalabilityAvailabilityScalabilityAvailability
ScalabilityAvailabilitywebuploader
 
scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practiceswebuploader
 
7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summitwebuploader
 
FreeBSD - LinuxExpo
FreeBSD - LinuxExpoFreeBSD - LinuxExpo
FreeBSD - LinuxExpowebuploader
 

More from webuploader (20)

Michael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_NetworkingMichael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_Networking
 
socialpref
socialprefsocialpref
socialpref
 
cyberSecurity_Milliron
cyberSecurity_MillironcyberSecurity_Milliron
cyberSecurity_Milliron
 
PJO-3B
PJO-3BPJO-3B
PJO-3B
 
LiveseyMotleyPresentation
LiveseyMotleyPresentationLiveseyMotleyPresentation
LiveseyMotleyPresentation
 
FairShare_Morningstar_022607
FairShare_Morningstar_022607FairShare_Morningstar_022607
FairShare_Morningstar_022607
 
saito_porcupine
saito_porcupinesaito_porcupine
saito_porcupine
 
3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling
 
ScalabilityAvailability
ScalabilityAvailabilityScalabilityAvailability
ScalabilityAvailability
 
scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practices
 
7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit
 
Chapter5
Chapter5Chapter5
Chapter5
 
Mak3
Mak3Mak3
Mak3
 
visagie_freebsd
visagie_freebsdvisagie_freebsd
visagie_freebsd
 
freebsd-watitis
freebsd-watitisfreebsd-watitis
freebsd-watitis
 
BPotter-L1-05
BPotter-L1-05BPotter-L1-05
BPotter-L1-05
 
FreeBSD - LinuxExpo
FreeBSD - LinuxExpoFreeBSD - LinuxExpo
FreeBSD - LinuxExpo
 
CLI313
CLI313CLI313
CLI313
 
CFInterop
CFInteropCFInterop
CFInterop
 
WCE031_WH06
WCE031_WH06WCE031_WH06
WCE031_WH06
 

Recently uploaded

Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...lizamodels9
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfAdmir Softic
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfAmzadHosen3
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Delhi Call girls
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 

Recently uploaded (20)

Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pillsMifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 

mashraqi_farhan

  • 1. Applied Ruby on Rails & AJAX An insight into the technology and principles behind a social networking community
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. MVC
  • 7. Crash Course [root@srv31 docs]# rails ror create create app/controllers create app/helpers create app/models create app/views/layouts create config/environments create components create db create doc create lib create lib/tasks create log create public/images ... Creating a bare application on Rails [root@srv31 docs]# rails ror
  • 8. Do it with Scaffolding [root@srv31 ror]# ruby script/generate scaffold user exists app/controllers/ exists app/helpers/ create app/views/users exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ create app/models/user.rb ruby script/generate scaffold user CRUD = ‘C’reate, ‘R’ead, ‘U’pdate, ‘D’elete
  • 9. Experience the magic http://localhost:3000/users http://localhost:3000/users/new
  • 10.
  • 11. URLs in ROR <%= link_to “Reply”, :controller=>”posts”, :action=>“reply”, :id=>4 %>
  • 12.
  • 13.  
  • 14.  
  • 15.
  • 16.  
  • 17.
  • 18. HABTM using Subscriptions class Member has_many :subscriptions end class Portal has_many :subscriptions end class Subscription belongs_to :member belongs_to :portal end
  • 19.
  • 20.
  • 21. Transactions (InnoDB) Member.transaction(@member, @friend) do @member.friends << @friend unless @member.friends.include?(@friend) @friend.friends << @member unless @friend.friends.include?(@member) end
  • 22. Blog Claims def claim_verify @wb= Weblog.find_by_url(@params[:url]) require 'open-uri‘ @found = open(@wb.url).read.include?(@wb.v_key) end
  • 23.
  • 24. Tagging class Article < ActiveRecord::Base acts_as_taggable :join_class_name => ' TagArticle ‘ class TagArticle belongs_to :article, :class_name => ' Article ', :foreign_key => 'article_id‘ @tagged = Article.tags_count(:limit => 10) Tagging an article @article = Article.new @article.tag “mysql conference ror” Tags for an article @tags = @article.tags() Tag Cloud (Tom Fakes)
  • 25. In place editing class BlogsController < ApplicationController in_place_edit_for :weblog, :description <%= in_place_editor_field :weblog, :description, :value=>'' %> In your views file In your model
  • 26.
  • 27.
  • 28. Q&A