- Google Personal Homepage
- Microsoft Windows Live
- Netvibes 這個很不錯
- goowy 比較特別是用 flash 技術
- Pageflakes
- Protopage
- eskobo
若以後檔案也在網路上(Google Drive project...), 桌面也跑到網路, 我們用的 Widnows/Mac OS 會不會小一點?
The wonderful Ruby/Rails world!
大致把書上 Table of Content 放上來, 相信看完後你們會有一些新想法!
軟 體/網站人員應該對這些新看法覺得蠻有趣的, 看到專案市場常常有人在抱怨, 但有一些人已經開始採取另外的作法. 不像現在軟體公司養那麼多人, 都快要進入恐龍級了, 為了獲利只得外包到人工便宜的地方, 不然就是壟斷那塊市場, 或許他們是因為網路公司的背景, 讓他們有如此不同的看法吧! 這些理念及經營手法多少可以從 37signals 及一些新興的 web 2.0 網站看出來
<VirtualHost *:80>
ServerName mywww
DocumentRoot d:/my_app/public/
ErrorLog d:/my_app/log/server.log
<Directory d:/my_app/public/>
SetEnv RAILS_ENV production
Options +FollowSymLinks +ExecCGI
AllowOverride all
Allow from all
Order allow,deny
</Directory>
</VirtualHost>
Alias /myapp "d:/my_app/public"
<Directory d:/my_app/public/>
SetEnv RAILS_ENV production
Options +FollowSymLinks +ExecCGI
AllowOverride all
Allow from all
Order allow,deny
</Directory>
require 'drb'
class HelloServer
def sayhi
"Hello to my world!"
end
end
DRb.start_service('druby://localhost:9000', HelloServer.new)
puts DRb.uri, "Ctrl-Break to stop server!"
DRb.thread.join
require 'drb'
DRb.start_service()
obj = DRbObject.new(nil, 'druby://localhost:9000')
# Now use obj
5.times do
puts obj.sayhi
sleep 2
end
require 'benchmark'
COUNT = 500_000
puts Benchmark.realtime {
1.upto(COUNT) do
a = "1"
end
}
Benchmark.bm do |x|
x.report {
for i in 1..COUNT
a = "1"
end
}
end
Benchmark.bm do |x|
x.report {
for i in 1..COUNT
a = "1"
end
}
x.report {
COUNT.times do
a = "1"
end
}
x.report {
1.upto(COUNT) do
a = "1"
end
}
end
require 'webrick'
include WEBrick #
#It's a function stub to start WEBrick
def start_WEBrick(config = {})
config.update(:Port => 2000)
server = HTTPServer.new(config)
yield server if block_given?
['INT', 'TERM'].each do signal
trap(signal) { server.shutdown }
end
server.start
end
#To start WEBrick
start_WEBrick do |server|
#...see the following...
end
start_WEBrick do |server|
#document root "/"
doc_root = File.join(Dir.pwd, 'htdocs')
server.mount("/", HTTPServlet::FileHandler, doc_root,
{:FancyIndexing => true})
end
class HelloServlet < HTTPServlet::AbstractServlet
def do_GET(req, res)
res["content-type"] = "text/html; charset=UTF-8"
res.body = %{
<html>
<body>
Hello Servlet ...
</body>
</html>
}
end
alias do_POST do_GET
end
class ENVServlet < HTTPServlet::AbstractServlet
def do_GET(req, res)
res["content-type"] = "text/html; charset=UTF-8"
value = ENV[req.query['key']] if req.query['key']
res.body = %{
<html>
<body>
The server \"#{req.query['key']}\" is \"#{value}\" ...
</body>
</html>
}
end
alias do_POST do_GET
end
#
start_WEBrick do |server|
#document root "/"
doc_root = File.join(Dir.pwd, 'htdocs')
server.mount("/", HTTPServlet::FileHandler, doc_root,
{:FancyIndexing => true})
#servlet "/hello"
server.mount("/hello", HelloServlet)
#servlet "/env"
#ex. http://localhost:2000/env?key=OS
server.mount("/env", ENVServlet)
end
Ruby 最近拜 Ruby on Rails(RoR) 紅透半邊天, 其實 Ruby 還真是不錯, 純 OO 又是 script 語言. 要上手並不難, 它基本程式庫也很豐富了, 除了 unicode 支援較不完整之外. 比起 PHP, 個人蠻推薦 Ruby.
開發程式習慣整合開發環境及專案管理, 近來在 Eclipse 下發展, 搭配 subversion/subclipse 做專案管理. 接下來簡單介紹大致開發流程
1. 安裝 java/J2SE50, 下載
2. 安裝 eclipse 下載 (解壓縮到 d:\eclipse 即可)
3. 安裝 ruby & ruby on rails, 這應該是你要玩 ruby 的原因, 參照
4. 開啟 eclipse, 安裝 Ruby Developement Tool(RDT) 參照
[Help]/[Software Updates]/[Find and Install...]/
"Search for new features to install"
"New remote site" 輸入
Name: "Ruby Developement Tool - RDT",
URL: "http://updatesite.rubypeople.org/release"
5. 設定 Ruby Developement Tool(RDT) 環境
6. Enjoy it