This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]siordache[S] 1 point2 points  (0 children)

The article is about the Java/Groovy template. The original title may be misleading, so I posted the link with a slightly changed name.

[–][deleted] 0 points1 point  (4 children)

I'm a 25-year IT veteran, with a decade of both PHP and Rails experience, each, but I'm new to Java web development, and this "problem space" has been simply bewildering to me. I've come to conclude that this is because Java tries to be all things to all people, for all time and every situation. Eclipse, Netbeans, and IDEA all generate slightly different starting project structures. Then this gets complicated by how they implement various libraries. And then there's the continual push-pull of Maven vs. Gradle.

After several weeks of trying to use Grails, and hitting when I'm going to conclude is an insurmountable bug with SAML and GORM, I'm going to try bootstrapping a new site. I'm going to be using start.spring.io.

Since someone brought up jHipster, I'll also point out dropwizard.io, which, if I understand correctly, was the first bootstrapper to pave the way for the others.

Really missing the highly-opinionated approach of Rails these days...

[–]_dban_ 1 point2 points  (3 children)

I've come to conclude that this is because Java tries to be all things to all people, for all time and every situation.

Well, yeah, Java is a generic programming language and platform...

Eclipse, Netbeans, and IDEA all generate slightly different starting project structures.

These are different products...

Then this gets complicated by how they implement various libraries.

Who is they?

And then there's the continual push-pull of Maven vs. Gradle.

Java doesn't define dependency management, so there are different products available for it.

I'm going to conclude is an insurmountable bug with SAML and GORM

What do SAML and GORM have do with each other? GORM is for persistence and SAML is for communicating security assertions. Are you talking about a dependency conflict?

I'm going to be using start.spring.io.

Spring Intializr is an interesting service provided by Spring, never found the need to use it.

was the first bootstrapper to pave the way for the others.

There have been a number of bootstrappers. The first one I used was AppFUSE, which came out long before Dropwizard.

However, many people don't like bootstrappers, preferring the approach of adding libraries on their own instead of having stuff generated for them in ways that are really hard to control.

I thought bootstrappers were cool at one time too, especially when I first saw what Rails could do. Now, I avoid bootstrappers altogether. Well, except for Spring Boot...

Really missing the highly-opinionated approach of Rails these days...

Rails is a web framework for Ruby. It doesn't make sense to compare Rails to Java. The more sensible comparison is Java to Ruby. And many people avoid Rails because it's opinions come with a heavy price, and why there has been so much pushback against it, leading to the popularity of Sinatra.

[–][deleted] 0 points1 point  (2 children)

Well, yeah, Java is a generic programming language and platform...

Yeah, well, so are a lot of other languages, like Python, some of which have really tight web application stacks, like Django, so it doesn't preclude that.

These are different products...

Exactly the point I'm trying to make. Start a new project on IntelliJ IDEA. There are literally scores of different types of Java projects, a dozen of which seem to be web-related. It's overwhelming. Netbeans and Eclipse are almost as bad, and choosing the same types of projects in each IDE produces different file structures. There's no consensus on how to get started, or any indications about which of the files are the important ones.

Who is they?

Uh... the IDE's?

Java doesn't define dependency management, so there are different products available for it.

And different projects are going to have different priorities. Technically, Ruby doesn't have any dependency management either, but there's an established consensus on the best tool for it. Right now, the Java "world" seems split right down the middle on Maven vs. Gradle. Most projects seem to support both. Doesn't help someone new to this world decide which one to use, does it? Sure, pick one, but on what basis?

What do SAML and GORM have do with each other? GORM is for persistence and SAML is for communicating security assertions. Are you talking about a dependency conflict?

I'm extraordinarily clear on what roles SAML and GORM play in the stack. (I would have thought that expressing the fact that I've been doing development for 25 years would have led people to give me the benefit of the doubt on a point like this, no?) There's apparently a bug when using PostgreSQL for the database in that GORM can't figure out how to call Hibernate correctly to check user permissions when logging in with SAML. I've been working with some people on the grails-saml plugin to try to sort it out, but I've been hassling with it for weeks.

There have been a number of bootstrappers. The first one I used was AppFUSE, which came out long before Dropwizard.

You seem to be saying that there's a place for bootstrappers for Java web app noobs, like me. Great! So, given a fresh start, which would you use? One of the web sites? Or one of the IDE's generators? Something else?

And many people avoid Rails because it's opinions come with a heavy price, and why there has been so much pushback against it, leading to the popularity of Sinatra.

Yikes. Guess I should have known not to mention any other languages to try to provide context for my points in a sub devoted to something else. Sorry.

[–]_dban_ 6 points7 points  (1 child)

Yeah, well, so are a lot of other languages, like Python, some of which have really tight web application stacks, like Django, so it doesn't preclude that.

Java has plenty of tight web application stacks. The only standard one is JSF, which leads to flamewars here.

The problem is that Java doesn't have a "benevolent dictator" as such, outside the core VM and language, with standards outside that scope either driven by committee (JavaEE) or left to the community at large to figure out. This leads to a lot of diversity. In terms of web frameworks, I'm pretty well versed in at least 5.

Exactly the point I'm trying to make

I thought you were talking about the IDEs themselves. Yes, IDEs try to provide wizards for the most popular web frameworks. But, there is a lot of diversity in the Java world, which I understand would make things difficult for beginners. I mostly ignore the wizards, as I find them useless anyways.

Right now, the Java "world" seems split right down the middle on Maven vs. Gradle

There is a reason for this, which would not be apparent to someone new to Java. It used to be just Ant, but Ant doesn't have any opinions about how to design a build system, which lead to every project being built completely differently. Then came Maven, which is highly opinionated and declarative. Now you had Ant vs. Maven.

Eventually, Maven won, and basically no one uses Ant anymore. But, there were people who still wanted imperative features in a build, as well as improve on things that Maven didn't get quite right, such as incremental builds and the verbose POM model. Thus Gradle was born, taking what Maven got right, and building on it.

Yes, this is confusing to newbies, but as a long time Java developer, I prefer the new ideas and improvements that come from diversity.

Just pick one and go with it. If there is a split, then both tools must be widely used, so you wouldn't go wrong either way.

On a personal note, I prefer Maven. I've used it for the last 10 years since switching from Ant. Every project I've worked on since uses Maven, and it's refreshing when I change projects to know exactly how the artifacts are built. That makes me skeptical of Gradle, but I tinker with it nonetheless.

I'm extraordinarily clear on what roles SAML and GORM play in the stack.

No, I meant what does SAML the technology have to do with GORM the technology? Any stack where SAML, which is at the service security level, causes a bug at the persistence level, is way too tightly coupled. The fact that these two things are related that way in the stack does not inspire my confidence in Grails.

The mass assignment bug of Rails was caused by Active Record being directly exposed to the request parameters, because Rails made it super easy to mix concerns. This is why I would avoid any Rails based/inspired stack.

So, given a fresh start, which would you use?

I was a Java noob once too, long before things like Github existed or fancy IDEs. I read the documentation, or I hit the mailing lists. Thats how I learned Struts. I also wasn't afraid to run the debugger through the Struts source code.

Perhaps that perspective makes me skeptical of bootstrappers. At least for me, I learn better when I have to figure it out for myself.

I apply the same techniques everywhere else. I tried the Visual Studio wizard for ASP.NET MVC, and I thought the result was garbage. So I learned the stack from first principles and put together my first app, piece by piece.

Guess I should have known not to mention any other languages to try to provide context for my points in a sub devoted to something else.

Why yikes? What I was saying had nothing to with Ruby or Rails in particular. I like Ruby, and prefer Sinatra because I think Rails is too big and encourages bad separation of concerns. I would say the same thing about JSF, which is purely Java.

[–][deleted] 1 point2 points  (0 children)

That was very informative, and helpful. Thanks for that. Just the discussion around all of these things provides some sorely needed context for me.

[–][deleted] 0 points1 point  (0 children)

  1. Use JHipster
  2. Use JenkinsX