1 / 11

Learn RoR Basics

Learn the basics of Ruby-on-Rails language from our experienced RoR developer.

spaceotech
Download Presentation

Learn RoR Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ruby Language Session 1

  2. Websites built on Rails • Twitter • Basecamp • Hulu • SlideShare • GitHub • Shopify • Groupon • AirBnb

  3. What is Ruby ? A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. - https://www.ruby-lang.org It was developed by Yukihiro Matsumoto (also known as Matz in the Ruby community) in the mid 1990’s in Japan. It is a pure Object-Oriented and an interpreted scripting language.

  4. Say WHAAAAT ? OOP vs FP According to Wikipedia, OOP “is a programming paradigm is based on the concept of “objects”, which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. Functional programming is the form of programming that attempts to avoid changing state and mutable data.

  5. Interpreted vs Compiled Ruby is an interpreted scripting language and is run directly without first compiling and generating the byte code. With a compiled language, code you enter is reduced to a set of machine-specific instructions before being saved as an executable file. Interpreted programs can modify themselves by adding or changing functions at runtime. It is also usually easier to develop applications in an interpreted environment because you don't have to recompile your application each time you want to test a small section.

  6. Colour me curious. Installation • Windows : RubyInstaller • Ubuntu : Package manager • Mac : Pre Installed !!!

  7. Let’s compare shall we Imagine you want to get the time one month from this very second. Here is how you would do that in Python and Ruby languages • Python from datetime import datetime from dateutil.relativedelta import relativedelta new_time = datetime.now() + relativedelta(months=1)

  8. And in Ruby... • Ruby require 'active_support/all' new_time = 1.month.from_now

  9. Let the magic begin Ruby files have .rb as extension Hello World Classes and Object Global variable Instance variable Class variable

  10. Ruby basics Array Hash Range If..ElseCase Loops Methods

  11. Thank You, Keep Learning. Space-O Technologies

More Related