我在前面的文章有提過,Grails 3.0 在去年就已經推出了。但那時沒有任何一家 IDE 開發環境可支援。

所以當時我是不推薦大家使用。

而在今年年初,IntelliJ-IDEA 15 推出之後,已經明確支援 Grails 3.0。所以,大家可以試試看了。

但是,還有很多 plugins 還沒移到 Grails 3.0。所以,如果你有在使用的 plugins還沒支援到 Grails 3.0的話,還需要停留在 Grails 2.5

我大部分的案例,還是會以 Grails 2.5 為主。

grails 發表在 痞客邦 留言(0) 人氣()

lesson3-new_domain_class.png

先前我提過,Grails 底層其實是 Spring framework + Hibernate。
我相信很多人都用過 Hibernate,他為我們在開發應用系統時,省下不少時間。
同樣的功能,在 Grails 有個專有名詞,叫做 GORM (Grails Object Relational Mapping)。Grails 把 Hibernate 及相關的 annotations 無縫接軌到 Grails中。

grails 發表在 痞客邦 留言(0) 人氣()

Welcome to IntelliJ IDEA_001.jpg
今天我們來介紹第一個 Grails 專案。我使用 IntelliJ Ultima 進行展示:

 
進入 IntelliJ後,選擇 Create New Project,畫面跳轉如下:

如果你的 Grails Libarary (右上方)是空的,你得先點擊「Create」去選擇 Grails 的目錄,我假設你的 Grails 是安裝在 C:\grails-2.5.1。另外,也別忘記選擇你的 Java SDK 目錄。然後繼續按下 「Next」,畫面跳轉如下:

grails 發表在 痞客邦 留言(0) 人氣()

install_grails_001.jpg

今天要來講開發環境的安裝,包括了 Grails 與 IntelliJ

Grails

  1. 先安裝 JDK 1.7 或 JDK 1.8

grails 發表在 痞客邦 留言(0) 人氣()

Grails 是什麼? 照樣我們先看看官網是如何介紹 Grails的

Grails is a powerful web framework, for the Java platform aimed at multiplying developers’ productivity thanks to a Convention-over-Configuration, sensible defaults and opinionated APIs. It integrates smoothly with the JVM, allowing you to be immediately productive whilst providing powerful features, including integrated ORM, Domain-Specific Languages, runtime and compile-time meta-programming and Asynchronous programming.
雖然不太好翻譯,但為了不喜歡讀長篇英文的人,我還是嘗試翻譯:

grails 發表在 痞客邦 留言(0) 人氣()

如果你是 Java 使用者,你是否曾經 覺得空虛覺得寂莫、覺得冷,  羨慕 Python, Ruby, Ruby on Rails 那種簡潔有力的語法呢?
曾經,我想要遠離我熟悉的 Java,跳到 Python, Ruby 的世界,去擁抱那我期待很久的程式系統。

grails 發表在 痞客邦 留言(0) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。