Ruby! Ronald L. Ramos. What is Ruby? Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms,

Slides:



Advertisements
Similar presentations
Python Whats in a name? Snake logos and mascot notwithstanding, its named after Monty Pythons Flying Circus Humor-impaired can safely.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Introduction to .NET Framework
Compiler Design PROJECT PRESENTATION : COMPILER FOR OBJECTIVE C Harshal Waghmare Jeet Kumar Nandan Kumar Vishal Agrawal.
Language of the Month If it’s December, it must be Ruby! Adam Coffman and Brent Beer.
Ruby on Rails Web development that doesn’t hurt By Mylore, Dung, Lee, Karen and Bryan.
Ruby on Rails Tutorial Peter Mosca April, Ruby on Rails Tutorial Ruby History Invented 12 years ago in Japan by Yukihiro Matsumoto Spent first 5.
Server-Side vs. Client-Side Scripting Languages
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
Reasons to study concepts of PL
Ruby The Gem of new programming languages. An interpreted scripting language.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
Ruby on Rails a popular web application framework, aimed to increase the speed and ease of web development Ruby on Rails, Tim Zappe.
Drew Murphy Drew Ebelhar. History December 18, 1987 Creator- Larry Wall Objective: To develop a general purpose Unix scripting language to make report.
SCRIPTING LANGUAGE. The first interactive shells were developed in the 1960s to enable remote operation of the first time-sharing systems, and these,
Python Jordan Miller and Lauren Winkleman CS 311 Fall 2011.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
By Logan Phipps Hal student.  This power point explains some common programming languages enjoy  When done click on the home button to return to home.
Chapter 13 Web Application Infrastructure. Objectives Explain the components and purpose of a web application platform Describe several common webapp.
The PHP Story. PHP Story PHP is a programming language. Incorporate(join) sophisticated business logic. Widely used general purpose scripting language.
| Lugano, Ruby on Rails.
A little engineering on Rails Robert W. Hasker. Goals Intro to the Rails framework ▫Basic concepts: MVC, Active Record ▫A bit of Ruby Using Rails to build.
Team Corpsegrinder Victor Romero Calvin Chan Christian Hericks Vamsi Rapaka Robert Viramontes.
Ruby on Rails Charles Severance Textbook: Build Your own Ruby on Rails Application by Patrick Lenz (ISBN: )
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Comparison of OO Programming Languages © Jason Voegele, 2003.
Visual Basic: An Object Oriented Approach 12 – Creating and using ActiveX objects.
A TOUR OF RUBY 2011 ACM Class, Dong Xie. What is Ruby?  Dynamic programming language  Complex but expressive grammar  A core class library with rich.
CS 355 – Programming Languages
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
General Purpose Language Ruby Kit Chan COMP3351 Programming Languages November 9, 2007.
Ruby & rails by Nicholas Belotti. What is ruby Ruby is an object orientated scripting language. In Ruby...everything is an object! Ruby was released in.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
CS 403: Programming Languages Lecture 16 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
Sadegh Aliakbary Sharif University of Technology Fall 2012.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Ruby. Who am I? 1- Bunlong Van 2- Sreyleap Lay, 3- Chhon Meily Blog:
CSSE501 Object-Oriented Development. Chapter 12: Implications of Substitution  In this chapter we will investigate some of the implications of the principle.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Introduction to PHP and MySQL Kirkwood Center for Continuing Education By Fred McClurg, © Copyright 2015, Fred McClurg, All Rights.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
PHP Features. Features Clean syntax. Object-oriented fundamentals. An extensible architecture that encourages innovation. Support for both current and.
A very basic overview of Server-Side Scripting Or what is PHP, Perl, Python, Ruby and what can they do for me?
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Ruby/Ruby on Rails Yasushi Osonoi Open Dream corporation
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Introduction to Python Origins Nature of Python Importance of Python Example.
RUBY by Ryan Chase.
PHP vs. Python. Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are.
Object Oriented Programming Criteria: P2 Date: 07/10/15 Name: Thomas Jazwinski.
PROGRAMMING VOCABULARY. The Words ◦ FORTRAN ◦ COBOL ◦ PASCAL ◦ BASIC ◦ C ◦ Java ◦ Flash ◦ PERL ◦ Ruby ◦ Python.
XAMPP.
Ruby Tien Ho and Brandon Hostetter. Overview ▸ Object-oriented, functional, imperative, and reflective ▸ Interpreted language ▸ Influenced by Perl, Smalltalk,
First appeared Features Popular uses Basic This language emphasises on ease of use, allowing general purpose programming to those with a small amount of.
Presented By P.SRIVIDYA 085D1A0552 Programming Language.
NetBeans & Ruby David Botterill Software Engineer Global Technology Manager - Campus Ambassador Program Sun Microsystems, Inc.
Chapter 13 Web Application Infrastructure
Python Programming Unit -1.
The language focusses on ease of use
Top 8 Best Programming Languages To Learn
Java Interview Questions
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Basic 1964 PC general purpose Imperative Small Easy to use.
Ruby: An Introduction Created by Yukihiro Matsumoto in 1993 (named after his birthstone) Pure OO language (even the number 1 is an instance of a class)
Scope History of Ruby. Where can you use Ruby? General Features.
Programming Vocabulary
Web Application Development Using PHP
Presentation transcript:

Ruby! Ronald L. Ramos

What is Ruby? Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.

The Ideals of Matz Ruby is a language of careful balance. Its creator, Yukihiro “Matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming. He has often said that he is “trying to make Ruby natural, not simple,” in a way that mirrors life. Building on this, he adds: ◦Ruby is simple in appearance, but is very complex inside, just like our human body

Ruby’s Growth Since its public release in 1995, Ruby has drawn devoted coders worldwide. In 2006, Ruby achieved mass acceptance. With active user groups formed in the world’s major cities and Ruby-related conferences filled to capacity.

Concepts

Hello world!

Seeing Everything as an Object In Ruby, everything is an object. Every bit of information and code can be given their own properties and actions. Object-oriented programming calls properties by the name instance variables and actions are known as methods. Ruby’s pure object-oriented approach is most commonly demonstrated by a bit of code which applies an action to a number. Sample: 5.times { print "We *love* Ruby -- it's outrageous!" }

Ruby’s Flexibility Ruby is seen as a flexible language, since it allows its users to freely alter its parts. Essential parts of Ruby can be removed or redefined, at will. Existing parts can be added upon. Ruby tries not to restrict the coder. For example, addition is performed with the plus (+) operator. But, if you’d rather use the readable word plus, you could add such a method to Ruby’s builtin Numeric class. class Numeric def plus(x) self.+(x) end y = 5.plus 6 # y is now equal to 11

Blocks Ruby’s block are also seen as a source of great flexibility. A programmer can attach a closure to any method, describing how that method should act. The closure is called a block and has become one of the most popular features for newcomers to Ruby from other imperative languages like PHP or Visual Basic. search_engines = %w[Google Yahoo MSN].map do |engine| " + engine.downcase + ".com" end

Ruby and the Mixin Unlike many object-oriented languages, Ruby features single inheritance only, on purpose. But Ruby knows the concept of modules (called Categories in Objective-C). Modules are collections of methods. Classes can mixin a module and receive all its methods for free. For example, any class which implements the each method can mixin the Enumerable module, which adds a pile of methods that use each for looping. class MyArray include Enumerable end

Ruby’s Visual Appearance While Ruby often uses very limited punctuation and usually prefers English keywords, some punctuation is used to decorate Ruby. Ruby needs no variable declarations. It uses simple naming conventions to denote the scope of variables. var could be a local is an instance variable. $var is a global variable.

Other Features Ruby has exception handling features, like Java or Python, to make it easy to handle errors. Ruby features a true mark-and- sweep garbage collector for all Ruby objects. No need to maintain reference counts in extension libraries. As Matz says, “This is better for your health.” Writing C extensions in Ruby is easier than in Perl or Python, with a very elegant API for calling Ruby from C. This includes calls for embedding Ruby in software, for use as a scripting language. A SWIG interface is also available. Ruby can load extension libraries dynamically if an OS allows. Ruby features OS independent threading. Thus, for all platforms on which Ruby runs, you also have multithreading, regardless of if the OS supports it or not, even on MS-DOS! Ruby is highly portable: it is developed mostly on GNU/Linux, but works on many types of UNIX, Mac OS X, Windows 95/98/Me/NT/2000/XP, DOS, BeOS, OS/2, etc.

Ruby on Rails

What is Rails? What it is Full Stack Framework An extremely productive web- application framework. Written in Ruby by David Heinemeier Hansson. You could develop a web application at least ten times faster with Rails than you could with a typical Java framework. An open source Ruby framework for developing database-backed web applications. Your code and database schema are the configuration! No compilation phase required. Includes everything needed to create a database-driven web application using the Model-View-Controller pattern. Being a full-stack framework means that all layers are built to work seamlessly together Less Code. Requires fewer total lines of code than other frameworks spend setting up their XML

Try it out!

Try Ruby!

Seatwork #6 Finish the tutorial. Get a screenshot of the start and last activity in the tutorial Name the screenshots “yourname – SW6 – ruby0x.jpg” where 0x is 01 or 02 When done upload the screenshots to your Wiki folder and update your Wiki page Deadline: End of Class