grails web applications plug-ins grails groovy spring, hibernate,... jdk libraries JVM 2



Similar documents
2 Java 35 Java Java HTML/CSS/JavaScript Java Java JSP MySQL Java 9:00 17:30 12:00 13: 項目 日数 時間 習得目標スキル Java 2 15 Web Java Java J

Grails -Groovyベースの高生産性Webアプリフレームワーク

6 (1) app.html.eex 28 lib/nano_planner_web/templates/layout/app.html.eex 27 <footer> Oiax Inc <%= this_year() %> Oiax Inc. 29 </footer>

10 (1) s 10.2 rails c Rails 7 > item = PlanItem.new => #<PlanItem id nil, name nil,...> > item.name = "" => "" > item.valid? => true valid? true false

16 NanoPlanner name PlanItem.changeset/2 > validate_required([:name]) name :name Ecto.Changeset validate_required/3 Ecto.Changeset "validate_"

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web

l t a2 b c f g or t a2 b c f a2 b c f or l t a2 b c f g t a2 b c f g l t

: : : TSTank 2

Java演習(4) -- 変数と型 --

Local variable x y i paint public class Sample extends Applet { public void paint( Graphics gc ) { int x, y;... int i=10 ; while ( i < 100 ) {... i +=

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb

九谷ジャズファンクラブ(KJFC)公式ホームページ

java_servlet2_見本


New version (2.15.1) of Specview is now available Dismiss Windows Specview.bat set spv= Specview set jhome= JAVA (C:\Program Files\Java\jre<version>\


BC4J...4 BC4J Association JSP BC4J JSP OC4J



REALV5_A4…p_Ł\1_4A_OCF

untitled

「都市から地方への人材誘致・移住促進に関する調査」

<91498EE88CA D815B2E786C73>

〔 大 会 役 員 〕

橡本体資料+参考条文.PDF

Lecture on

1

,, create table drop table alter table

vuejs_meetup.key

コーディング基準.PDF


Cubby in Action

1,.,,,., RDBM, SQL. OSS,, SQL,,.

Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page htt


解きながら学ぶJava入門編

AuthorManual_JSTP.ppt

ACS電子ジャーナル利用マニュアル

WLX202 操作マニュアル

DICOM UG_JPN_P book

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

([ ]!) name1 name2 : [Name]! name SuperSQL,,,,,,, (@) < >@{ < > } =,,., 200,., TFE,, 1 2.,, 4, 3.,,,, Web EGG [5] SSVisual [6], Java SSedit( ss

38

RTX830 取扱説明書

新・明解Java入門

グラフ数値読み取りシステム (GSYS2.4) 利用の手引

9 rbenv rbenv ruby 9.1 rbenv rbenv rbenv ruby ruby-build ruby 9.2 rbenv macos.bash_profile ~/.bash_profile ~/.bash_profile.bak $ touch ~/.bash_profile

S2Wicketの紹介

untitled

[1]...1 [2]...1 [3] Java Web...3 [4] Java Web...18 [

. IDE JIVE[1][] Eclipse Java ( 1) Java Platform Debugger Architecture [5] 3. Eclipse GUI JIVE 3.1 Eclipse ( ) 1 JIVE Java [3] IDE c 016 Information Pr

1 1.1 (JCPRG) 30 Nuclear Reaction Data File (NRDF) PC GSYS2.4 JCPRG GSYS2.4 Java Windows, Linux, Max OS X, FreeBSD GUI PNG, GIF, JPEG X Y GSYS2

H indd

Microsoft Word - jpluginmanual.doc

Microsoft PowerPoint - Seasar2.5.ppt

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版  

1 ex01.sql ex01.sql ; user_id from (select user_id ;) user_id * select select (3+4)*7, SIN(PI()/2) ; (1) select < > from < > ; :, * user_id user_name


Javaで体験するスクリプト言語の威力

3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200,

Oracle Web Conferencing Oracle Collaboration Suite 2 (9.0.4) Creation Date: May 14, 2003 Last Update: Jan 21, 2005 Version: 1.21

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版   None

CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Ch


13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir

Web 1 p.2 1 Servlet Servlet Web Web Web Apache Web Servlet JSP Web Apache Tomcat Jetty Apache Tomcat, Jetty Java JDK, Eclipse

日本オラクル株式会社

Wiki

Java Platform Debugger Architecture Apache JServ Oracle JVM JPDA JVM Tomcat Oracle JVM... 7

Transcription:

colloquial model-driven development (nichijou kaiwa teki moderu kudou kaihatsu) masaki@metabolics.co.jp 2007.06.27 1

grails web applications plug-ins grails groovy spring, hibernate,... jdk libraries JVM 2

groovy JVM Java 3

Java ( ) Java groovy groovy Java groovy Java implement/extend 4

';', imports, return,... GString, collections, ranges switch-case,... (class ) 5

GroovyBeans expando 6

grails http://grails.org/, Eclipse 0.5.6 10 1.0 7

grails % grails create-app % grails create-domain-class JUnit % grails create-controller scaffolding JUnit & Canoo / JUnit & Canoo 8

grails % grails bootstrap % grails bug-report % grails clean % grails compile % grails console % grails create-app % grails create-controller % grails create-domain-class % grails create-job % grails create-plugin % grails create-script % grails create-service % grails create-tag-lib % grails create-test-suite % grails create-webtest % grails generate-all % grails generate-controller % grails generate-views % grails generate-webtest % grails get-dependencies % grails help % grails init % grails install-dojo % grails install-ivy % grails install-plugin % grails install-templates % grails package % grails package-plugin % grails package-plugins % grails run-app % grails run-webtest % grails set-version % grails shell % grails stats % grails test-app % grails upgrade % grails war 9

grails o/r map GORM hibernate quartz xfire model sitemesh ajax... create, refer, update, delete fetch http req controller render view w/ taglibs GSP spring junit canoo wicket 10

% grails create-domain-class book GroovyBean RDB GORM (= groovy Hibernate, RDB ) 11

static belongsto = [ Class,... ] static hasmany = [ property:class,... ] addtoprop(bar) static mappedby = [ property:"property",... ] static embedded = [ "property",... ] 12

static constraints = { property(key:value,...)... } validator:{... } //! 13

blank creditcard email inlist length matches max maxlength maxsize min minlength minsize notequal nullable range scale size unique url validator 14

CRUD new Book(title:'book of tea',...).save() def b = Book.get(1) b.author = 'Okakura Tenshin'; b.save() b.delete() 15

Book.exist(1) Book.count() Book.list() max:, offset:, sort:, order: Book.listOrderByDateCreated() 16

groovy 17

Book.find('HQL query') Book.findAll('HQL query') Book.findByAuthorAndDateCreatedBetween('Jon Doe', new Date()-30, new Date()) 'And' 'Or' 'find' 'findall' Between, GreaterThan, GreaterThanOrEqual, IsNull, IsNotNull, LessThan, LessThanOrEuqal, Like, NotEqual 'Equal' 18

def c = Book.createCriteria() def results = c.list { like('title', 'Grails%') between('datecreated', new Date()-10, new Date ()) } Hibnernate Qeury 19

% grails create-controller book Book BookController http request/post/get def index = {... } // http://example.com/app/book/index/params 20

CRUD / def scaffold = Book list, show, delete, edit, update, save <grails-0.5>/src/grails/templates/scaffolding/controller.groovy - *Controller.groovy - / 21

redirect(action:list, params:params), / ( <app>/grails-app/views/ book/show.gsp), render "..." 22

23

grails GSP(groovy JSP) <%... %> "${...}" <g:...></g:...>.gsp <grails-0.5>/src/grails/templates/scaffolding/*.gsp GSP ( wicket ) 24

gsp Logical Tags * if * else * elseif Iterative Tags * while * each * collect * findall * grep Assignment Tags * def * set Linking Tags * link * createlink * createlinkto Ajax Tags * remotefield * remotefunction * remotelink * formremote * submittoremote Form Tags * actionsubmit * actionsubmitimage * checkbox * currencyselect * form * hiddenfield * datepicker * select * localeselect * textfield * textarea * timezoneselect UI Tags * richtexteditor Rendering & Layout Tags * render * rendererrors * layouthead * layoutbody * layouttitle * pageproperty * paginate * sortablecolumn (Since 0.5) Validation Tags * eacherror * haserrors * message 25

% grails create-tag-lib foo <app>/grails-app/taglib/footaglib.groovy def isadmin = { attrs, body ->... } <g:isadmin> body </g:isadmin> 26

grails grails Spring, Hibernate, JSP, JUnit, Canoo, Mesh, Quartz, XFire, Acegi Security,...,, 27

% grails create-plugin grails grails grails wicket plugin 28

<plugin>/scripts/_{install,upgrade}.groovy <plugin>/grails-app/{controllers,...} <plugin>/foograilsplugin.groovy def version = 0.1 def name = "foo" def dependson = [ bar:1.0 ] def dowithspring = {... } def dowithwebdescriptor = {... } def dowithapplicationcontext = {... } def dowithdynamicmethods = {... } def artefacts = [ FooArtefactHander,... ]... 29

org.codehaus.groovy.grails.plugins GrailsPlugin (interface) extends ApplicationContextAware (Spring) AbstractGrailsPlugin (abstract class) extends GroovyObjectSupport (groovy) DefaultGrailsPlugin (concrete class) : groovy Java 30

FooPlugin plugin 31

grails grails groovy MOP grails taglib... groovy DSL 32

MDD grails grails MDD ( ) 33

MDD MDD EMF, OMG MDA, xuml grails 34

: : web taglib: :,... 35

MDD,???... 36

grails c-mdd grails/c-mdd ( ) grails/c-mdd ( ) 37