📜 ⬆️ ⬇️

Glitter and misery of Java web frameworks

Hi, Habr! Help me choose a web framework? Requirements: fashionable, youth, popular, high-quality framework for solo techno-nomad.


Do we need to read the next post about it every month?



A few years of participation in projects on the border of the enterprise and the system have finally beaten off the scent. To understand the question, I looked at the top of Google and found there a bunch of one-sided ratings. Probably the best was Java Web Frameworks Index from ZeroTurnaround.


Good he is that



Here is how the rating looks at the time of this writing:


RankFrameworkPopularity
oneSpring MVC28.82
2Jsf15.2
3Spring boot13.35
fourGwt7.74
fiveGrails6.35
6Struts5.4
7Dropwizard4.9
eightPlay framework3.26
9Jhipster2.49
tenJAX-RS2.44
elevenVaadin2.15
12Seam1.94
13Wicket1.91
14Tapestry1.9
15Sparkjava0.77
sixteenVert.x0.76
17Rapidoid0.25
18Lagom0.24
nineteenRatpack0.13

Wait, there Struts in the top ten? Seriously? It seems I have not lost anything in these few years. More precisely, even since the early Middle Ages.


Let's go through the list.


Oh, Spring MVC and Spring Boot are two different list items? Perhaps this can be understood and forgive? ( write in the comments! ). It makes no sense to ask, what does Spring have to do - he, like Docker, always has it.



By the way, Jurgen Heller is meeting with us at the JPoint 2018 Moscow - this is the main sprinkler. Here you can dryuit questions such as "what's the spring here" in full.


But what is really scary is that between them (that is, in fact, in the first place) is JSF. Once I did some discussions on ENT about what template engine for Java is the best. The years went by, but there was always half the thread with a universal answer: why do you need a template engine when there is a JSF? Initially, there was just JSP / JSTL, but then they slowly lost ground, and only JSF remained.


, JSF. , FacesContext facesContext = FacesContext.getCurrentInstance();. @Inject FacesContext facesContext;. EL-, #facesContext. @FlowMap @ManagedProperty ("#{bean.property}") private String stringProperty; , , . <f:convertDateTime type="localDate" pattern="MM/dd/yyyy"/> — Date-Time API, , . . , Oracle , .


<f:websocket>, :


<h:body> 
   <f:websocket channel="jaxArticle"
    onmessage="function(message){alert(message)"} /> 
</h:body> 

, 2009 ( «XV ») .


— Grails PlayFramework. Grails — , , Java, JVM. C PlayFramework Java API Play 1, — ? PlayFramework , Scala API ( ORM ).


Grails. , . , , Groovy — . Java 9! , , . Groovy - Java 9: , --add-opens=java.base/* .


Wicket, Vaadin GWT . Vaadin GWT . Wicket . , Wicket , Java-. Wicket . MMO-. , — , , Wicket. , Wicket . , ?


. ( , , ).



Wicket , AJAX. , AJAX , , -. , Wicket . , , . , , . — , . wicket.apache.org , .


AJAX : 2017 . , , : m, mp, e, f, sc, dt, wr, ch, bh, pre, bsh, ah, sh, fh, coh, ep, dep, rt, ad, sp, tr.


. : «allow default». , , HTML, .


, , GWT. , - , : JavaScript Java — , - .


Wicket, , 2007 2010 , , GitHub — Martin Grigorov, .



, .
git clone https://github.com/apache/wicket.git
cd ./wicket


:


git log --shortstat --pretty="%cE" | sed 's/\(.*\)@.*/\1/' | grep -v "^$" | awk 'BEGIN { line=""; } !/^ / { if (line=="" || !match(line, $0)) {line = $0 "," line }} /^ / { print line " # " $0; line=""}' | sort | sed -E 's/# //;s/ files? changed,//;s/([0-9]+) ([0-9]+ deletion)/\1 0 insertions\(+\), \2/;s/\(\+\)$/\(\+\), 0 deletions\(-\)/;s/insertions?\(\+\), //;s/ deletions?\(-\)//' | awk 'BEGIN {name=""; files=0; insertions=0; deletions=0;} {if ($1 != name && name != "") { print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net"; files=0; insertions=0; deletions=0; name=$1; } name=$1; files+=$2; insertions+=$3; deletions+=$4} END {print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net";}'

:


sudo gem install git_fame
git fame

30 ( SSD, i7).


Statistics based on master
Active files: 5,407
Active lines: 578,441
Total commits: 15,600

nameloccommitsfilesdistribution (%)
martin-g161,089982,89827.8 / 0.6 / 53.6
Igor Vaynberg67,9832,8721,99311.8 / 18.4 / 36.9
Juegen Donnerstag66,2341,8672,25011.5 / 12.0 / 41.6
andrea del bene58,583565410.1 / 0.0 / 12.1
Eelco Hillenius30,2872,9321,0515.2 / 18.8 / 19.4
svenmeier28,5043071,1304.9 / 2.0 / 20.9
Martijn Dashorst22,4701,0897273.9 / 7.0 / 13.4
Frank Bille Jensen19,8542351,4033.4 / 1.5 / 25.9
Johan Compagner17,6371,4841,5033.0 / 9.5 / 27.8
Jonathan Locke14,2571,3214372.5 / 8.5 / 8.1
Jean-Baptiste Quenot14,0222774482.4 / 1.8 / 8.3
Gerolf Seitz13,1892051,0412.3 / 1.3 / 19.3
Matej Knopp8,5659632911.5 / 6.2 / 5.4
Peter Ertl8,2813544171.4 / 2.3 / 7.7
Pedro Henrique Oliveira d...7,474981691.3 / 0.6 / 3.1
Tobias Soloschenko6,3731001611.1 / 0.6 / 3.0
Emond Papegaaij4,6241682070.8 / 1.1 / 3.8
Alastair Maw3,2574221720.6 / 2.7 / 3.2
Carl-Eric Menzel2,338361120.4 / 0.2 / 2.1
Jesse Long2,230122610.4 / 0.1 / 4.8
Jeremy Ryan Thomerson2,14651840.4 / 0.3 / 1.6
Andrea Del Bene1,999464500.3 / 0.3 / 8.3
bitstorm1,972141160.3 / 0.1 / 2.1
Michael Mosmann1,39743310.2 / 0.3 / 0.6
Felipe Campos de Almeida1,3964240.2 / 0.0 / 0.4
klopfdreh1,32939270.2 / 0.2 / 0.5
Janne Hietamaki996218460.2 / 1.4 / 0.9
Timo Heikki Rantalaiho883421050.2 / 0.3 / 1.9
Maurice Marrink78412280.1 / 0.1 / 0.5
Bertrand Guay-Paquet773130.1 / 0.0 / 0.1
John Sarman7678210.1 / 0.1 / 0.4
Maxim Solodovnik71626380.1 / 0.2 / 0.7
sourceforge-skipoles60540420.1 / 0.3 / 0.8
manuelbarzi476250.1 / 0.0 / 0.1
Domas Poliakas432990.1 / 0.1 / 0.2
Alexander Morozov4124160.1 / 0.0 / 0.3
Thomas Götz4031130.1 / 0.0 / 0.2
Martin Funk3133200.1 / 0.0 / 0.4
Gwyn Richard Evans24962670.0 / 0.4 / 1.2
admin2473130.0 / 0.0 / 0.2
kensakurai208530.0 / 0.0 / 0.1
Michael Haitz207120.0 / 0.0 / 0.0
Guillaume Smet204370.0 / 0.0 / 0.1
Cedric Gatay1859130.0 / 0.1 / 0.2
Thomas Matthijs1853120.0 / 0.0 / 0.2
Roman Grigoriadi1691120.0 / 0.0 / 0.2
Artur Michałowski156460.0 / 0.0 / 0.1
Martin Grigorov (Netwalk)1494120.0 / 0.0 / 0.2
Robert Gruendler127680.0 / 0.0 / 0.1
Matthias Metzger122520.0 / 0.0 / 0.0
René Dieckmann119130.0 / 0.0 / 0.1
Ate Douma11414150.0 / 0.1 / 0.3
Pedro Santos110240.0 / 0.0 / 0.1
Sebastien Briquet110330.0 / 0.0 / 0.1
Manuel Barzi105560.0 / 0.0 / 0.1
jac-czerwinski94440.0 / 0.0 / 0.1
Sven82180.0 / 0.0 / 0.1
ozeray791110.0 / 0.0 / 0.2
Thomas Heigl75140.0 / 0.0 / 0.1
Sebastien71240.0 / 0.0 / 0.1
Fridolin Jackstadt42260.0 / 0.0 / 0.1
meno37380.0 / 0.0 / 0.1
Thibault Kruse33220.0 / 0.0 / 0.0
Vit Rozkovec24110.0 / 0.0 / 0.0
Tim Fleming16250.0 / 0.0 / 0.1
Luke Niesink13240.0 / 0.0 / 0.1
Jan Blok10810.0 / 0.1 / 0.0
Nils Schmidt9110.0 / 0.0 / 0.0
Nick Pratt9120.0 / 0.0 / 0.0
slowery8120.0 / 0.0 / 0.0
astrapi694520.0 / 0.0 / 0.0
Jezza3110.0 / 0.0 / 0.0
tatjana193110.0 / 0.0 / 0.0
robert mcguinness3110.0 / 0.0 / 0.0
Peter Dave Hello3110.0 / 0.0 / 0.0
barney2k72120.0 / 0.0 / 0.0
bsaad1110.0 / 0.0 / 0.0
Sander Evers1110.0 / 0.0 / 0.0
Yoann Rodière1110.0 / 0.0 / 0.0
Jeremy Thomerson1410.0 / 0.0 / 0.0
Peter Lamby1310.0 / 0.0 / 0.0
Dan Retzlaff0200.0 / 0.0 / 0.0
Jared Renzullo0100.0 / 0.0 / 0.0
Joe Schaefer0100.0 / 0.0 / 0.0
Leonid Bogdanov0300.0 / 0.0 / 0.0
Yoshiki Higo0100.0 / 0.0 / 0.0
cvs2svn0100.0 / 0.0 / 0.0

, , Wicket, , . - ( ), — .


, - .


, « ». « , — , — Spring, , HashMap! !» , , , . , - !


, , . , JavaScript- , Java . Senior Framework Coder ( — Spring Boot, JSF Play), , . , , Spring Boot.


, -. ?


. , ! -? : , , , , - , Vert.x.


UPD: - Wicket , JBreak . , — :-)


')

Source: https://habr.com/ru/post/345036/


All Articles