SlideShare a Scribd company logo
1 of 19
Download to read offline
“THE COST OF LEARNING”
advantage of mixer2.org
@nabedge
DBFlute Fes at Shibuya, Tokyo
2015-11-21
http://connpass.com/event/21885/
Who?
● Yu Watanabe
● Java Engineer
● Bizreach.inc
● Project Mixer2
http://mixer2.org
2
What is mixer2 ?
3
Template = 100% pure HTML & CSS
View = Plain Java
Hello <span id=”name”>foo bar</span>
Span span = html.getById(“name”, Span.class);
span.replaceInner(“World !”);
// You get
// Hello <span id=”name”>World !</span>
The cost of learning
4
5
Productivity
▷ Type safe
▷ Automatic
code
generation
▷ Testability
▷ Convention
over
Configuration
▷ Framework
▷ The cost of learning
Learning Curve
6
How to reduce
cost to learn ?
7
8
★ No learn
★ Use that you
already know
9
What do you know ?
▷ Java
▷ HTML/CSS
▷ Eclipse or IntelliJ
▷ JSP + Custum tag
▷ VTL (Velocity Template Language)
▷ FTL (Freemarker Template
Language)
▷ Thymeleaf property + OGNL
Thymeleaf attributes
and utility objects
#ctx
#vars
#locale
#dates
#calendars
#numbers
#strings
#bools
#arrays
#lists
10
#sets
#maps
#aggregates
#messages
#ids
…
…
…
th:if
th:unless
th:text
th:class
th:attr
th:include
th:replace
th:each
th:switch
th:remove
customization
11
1.1. Scenario 1: adding features to the Standard dialects
Say your application uses the SpringStandard dialect and that it needs to show an alert text
box in blue or red background depending on the user’s role (admin or non-admin) from
Monday to Saturday, but always in green on Sundays. You can compute this with conditional
expressions on your template, but too many conditions could render your code a little bit hard
to read…
Solution: create a new attribute called alertclass and an attribute processor for it (Java code
that will compute the right CSS class), and package it into your own MyOwnDialect dialect.
Add this dialect to your template engine with the th prefix (same as the SpringStandardone)
and you’ll now be able to use th:alertclass="${user.role}"!
http://www.thymeleaf.org/doc/tutorials/2.1/extendingthymeleaf.html
Scinario1
12
admin non-admin
Monday to
Saturday
blue red
Sunday green green
<input type=”text” class=”COLOR” />
solution with thymeleaf
13
<input type=”text” th:alterclass=”${user.role}”
public interface IDialect {
public String getPrefix();
public Set<IProcessor> getProcessors();
public Map<String,Object> getExecutionAttributes();
public Set<IDocTypeTranslation> getDocTypeTranslations();
public Set<IDocTypeResolutionEntry> getDocTypeResolutionEntries();
}
lastaflute-mixer2 view class
14
1 public class SigninView extends OrleansBaseView {
2 private final ColorService colorService;
3 ...
4 protected void render(Html html, Mixer2Supporter supporter) {
5 Body body = html.getBody();
6 supporter
7 .findById(body, "account", Input.class)
8 .alwaysPresent(input -> {
9 input.setValue(form.account);
10 input.addCssClass(colorService.choice());
11 });
https://github.com/lastaflute/lastaflute-example-maihama/blob/master/maihama-
orleans/src/main/java/org/docksidestage/app/web/signin/SigninView.java
15
To use Mixer2, You need
▷ Java
▷ HTML/CSS
▷ Eclipse or IntelliJ
▷ JSP + Custum tag
▷ VTL (Velocity Template Language)
▷ FTL (Freemarker Template
Language)
▷ Thymeleaf property + OGNL
What is your GOAL ?
16
A. Learn technology
B. Write code
C. Launch product
““Done is better
than perfect .”
17
Done with ease
by Mixer2
18
Thanks !
19

More Related Content

What's hot

Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologieselliando dias
 
ITT 2015 - Simon Stewart - Building Android Apps at Speed and Scale
ITT 2015 - Simon Stewart - Building Android Apps at Speed and ScaleITT 2015 - Simon Stewart - Building Android Apps at Speed and Scale
ITT 2015 - Simon Stewart - Building Android Apps at Speed and ScaleIstanbul Tech Talks
 
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten ZiegelerMonitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten Ziegelermfrancis
 
Terraform, Ansible or pure CloudFormation
Terraform, Ansible or pure CloudFormationTerraform, Ansible or pure CloudFormation
Terraform, Ansible or pure CloudFormationgeekQ
 
Terraform, Ansible, or pure CloudFormation?
Terraform, Ansible, or pure CloudFormation?Terraform, Ansible, or pure CloudFormation?
Terraform, Ansible, or pure CloudFormation?geekQ
 
Nashorn: nova engine Javascript do Java SE 8
Nashorn: nova engine Javascript do Java SE 8Nashorn: nova engine Javascript do Java SE 8
Nashorn: nova engine Javascript do Java SE 8Bruno Borges
 
Vancouver presentation
Vancouver presentationVancouver presentation
Vancouver presentationColleen_Murphy
 
SWORD & ResourceSync - Stuart Lewis
SWORD & ResourceSync - Stuart Lewis SWORD & ResourceSync - Stuart Lewis
SWORD & ResourceSync - Stuart Lewis Repository Fringe
 
Sharding with spider solutions 20160721
Sharding with spider solutions 20160721Sharding with spider solutions 20160721
Sharding with spider solutions 20160721Kentoku
 
Kharkiv drupal tech talks #2
Kharkiv drupal tech talks #2Kharkiv drupal tech talks #2
Kharkiv drupal tech talks #2Dmytro Olaresko
 
HDP Search Overview (APACHE SOLR & HADOOP)
HDP Search Overview (APACHE SOLR & HADOOP)HDP Search Overview (APACHE SOLR & HADOOP)
HDP Search Overview (APACHE SOLR & HADOOP)Chris Casano
 
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik at TechTalks.ph - Intro to Groovy and GrailsPhilip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik at TechTalks.ph - Intro to Groovy and GrailsPhilip Stehlik
 
Deep Dive Spider Engine
Deep Dive Spider EngineDeep Dive Spider Engine
Deep Dive Spider EngineI Goo Lee
 
Apache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemApache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemDuyhai Doan
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariJoseph Scott
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Mandakini Kumari
 
MySQL Guide for Beginners
MySQL Guide for BeginnersMySQL Guide for Beginners
MySQL Guide for BeginnersDainis Graveris
 

What's hot (20)

htaccess
htaccesshtaccess
htaccess
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologies
 
ITT 2015 - Simon Stewart - Building Android Apps at Speed and Scale
ITT 2015 - Simon Stewart - Building Android Apps at Speed and ScaleITT 2015 - Simon Stewart - Building Android Apps at Speed and Scale
ITT 2015 - Simon Stewart - Building Android Apps at Speed and Scale
 
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten ZiegelerMonitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
 
harry presentation
harry presentationharry presentation
harry presentation
 
Terraform, Ansible or pure CloudFormation
Terraform, Ansible or pure CloudFormationTerraform, Ansible or pure CloudFormation
Terraform, Ansible or pure CloudFormation
 
Terraform, Ansible, or pure CloudFormation?
Terraform, Ansible, or pure CloudFormation?Terraform, Ansible, or pure CloudFormation?
Terraform, Ansible, or pure CloudFormation?
 
Nashorn: nova engine Javascript do Java SE 8
Nashorn: nova engine Javascript do Java SE 8Nashorn: nova engine Javascript do Java SE 8
Nashorn: nova engine Javascript do Java SE 8
 
Vancouver presentation
Vancouver presentationVancouver presentation
Vancouver presentation
 
SWORD & ResourceSync - Stuart Lewis
SWORD & ResourceSync - Stuart Lewis SWORD & ResourceSync - Stuart Lewis
SWORD & ResourceSync - Stuart Lewis
 
Sharding with spider solutions 20160721
Sharding with spider solutions 20160721Sharding with spider solutions 20160721
Sharding with spider solutions 20160721
 
Kharkiv drupal tech talks #2
Kharkiv drupal tech talks #2Kharkiv drupal tech talks #2
Kharkiv drupal tech talks #2
 
HDP Search Overview (APACHE SOLR & HADOOP)
HDP Search Overview (APACHE SOLR & HADOOP)HDP Search Overview (APACHE SOLR & HADOOP)
HDP Search Overview (APACHE SOLR & HADOOP)
 
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik at TechTalks.ph - Intro to Groovy and GrailsPhilip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
 
Deep Dive Spider Engine
Deep Dive Spider EngineDeep Dive Spider Engine
Deep Dive Spider Engine
 
Apache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemApache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystem
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
REST in pieces
REST in piecesREST in pieces
REST in pieces
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
MySQL Guide for Beginners
MySQL Guide for BeginnersMySQL Guide for Beginners
MySQL Guide for Beginners
 

Viewers also liked

20130511 jjug ccc講演 さらばjsp JAXBとmixer2
20130511 jjug ccc講演 さらばjsp JAXBとmixer220130511 jjug ccc講演 さらばjsp JAXBとmixer2
20130511 jjug ccc講演 さらばjsp JAXBとmixer2Y Watanabe
 
Mixer2によるdynamic css sprite 201309第三回渋谷java
Mixer2によるdynamic css sprite 201309第三回渋谷javaMixer2によるdynamic css sprite 201309第三回渋谷java
Mixer2によるdynamic css sprite 201309第三回渋谷javaY Watanabe
 
Mixer2 で作るカスタムテンプレートエンジン #渋谷java
Mixer2 で作るカスタムテンプレートエンジン #渋谷javaMixer2 で作るカスタムテンプレートエンジン #渋谷java
Mixer2 で作るカスタムテンプレートエンジン #渋谷javaJun Futagawa
 
201311 webデザイナとエンジニアのチームワークを加速させるテンプレートエンジンmixer2 devlove現場甲子園
201311 webデザイナとエンジニアのチームワークを加速させるテンプレートエンジンmixer2 devlove現場甲子園201311 webデザイナとエンジニアのチームワークを加速させるテンプレートエンジンmixer2 devlove現場甲子園
201311 webデザイナとエンジニアのチームワークを加速させるテンプレートエンジンmixer2 devlove現場甲子園Y Watanabe
 
2013-09 テンプレートエンジンMixer2紹介 HTML5J&JJUG合同勉強会LT
2013-09 テンプレートエンジンMixer2紹介 HTML5J&JJUG合同勉強会LT2013-09 テンプレートエンジンMixer2紹介 HTML5J&JJUG合同勉強会LT
2013-09 テンプレートエンジンMixer2紹介 HTML5J&JJUG合同勉強会LTY Watanabe
 
SpringMVCとmixer2で作るWebアプリのキホン 2013-01-24 Spring勉強会 #jsug
SpringMVCとmixer2で作るWebアプリのキホン 2013-01-24 Spring勉強会 #jsugSpringMVCとmixer2で作るWebアプリのキホン 2013-01-24 Spring勉強会 #jsug
SpringMVCとmixer2で作るWebアプリのキホン 2013-01-24 Spring勉強会 #jsugY Watanabe
 
日本語によるJUnitの拡張について
日本語によるJUnitの拡張について日本語によるJUnitの拡張について
日本語によるJUnitの拡張についてKazuro Fukuhara
 
俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略
俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略
俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略Y Watanabe
 
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界Y Watanabe
 
渋谷java−あなたのプロジェクトで気軽にjavaをバージョンアップするために必要なこと
渋谷java−あなたのプロジェクトで気軽にjavaをバージョンアップするために必要なこと渋谷java−あなたのプロジェクトで気軽にjavaをバージョンアップするために必要なこと
渋谷java−あなたのプロジェクトで気軽にjavaをバージョンアップするために必要なことY Watanabe
 
Java Puzzlers JJUG CCC 2016
Java Puzzlers JJUG CCC 2016Java Puzzlers JJUG CCC 2016
Java Puzzlers JJUG CCC 2016Yoshio Terada
 
テンプレートエンジンにMixer2を使うとSeleniumでのテストもラクになるかもねという話
テンプレートエンジンにMixer2を使うとSeleniumでのテストもラクになるかもねという話テンプレートエンジンにMixer2を使うとSeleniumでのテストもラクになるかもねという話
テンプレートエンジンにMixer2を使うとSeleniumでのテストもラクになるかもねという話Y Watanabe
 
properties, yaml, and me
properties, yaml, and meproperties, yaml, and me
properties, yaml, and meY Watanabe
 
Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料
Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料
Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料Y Watanabe
 
テストゼロからイチに進むための戦略と戦術
テストゼロからイチに進むための戦略と戦術テストゼロからイチに進むための戦略と戦術
テストゼロからイチに進むための戦略と戦術Y Watanabe
 
Seleniumと相性がいいテンプレートエンジンMixer2-第1回selenium勉強会ライトニングトーク
Seleniumと相性がいいテンプレートエンジンMixer2-第1回selenium勉強会ライトニングトークSeleniumと相性がいいテンプレートエンジンMixer2-第1回selenium勉強会ライトニングトーク
Seleniumと相性がいいテンプレートエンジンMixer2-第1回selenium勉強会ライトニングトークY Watanabe
 
Java8移行から始めた技術的負債との戦い(jjug ccc 2015 fall)
Java8移行から始めた技術的負債との戦い(jjug ccc 2015 fall)Java8移行から始めた技術的負債との戦い(jjug ccc 2015 fall)
Java8移行から始めた技術的負債との戦い(jjug ccc 2015 fall)sogdice
 
20140405 mavenセントラルリポジトリへの登録のコツ 第5回渋谷java
20140405 mavenセントラルリポジトリへの登録のコツ 第5回渋谷java20140405 mavenセントラルリポジトリへの登録のコツ 第5回渋谷java
20140405 mavenセントラルリポジトリへの登録のコツ 第5回渋谷javaY Watanabe
 

Viewers also liked (18)

20130511 jjug ccc講演 さらばjsp JAXBとmixer2
20130511 jjug ccc講演 さらばjsp JAXBとmixer220130511 jjug ccc講演 さらばjsp JAXBとmixer2
20130511 jjug ccc講演 さらばjsp JAXBとmixer2
 
Mixer2によるdynamic css sprite 201309第三回渋谷java
Mixer2によるdynamic css sprite 201309第三回渋谷javaMixer2によるdynamic css sprite 201309第三回渋谷java
Mixer2によるdynamic css sprite 201309第三回渋谷java
 
Mixer2 で作るカスタムテンプレートエンジン #渋谷java
Mixer2 で作るカスタムテンプレートエンジン #渋谷javaMixer2 で作るカスタムテンプレートエンジン #渋谷java
Mixer2 で作るカスタムテンプレートエンジン #渋谷java
 
201311 webデザイナとエンジニアのチームワークを加速させるテンプレートエンジンmixer2 devlove現場甲子園
201311 webデザイナとエンジニアのチームワークを加速させるテンプレートエンジンmixer2 devlove現場甲子園201311 webデザイナとエンジニアのチームワークを加速させるテンプレートエンジンmixer2 devlove現場甲子園
201311 webデザイナとエンジニアのチームワークを加速させるテンプレートエンジンmixer2 devlove現場甲子園
 
2013-09 テンプレートエンジンMixer2紹介 HTML5J&JJUG合同勉強会LT
2013-09 テンプレートエンジンMixer2紹介 HTML5J&JJUG合同勉強会LT2013-09 テンプレートエンジンMixer2紹介 HTML5J&JJUG合同勉強会LT
2013-09 テンプレートエンジンMixer2紹介 HTML5J&JJUG合同勉強会LT
 
SpringMVCとmixer2で作るWebアプリのキホン 2013-01-24 Spring勉強会 #jsug
SpringMVCとmixer2で作るWebアプリのキホン 2013-01-24 Spring勉強会 #jsugSpringMVCとmixer2で作るWebアプリのキホン 2013-01-24 Spring勉強会 #jsug
SpringMVCとmixer2で作るWebアプリのキホン 2013-01-24 Spring勉強会 #jsug
 
日本語によるJUnitの拡張について
日本語によるJUnitの拡張について日本語によるJUnitの拡張について
日本語によるJUnitの拡張について
 
俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略
俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略
俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略
 
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
 
渋谷java−あなたのプロジェクトで気軽にjavaをバージョンアップするために必要なこと
渋谷java−あなたのプロジェクトで気軽にjavaをバージョンアップするために必要なこと渋谷java−あなたのプロジェクトで気軽にjavaをバージョンアップするために必要なこと
渋谷java−あなたのプロジェクトで気軽にjavaをバージョンアップするために必要なこと
 
Java Puzzlers JJUG CCC 2016
Java Puzzlers JJUG CCC 2016Java Puzzlers JJUG CCC 2016
Java Puzzlers JJUG CCC 2016
 
テンプレートエンジンにMixer2を使うとSeleniumでのテストもラクになるかもねという話
テンプレートエンジンにMixer2を使うとSeleniumでのテストもラクになるかもねという話テンプレートエンジンにMixer2を使うとSeleniumでのテストもラクになるかもねという話
テンプレートエンジンにMixer2を使うとSeleniumでのテストもラクになるかもねという話
 
properties, yaml, and me
properties, yaml, and meproperties, yaml, and me
properties, yaml, and me
 
Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料
Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料
Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料
 
テストゼロからイチに進むための戦略と戦術
テストゼロからイチに進むための戦略と戦術テストゼロからイチに進むための戦略と戦術
テストゼロからイチに進むための戦略と戦術
 
Seleniumと相性がいいテンプレートエンジンMixer2-第1回selenium勉強会ライトニングトーク
Seleniumと相性がいいテンプレートエンジンMixer2-第1回selenium勉強会ライトニングトークSeleniumと相性がいいテンプレートエンジンMixer2-第1回selenium勉強会ライトニングトーク
Seleniumと相性がいいテンプレートエンジンMixer2-第1回selenium勉強会ライトニングトーク
 
Java8移行から始めた技術的負債との戦い(jjug ccc 2015 fall)
Java8移行から始めた技術的負債との戦い(jjug ccc 2015 fall)Java8移行から始めた技術的負債との戦い(jjug ccc 2015 fall)
Java8移行から始めた技術的負債との戦い(jjug ccc 2015 fall)
 
20140405 mavenセントラルリポジトリへの登録のコツ 第5回渋谷java
20140405 mavenセントラルリポジトリへの登録のコツ 第5回渋谷java20140405 mavenセントラルリポジトリへの登録のコツ 第5回渋谷java
20140405 mavenセントラルリポジトリへの登録のコツ 第5回渋谷java
 

Similar to The cost of learning - advantage of mixer2

Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011YoungSu Son
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Murat Yener
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
CSharp presentation and software developement
CSharp presentation and software developementCSharp presentation and software developement
CSharp presentation and software developementfrwebhelp
 
Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)David McCarter
 
The Theory Of The Dom
The Theory Of The DomThe Theory Of The Dom
The Theory Of The Domkaven yan
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practicesmanugoel2003
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James NelsonGWTcon
 
Jquery Plugin
Jquery PluginJquery Plugin
Jquery PluginRavi Mone
 
PHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better CodePHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better CodeSWIFTotter Solutions
 
Osiąganie mądrej architektury z Symfony2
Osiąganie mądrej architektury z Symfony2 Osiąganie mądrej architektury z Symfony2
Osiąganie mądrej architektury z Symfony2 3camp
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial EnAnkur Dongre
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial EnAnkur Dongre
 
27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...Panorama Software
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyDavid Padbury
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Hugo Hamon
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Iakiv Kramarenko
 

Similar to The cost of learning - advantage of mixer2 (20)

Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
CSharp presentation and software developement
CSharp presentation and software developementCSharp presentation and software developement
CSharp presentation and software developement
 
Javascript Best Practices
Javascript Best PracticesJavascript Best Practices
Javascript Best Practices
 
Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)
 
The Theory Of The Dom
The Theory Of The DomThe Theory Of The Dom
The Theory Of The Dom
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson
 
Jquery Plugin
Jquery PluginJquery Plugin
Jquery Plugin
 
PHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better CodePHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better Code
 
Osiąganie mądrej architektury z Symfony2
Osiąganie mądrej architektury z Symfony2 Osiąganie mądrej architektury z Symfony2
Osiąganie mądrej architektury z Symfony2
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 
27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
 

More from Y Watanabe

クラウド時代だからSpring-Retryフレームワーク
クラウド時代だからSpring-Retryフレームワーククラウド時代だからSpring-Retryフレームワーク
クラウド時代だからSpring-RetryフレームワークY Watanabe
 
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところY Watanabe
 
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1Y Watanabe
 
サーバーサイドな人がフロントエンド技術と仲良くするはじめの一歩
サーバーサイドな人がフロントエンド技術と仲良くするはじめの一歩サーバーサイドな人がフロントエンド技術と仲良くするはじめの一歩
サーバーサイドな人がフロントエンド技術と仲良くするはじめの一歩Y Watanabe
 
Selenium再入門-W3C勧告とページオブジェクトパターンと私-201707webエンジニア勉強会#2神田
Selenium再入門-W3C勧告とページオブジェクトパターンと私-201707webエンジニア勉強会#2神田Selenium再入門-W3C勧告とページオブジェクトパターンと私-201707webエンジニア勉強会#2神田
Selenium再入門-W3C勧告とページオブジェクトパターンと私-201707webエンジニア勉強会#2神田Y Watanabe
 
Webエンジニアがスタートダッシュをキメるためのローカル開発環境の勘所
Webエンジニアがスタートダッシュをキメるためのローカル開発環境の勘所Webエンジニアがスタートダッシュをキメるためのローカル開発環境の勘所
Webエンジニアがスタートダッシュをキメるためのローカル開発環境の勘所Y Watanabe
 

More from Y Watanabe (6)

クラウド時代だからSpring-Retryフレームワーク
クラウド時代だからSpring-Retryフレームワーククラウド時代だからSpring-Retryフレームワーク
クラウド時代だからSpring-Retryフレームワーク
 
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
 
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
 
サーバーサイドな人がフロントエンド技術と仲良くするはじめの一歩
サーバーサイドな人がフロントエンド技術と仲良くするはじめの一歩サーバーサイドな人がフロントエンド技術と仲良くするはじめの一歩
サーバーサイドな人がフロントエンド技術と仲良くするはじめの一歩
 
Selenium再入門-W3C勧告とページオブジェクトパターンと私-201707webエンジニア勉強会#2神田
Selenium再入門-W3C勧告とページオブジェクトパターンと私-201707webエンジニア勉強会#2神田Selenium再入門-W3C勧告とページオブジェクトパターンと私-201707webエンジニア勉強会#2神田
Selenium再入門-W3C勧告とページオブジェクトパターンと私-201707webエンジニア勉強会#2神田
 
Webエンジニアがスタートダッシュをキメるためのローカル開発環境の勘所
Webエンジニアがスタートダッシュをキメるためのローカル開発環境の勘所Webエンジニアがスタートダッシュをキメるためのローカル開発環境の勘所
Webエンジニアがスタートダッシュをキメるためのローカル開発環境の勘所
 

Recently uploaded

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

The cost of learning - advantage of mixer2

  • 1. “THE COST OF LEARNING” advantage of mixer2.org @nabedge DBFlute Fes at Shibuya, Tokyo 2015-11-21 http://connpass.com/event/21885/
  • 2. Who? ● Yu Watanabe ● Java Engineer ● Bizreach.inc ● Project Mixer2 http://mixer2.org 2
  • 3. What is mixer2 ? 3 Template = 100% pure HTML & CSS View = Plain Java Hello <span id=”name”>foo bar</span> Span span = html.getById(“name”, Span.class); span.replaceInner(“World !”); // You get // Hello <span id=”name”>World !</span>
  • 4. The cost of learning 4
  • 5. 5 Productivity ▷ Type safe ▷ Automatic code generation ▷ Testability ▷ Convention over Configuration ▷ Framework ▷ The cost of learning
  • 7. How to reduce cost to learn ? 7
  • 8. 8 ★ No learn ★ Use that you already know
  • 9. 9 What do you know ? ▷ Java ▷ HTML/CSS ▷ Eclipse or IntelliJ ▷ JSP + Custum tag ▷ VTL (Velocity Template Language) ▷ FTL (Freemarker Template Language) ▷ Thymeleaf property + OGNL
  • 10. Thymeleaf attributes and utility objects #ctx #vars #locale #dates #calendars #numbers #strings #bools #arrays #lists 10 #sets #maps #aggregates #messages #ids … … … th:if th:unless th:text th:class th:attr th:include th:replace th:each th:switch th:remove
  • 11. customization 11 1.1. Scenario 1: adding features to the Standard dialects Say your application uses the SpringStandard dialect and that it needs to show an alert text box in blue or red background depending on the user’s role (admin or non-admin) from Monday to Saturday, but always in green on Sundays. You can compute this with conditional expressions on your template, but too many conditions could render your code a little bit hard to read… Solution: create a new attribute called alertclass and an attribute processor for it (Java code that will compute the right CSS class), and package it into your own MyOwnDialect dialect. Add this dialect to your template engine with the th prefix (same as the SpringStandardone) and you’ll now be able to use th:alertclass="${user.role}"! http://www.thymeleaf.org/doc/tutorials/2.1/extendingthymeleaf.html
  • 12. Scinario1 12 admin non-admin Monday to Saturday blue red Sunday green green <input type=”text” class=”COLOR” />
  • 13. solution with thymeleaf 13 <input type=”text” th:alterclass=”${user.role}” public interface IDialect { public String getPrefix(); public Set<IProcessor> getProcessors(); public Map<String,Object> getExecutionAttributes(); public Set<IDocTypeTranslation> getDocTypeTranslations(); public Set<IDocTypeResolutionEntry> getDocTypeResolutionEntries(); }
  • 14. lastaflute-mixer2 view class 14 1 public class SigninView extends OrleansBaseView { 2 private final ColorService colorService; 3 ... 4 protected void render(Html html, Mixer2Supporter supporter) { 5 Body body = html.getBody(); 6 supporter 7 .findById(body, "account", Input.class) 8 .alwaysPresent(input -> { 9 input.setValue(form.account); 10 input.addCssClass(colorService.choice()); 11 }); https://github.com/lastaflute/lastaflute-example-maihama/blob/master/maihama- orleans/src/main/java/org/docksidestage/app/web/signin/SigninView.java
  • 15. 15 To use Mixer2, You need ▷ Java ▷ HTML/CSS ▷ Eclipse or IntelliJ ▷ JSP + Custum tag ▷ VTL (Velocity Template Language) ▷ FTL (Freemarker Template Language) ▷ Thymeleaf property + OGNL
  • 16. What is your GOAL ? 16 A. Learn technology B. Write code C. Launch product
  • 17. ““Done is better than perfect .” 17
  • 18. Done with ease by Mixer2 18