Pilika
   Java
Pilika

‣ XHTML
‣ 2009 1
‣ Java
‣
‣
‣   View

‣
‣
‣   View

‣
‣ XHTML
‣
‣
XHTML

‣
    → Dreamweaver
    →

‣
‣ View
         α



‣
‣
    →

‣
Example -
<p>
  <span plk:content=” user_name”>XX</span>
</p>
Example -
<p>
  <span plk:content=” user_name”>XX</span>
</p>
                   {‘user_name’ => ‘Duke’ }
Example -
<p>
  <span plk:content=” user_name”>XX</span>
</p>
                   {‘user_name’ => ‘Duke’ }

<p>
  <span>Duk...
Example -
<p>      ${user_name}</p>
Example -
<p>      ${user_name}</p>

                 {‘user_name’ => ‘Duke’ }
Example -
<p>      ${user_name}</p>

                 {‘user_name’ => ‘Duke’ }

<p>      Duke</p>
Example -
<p plk:if=quot;is_loginquot; >   </p>
Example -
<p plk:if=quot;is_loginquot; >            </p>

                  {‘is_login’ => true }
Example -
<p plk:if=quot;is_loginquot; >            </p>

                  {‘is_login’ => true }
<p>             </p>
Example -
<p plk:if=quot;is_loginquot; >              </p>

                   {‘is_login’ => true }
<p>             </p>
...
Example -
<ul>
 <li plk:for=quot;item in itemsquot;>${item}</li>
</ul>
Example -
<ul>
 <li plk:for=quot;item in itemsquot;>${item}</li>
</ul>
                   items = [‘Apple’,‘Orange’,‘Pine’...
Example -
<ul>
 <li plk:for=quot;item in itemsquot;>${item}</li>
</ul>
                   items = [‘Apple’,‘Orange’,‘Pine’...
‣
‣   View

‣
View

‣
‣ Controller/Model
‣ JRuby on Rails
JRuby

‣ Java VM         Ruby

‣ Ruby on Rails
‣ Ruby Java
JRuby on Rails
‣
‣ Glassfish V3   War

‣ View
JRuby on Rails
‣
‣ Glassfish V3   War

‣ View
       Pilika
JRuby on Rails
Controller/Model    View
    Rails          Pilika


      Java
   JRuby            JRE
‣
‣   View

‣
‣     View




‣ JSR223
JSR 223
Scripting for Java Platform
‣ Java
   → https://scripting.dev.java.net/

‣ Ruby, Python, Groovy, Java Script…
Scri...
<div plk:content=quot;item.namequot;
      plk:attr.class=quot;item_class(item)quot; >
            </div>
  <plk:def type=...
<div plk:content=quot;item.namequot;
      plk:attr.class=quot;item_class(item)quot; >
            </div>
  <plk:def type=...
‣
‣ Java                             Rails

‣
‣ http://www.deathmarch.jp/pilika/
Pilika
Pilika
Upcoming SlideShare
Loading in...5
×

Pilika

1,266

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,266
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
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/
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×