7. Ruby on Rails is an open-source
web framework that’s optimized
for programmer happiness and
sustainable productivity.
It lets you write beautiful code
by favoring convention over
configuration.
8. Ruby on Rails is an open-source
web framework that’s optimized
for programmer happiness and
sustainable productivity.
It lets you write beautiful code
by favoring convention over
configuration.
9. Ruby on Rails is an open-source
web framework that’s optimized
for programmer happiness and
sustainable productivity.
It lets you write beautiful code
by favoring convention over
configuration.
10. Ruby on Rails is an open-source
web framework that’s optimized
for programmer happiness and
sustainable productivity.
It lets you write beautiful code
by favoring convention over
configuration.
11. Ruby on Rails is an open-source
web framework that’s optimized
for programmer happiness and
sustainable productivity.
It lets you write beautiful code
by favoring convention over
configuration.
30. Ruby is 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.
31. Ruby is 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.
32. Ruby is 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.
33. Ruby is 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.
34. Ruby is 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.
35. Ruby is 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.
36. Ruby is 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.
38. JAVA
public static String reverseString(String source) {
int i, len = source.length();
StringBuffer dest = new StringBuffer(len);
}
for (i = (len - 1); i >= 0; i--)
dest.append(source.charAt(i));
return dest.toString();
reverseString("Krawutzikapuzi");
=> "izupakiztuwarK"
47. class String
def method_missing(method)
puts "intercepting call to #{method}"
end
end
"Lorem ipsum dolor".krawutzikaputzi
=> "intercepting call to krawutzikaputzi"
67. XML REPRESENTATION
<?xml version=“1.0” encoding=“UTF-8”?>
<post>
<id type=“integer”>1</id>
<title>Another title</title>
<body>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum.</body>
<created-at type=“datetime”>2008-04-14T12:07:46+02:00</created-at>
<published type=“boolean”>true</published>
<updated-at type=“datetime”>2008-04-15T11:30:50+02:00</updated-at>
<version type=“integer”>2</version>
</post>
http://0.0.0.0:3000/posts/1.xml
68. def show
@post =
Post.find(params[:id])respond_to do |
format|
format.html
format.xml { render :xml => @post }
end
end
77. GET http://localhost:3000/posts
GET http://localhost:3000/posts/1
POST http://localhost:3000/posts
PUT http://localhost:3000/posts/1
DELETE http://localhost:3000/posts/1
78. The best thing is
that Rails does it all
completely
automatically.