introduce rails and rubymine

23
身身身身身身身 Calvin Huang Email: [email protected] Website: http://calvinpeak.net

Upload: -

Post on 19-Jan-2015

363 views

Category:

Technology


4 download

DESCRIPTION

Prepare for Tamkang university course.

TRANSCRIPT

Page 1: Introduce rails and rubymine

身形優美的框架Calvin Huang

Email: [email protected]: http://calvinpeak.net

Page 2: Introduce rails and rubymine

Who am I

•Was RD assistant at Hiiir

•Program for Tamkang-IM

•Tamkang Information camp lecturer

Page 3: Introduce rails and rubymine

Why Rails

Page 4: Introduce rails and rubymine
Page 5: Introduce rails and rubymine

什麼是 Ruby?

•Ruby是腳本語言 (Script Language)

•Ruby動態類型 (Dynamic Typing)

•Ruby純物件導向 (Orient Object)

Page 6: Introduce rails and rubymine

萬物皆物件•'this is a string'.methods

Page 7: Introduce rails and rubymine

Ruby and Java

•一樣都是強型態,但是 Ruby不用先宣告變數,需要檢查物件方法 (duck typing)

•一樣都有垃圾回收•Ruby沒有 interface 、 abstract,不能

像 Java強制規定繼承後的動作 ( 倒是可以用小技巧達成 )

•Ruby 是 require , Java 是 import

Page 8: Introduce rails and rubymine

Ruby and Java

•Ruby不需要 compile , Java則要 ( 延伸則為 Ruby 較 Java執行上慢很多 )

•Ruby所有物件都可以在動態編譯時更動,所以很容易被玩壞

Page 9: Introduce rails and rubymine

Ruby and PHP

•Ruby原生就是純物件導向, PHP則是在 5.2加入 class功能

•一樣都是動態賦予型態,但 Ruby是強型態, PHP則是弱型態

•Ruby 比 PHP慢

Page 10: Introduce rails and rubymine

Ruby on Rails

•Ruby 的 Framework,此框架致力于讓開發保持簡單,用最少的配置與程式碼減少開發時間。

•Rails嚴謹的以MVC的架構來組成

•Rails1.2後的版本傾向以 RESTful來實作網頁,其中提供了 javascript協助開發

Page 11: Introduce rails and rubymine

Pretty Rails!!!!!•Ruby有更簡單易懂的語法

•gem提供了很多可以不用自己動手做功能就可以直接用的插件

•自帶 ActiveRecord , ORM操作不用寫 SQL

•無痛製作 RESTful網頁外加 API

•RSpec讓你不用害怕寫測試

•第一次接觸也可以瞬間變出 CRUD程式

Page 12: Introduce rails and rubymine

無痛製作 RESTful網頁外加 API

•輕鬆輸出 json格式 API

•簡單定義,取得 GET, PUT, UPDATE, DELETE狀態

Page 13: Introduce rails and rubymine

第一次接觸也可以瞬間變出 CRUD程式

Page 14: Introduce rails and rubymine

Start Rails

Page 15: Introduce rails and rubymine

What is RubyMine

•Ruby 的 IDE,支援 Rails的各種操作而且速度快

Page 16: Introduce rails and rubymine

不用記冗長指令

Page 17: Introduce rails and rubymine

自動檢查 gem

Page 18: Introduce rails and rubymine

想的到的他都有

Page 19: Introduce rails and rubymine

RubyMine License

•基本上功能都一樣,主要差在費用部分

Page 20: Introduce rails and rubymine

However...

•雖然功能強大但是排版似乎有點不聽話

Page 21: Introduce rails and rubymine

Others IDE

•Aptana Studio,特化版的 Eclispe

•Netbean

•Sublime text

•Komodo IDE

•Redcar alpha

Page 22: Introduce rails and rubymine

•雖說好的工具能幫助完成任務•但是初心者還是別太依賴 IDE的便捷!

•END

Page 23: Introduce rails and rubymine

參考資料

•http://ihower.tw/rails3/index.html

•http://zh.wikipedia.org/wiki/Ruby

•http://zh.wikipedia.org/wiki/Java

•http://www.jetbrains.com/ruby/

•Images form google search