Pilika

1,587 views

Published on

Template Engine Pilika

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,587
On SlideShare
0
From Embeds
0
Number of Embeds
228
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide





























  • Pilika

    1. 1. Pilika Java
    2. 2. Pilika ‣ XHTML ‣ 2009 1 ‣ Java ‣
    3. 3. ‣ ‣ View ‣
    4. 4. ‣ ‣ View ‣
    5. 5. ‣ XHTML ‣ ‣
    6. 6. XHTML ‣ → Dreamweaver → ‣
    7. 7. ‣ View α ‣
    8. 8. ‣ → ‣
    9. 9. Example - <p> <span plk:content=” user_name”>XX</span> </p>
    10. 10. Example - <p> <span plk:content=” user_name”>XX</span> </p> {‘user_name’ => ‘Duke’ }
    11. 11. Example - <p> <span plk:content=” user_name”>XX</span> </p> {‘user_name’ => ‘Duke’ } <p> <span>Duke</span> </p>
    12. 12. Example - <p> ${user_name}</p>
    13. 13. Example - <p> ${user_name}</p> {‘user_name’ => ‘Duke’ }
    14. 14. Example - <p> ${user_name}</p> {‘user_name’ => ‘Duke’ } <p> Duke</p>
    15. 15. Example - <p plk:if=quot;is_loginquot; > </p>
    16. 16. Example - <p plk:if=quot;is_loginquot; > </p> {‘is_login’ => true }
    17. 17. Example - <p plk:if=quot;is_loginquot; > </p> {‘is_login’ => true } <p> </p>
    18. 18. Example - <p plk:if=quot;is_loginquot; > </p> {‘is_login’ => true } <p> </p> <p plk:if.not=quot;is_loginquot; > </p>
    19. 19. Example - <ul> <li plk:for=quot;item in itemsquot;>${item}</li> </ul>
    20. 20. Example - <ul> <li plk:for=quot;item in itemsquot;>${item}</li> </ul> items = [‘Apple’,‘Orange’,‘Pine’] {‘items’ => items }
    21. 21. Example - <ul> <li plk:for=quot;item in itemsquot;>${item}</li> </ul> items = [‘Apple’,‘Orange’,‘Pine’] {‘items’ => items } <ul> <li>Apple</li> <li>Orange</li> <li>Pine</li> </ul>
    22. 22. ‣ ‣ View ‣
    23. 23. View ‣ ‣ Controller/Model ‣ JRuby on Rails
    24. 24. JRuby ‣ Java VM Ruby ‣ Ruby on Rails ‣ Ruby Java
    25. 25. JRuby on Rails ‣ ‣ Glassfish V3 War ‣ View
    26. 26. JRuby on Rails ‣ ‣ Glassfish V3 War ‣ View Pilika
    27. 27. JRuby on Rails Controller/Model View Rails Pilika Java JRuby JRE
    28. 28. ‣ ‣ View ‣
    29. 29. ‣ View ‣ JSR223
    30. 30. JSR 223 Scripting for Java Platform ‣ Java → https://scripting.dev.java.net/ ‣ Ruby, Python, Groovy, Java Script… ScriptEngineManager mng = new ScriptEngineManager(); ScriptEngine engine = mng.getEngineByName(quot;rubyquot;); engine.eval(quot;puts ‘Hello, JRuby!’quot;);
    31. 31. <div plk:content=quot;item.namequot; plk:attr.class=quot;item_class(item)quot; > </div> <plk:def type=quot;functionquot; language=quot;rubyquot; name=quot;item_class(item)quot; > <![CDATA[ def item_class(item) return 'new_item' if BASE_TIME < item.entry_at '' end ]]> </plk:def>
    32. 32. <div plk:content=quot;item.namequot; plk:attr.class=quot;item_class(item)quot; > </div> <plk:def type=quot;functionquot; language=quot;rubyquot; name=quot;item_class(item)quot; > <![CDATA[ def item_class(item) return 'new_item' if BASE_TIME < item.entry_at '' Ruby end ]]> </plk:def>
    33. 33. ‣ ‣ Java Rails ‣ ‣ http://www.deathmarch.jp/pilika/

    ×