15

Click here to load reader

Why ruby?

Embed Size (px)

Citation preview

Page 1: Why ruby?

RubyA Programmer's Best Friend

Presented by Bunlong VAN

http://geekhmer.github.io

Page 2: Why ruby?

The Disclaimer

Page 3: Why ruby?

Ruby on Rails?

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

Page 4: Why ruby?

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

Page 5: Why ruby?

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”

Page 6: Why ruby?

Communities

Page 7: Why ruby?

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!” }

Page 8: Why ruby?

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 }

Page 9: Why ruby?

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”

Page 10: Why ruby?

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

Page 11: Why ruby?

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.”

Page 12: Why ruby?

Object-Oriented-Programming

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

Page 13: Why ruby?

Encourage Testing

Test::Unit builds in into standard library

Other tools Rspec, MiniTest, ...

Page 14: Why ruby?
Page 15: Why ruby?