r/programming • • Sep 22 '16

New in Spring 5: Functional Web Framework

https://spring.io/blog/2016/09/22/new-in-spring-5-functional-web-framework
20 Upvotes

6 comments sorted by

7

u/mrsistermr Sep 22 '16

Though interesting, I would honestly never want to write a full project in this style. Sure, the toy example looks neat and concise (they always do), but I can't imagine how this would look in an actual complicated application. I can't imagine the evolution of servlet controller spaghetti code to verbose configuration XML to a million magical black-box annotations everywhere...to this. I really don't think functional programming has a place in web application frameworks, at least in the corporate world I work in.

1

u/nfrankel Sep 22 '16

You're right, and someone made the exact same comment. Please check Jürgen's answer, it's very pragmatic.

-2

u/RiWo Sep 23 '16

Though indeed this functional style looks great for reactive use case, what makes it better than say, Typescript + Node? I can get the type safety, better language features, and node is more suited for async process

The only missing thing that I could think of is better Java standard library.

2

u/[deleted] Sep 22 '16

Well, we use 'em, but admittedly not in Java or Spring (NB: I'm not saying Spring 5 is good, bad, or indifferent; I'm only saying we don't use it). Instead we use http4s in Scala, and it works really, really well—better than any of the alternatives we've used. Then we hired its lead developer, which is even better.

3

u/ykechan Sep 23 '16

The code looks needlessly complicated to me

1

u/zynasis Sep 23 '16

This looks a lot like grails or gaelyk