Why ruby?

Post on 14-Jun-2015

50 views 0 download

Transcript of Why ruby?

RubyA Programmer's Best Friend

Presented by Bunlong VAN

http://geekhmer.github.io

The Disclaimer

Ruby on Rails?

• Ruby – A Programming Language– Created in 1993 by Yukihiro “Matz” Matsumoto

The Ruby Language

“Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.”

“Interpreted Script Language”

“Ruby was first designed and developed in the mid-1990s by Matz in Japan.”

“The standard 1.8.7 implementation is written in C. “

•be productivebe productive•to enjoy programmingto enjoy programming•and be happyand be happy

Reduce Code

public class HelloWorld {public class HelloWorld { public static void main(String args[]) {public static void main(String args[]) { System.out.println(“Hello World”);System.out.println(“Hello World”); }}}}

puts “Hellow World”puts “Hellow World”

Communities

Code is Human-Readable

“The code was designed from the start to be human-readable and this mean that non-programmer can have a very easy to understand what a program is designed to do”.

3.Times { print “Ho!” }

Coderspeak

“Ruby allows you to express your ideas through a computer”

– Why the lucky stiff

3.times { print “Ho!” }

exit unless “restaurant”.include? “aura”

['toast', 'cheese', 'wine'].each { |food| print food.capitalize }

Ruby on Rails

• Ruby On Rails – A Web Framework– Created in 2004 by David Heinemeier

Hansson

“Ruby on Rails is a Model-View-Controller framework for creating database-driven websites in Ruby, Rails is build on simple concepts”

Ruby Gems

Problem:• Hard to find libraries?

Application

Database Interface Mailer Web Services Logger

Solution:• Package Version & Dependency Management• Package Delivery• Package Documentation Management

»gem install rails –include dependencies

Command-line

“The interactive Ruby sheel is a unique feature that allows developers to maintain and experiment with commands-line. There is no need to write webpages and check their functionality in browser.”

Object-Oriented-Programming

“Object-Oriented-Programming is a necessity for clean and maintainable code. However, In Ruby, everything is an object.”

Encourage Testing

Test::Unit builds in into standard library

Other tools Rspec, MiniTest, ...