Upload
others
View
10
Download
0
Embed Size (px)
Citation preview
• Rails is a full stack, web application framework
• A MVC framework
• DRY - Do not repeat yourself
• Convention over configuration
2009年9月18日星期五
• Merb: no code is faster than no code [merge with rails]
• Sinatra is a simple DSL which has minimum code
• Some other names: camping,ramaze,waves..
Someone wants simpler and faster
How can you know that, if the code is not written by yourself?
2009年9月18日星期五
Say goodbye to environment setup
Linux system setup
Web server configuration
Reverse proxy
scaling
2009年9月18日星期五
• write a config.ru file:
• git init
• git add .
• git commit -m “whatever you want to mark”
• sudo gem install heroku
• heroku create your-app-name
• git push heroku master
require "blog.rb"run Sinatra::Application
2009年9月18日星期五
• Easy deploy
• A free plan for demo
• Easy scaling
• Use your domain name freely
• Customization for ruby
• GAE is native for python and support java
2009年9月18日星期五
Requests per second: 11.44 [#/sec] (mean)Time per request: 873.761 [ms] (mean)Time per request: 87.376 [ms]
ab -n 100 -c 10 http://msg.dazhe.me/
Concurrency Level: 10Time taken for tests: 8.738 secondsComplete requests: 100
A simple blog system
2009年9月18日星期五
• Google Map API need a domain name
• loc2ip.dazhe.me
• heroku create your-app-name
• The auto-generated name with mass you mind in no time
• A credit card is needed for enable the customized domain function
• not reasonable because it is free
2009年9月18日星期五
• Add gems?
• write a .gems file
• Use other DB servers
• 5M space is not big enough
rspec --version 1.2.7radiant --version 0.7.1
2009年9月18日星期五
• References
• docs.heroku.com
• www.sinatrarb.com
• Lightweight Webservices with Sinatra and RestClient: http://u.dazhe.me/6
2009年9月18日星期五
Deep Blue
www.footalk.com
2009年9月18日星期五