Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 67 lines (42 sloc) 2.155 kb
a159bd6 Morten Kjetland updated readme
authored
1 Faster-Groovy-Templates module for Play! Framework 1.2.x
2 =====================
b9a4bf3 Morten Kjetland initial version of working module - works with play/samples-and-tests/ju...
authored
3
a159bd6 Morten Kjetland updated readme
authored
4 This is a module for Play! Framework 1 applications which replaces the default groovy template implementation with gt-engine (http://kjetland.com/blog/2011/11/playframework-new-faster-groovy-template-engine/) which is faster and uses less memory.
b9a4bf3 Morten Kjetland initial version of working module - works with play/samples-and-tests/ju...
authored
5
a159bd6 Morten Kjetland updated readme
authored
6 How to use it?
7 ============
b9a4bf3 Morten Kjetland initial version of working module - works with play/samples-and-tests/ju...
authored
8
4c9ac98 Morten Kjetland fixed typo
authored
9 One way of including the module is by using the dependencies.yml file. Remember to call "play dependencies" before "play run" the first time.
1555c35 Morten Kjetland updated readme with usage info
authored
10
11 Download it from github (or git clone it), then add dependency to it like this:
12
13 require:
14 - play
15 - faster-groovy-templates -> faster-groovy-templates
16
17 repositories:
18 - My modules:
19 type: local
20 artifact: ${application.path}/relativePathToWhereYouDownloadedIt/[module]
21 contains:
22 - faster-groovy-templates
23
24 Or you can add it do the application.conf file like this:
25
26 module.faster-groovy-templates=../relativePathToWhereYouDownloadedIt/
27
28
a159bd6 Morten Kjetland updated readme
authored
29 Features
30 ==========
31 * Almost 100% compatible with old Play Groovy template implementation (See note below for more info)
6d18717 Morten Kjetland fixed readme
authored
32 * Run faster
a159bd6 Morten Kjetland updated readme
authored
33 * Compiles faster
34 * Can write generated source to disk so you can step-debug it
35 * Uses less memory
36 * Supports old FastTag
6d18717 Morten Kjetland fixed readme
authored
37 * Supports new GTFastTag which is optimized for inserting rendered tag-body-content (without copying)
a159bd6 Morten Kjetland updated readme
authored
38
39 Do I have to modify my templates?
40 ==========
41
42 If you use program-flow-fragments inside groovy code snipits you have to modify it like this:
43
44 You can no longer use partial-program-flow-code like this:
45
6d18717 Morten Kjetland fixed readme
authored
46 %{ if( expression) { }%
47 or
48
49 %{ myList.foreach() { }%
a159bd6 Morten Kjetland updated readme
authored
50
51 Instead you have to use:
52
6d18717 Morten Kjetland fixed readme
authored
53 #{if expression}
54
55 or
56
57 #{list myList}
a159bd6 Morten Kjetland updated readme
authored
58
92cd4ef Morten Kjetland Fixes #7 - The module-load-order is now irrelevant
authored
59 ----------------
a159bd6 Morten Kjetland updated readme
authored
60
6d18717 Morten Kjetland fixed readme
authored
61 If you find issues, please report them here: https://github.com/mbknor/faster-groovy-templates/issues
b9a4bf3 Morten Kjetland initial version of working module - works with play/samples-and-tests/ju...
authored
62
92cd4ef Morten Kjetland Fixes #7 - The module-load-order is now irrelevant
authored
63 ---------------
64
65 Note if you also use the CRUD-module: The original CRUD template files uses a lot of partial-groovy-code-snipits. Since this is not supported in gt-engine, faster-groovy-templates includes its own version of these template files - with fixed syntax. You don't have to do anything special. These files are used automatically.
b9a4bf3 Morten Kjetland initial version of working module - works with play/samples-and-tests/ju...
authored
66
Something went wrong with that request. Please try again.