apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.62k stars 840 forks source link

Maven first in New Project Wizard #1038

Closed dukescript closed 5 years ago

dukescript commented 5 years ago

There's a discussion in the netbeans-dev mailing list about changing the layout of the "New project" wizard.

Currently the "Java" Category creates an ANT-based project. As ANT is old and only few projects use it, this Category should use Maven. This can be done by simply rearranging the projects a bit, mostly via branding.

dukescript commented 5 years ago
bildschirmfoto 2018-11-25 um 15 37 13 bildschirmfoto 2018-11-25 um 15 38 39
matthiasblaesing commented 5 years ago

Not sure this was intentionally closed, but could we please not go down the "Ant(ic)" route? It is not funny. People choose ant for a reason and you don't need to belittle them.

dukescript commented 5 years ago

Thanks for the comment, I was in a hurry to get on the road and accidentally closed it.

Agreed, I can change the name tomorrow morning, what would you suggest?

dukescript commented 5 years ago

I updated the PR with a more agreeable categrory name: bildschirmfoto 2018-11-26 um 12 09 28

Chris2011 commented 5 years ago

The original/current names in the wizard are Java and Maven, why not now Java Maven and Java Ant? So everyone knows on the very first view what is meant here.

Followed the discussion, future wish could be only using Java maybe with sub categories or wizard enhancements. But for now I would prefer to see Java Maven and Java Ant, IMHO.

dukescript commented 5 years ago

First I thought, it's only a small change, and I should do it, but actually I think the current naming is better, as it serves a purpose:

"Java Maven" and "Java Ant" does not really fix the problem of making Maven the default and "nudging" new developers to stay away from Ant. It only changes the visibility of Maven a little bit, and instead forces users to make a decision.

Imagine a new developer who wants to create his first Java project. If we present him the options "Java" and "Java Ant", he'll very likely choose "Java", which would be great. If we present him with "Java Maven" and "Java Ant", he'll be lost and in the best case resort to google. Like Tim said on the mailing list, we force a user into a choice they don't (shouldn't) care about For reference: Joel Spolsky's Blog Post explaining why this is a bad solution.

I'd prefer to keep the names like this, as a tool to point users in the right direction.

matthiasblaesing commented 5 years ago

I would concur with @Chris2011 and go with "Java Ant" and "Java Maven" or "Java (ant)" and "Java (maven)". If the label is not present and I want to create a maven project, I have to guess how to get there (you are hindering my experience in that case).

Yes, as a developer you have to know some terms and if you don't know them, you should better learn.

matthiasblaesing commented 5 years ago

If you don't say, that "Java" means "Maven" how should an experienced user know hat netbeans does when he clicks "Next"? You still ask the user to make a decision and then you hide the important information. So if I can choose between:

how should I know which is the right one, given that I want to create a maven project? Behind "Java" everything could hide (gradle, maven, make, $newCoolBuildsystem).

For me (yes, I'm also a user) hiding the build system makes the situation worse.

geertjanw commented 5 years ago

Are we ready to merge this?

JaroslavTulach commented 5 years ago

Who's "we"? Me? Yes, I support merging.Toni? Yes. Community? Likely. Matthias? No.

dukescript commented 5 years ago

If you don't say, that "Java" means "Maven" how should an experienced user know hat netbeans does when he clicks "Next"?

Just like it worked for last 20 years: If you select a project, a description is displayed, which also says how this project is built. You can see that in the 2nd and 3rd screenshot "A simple Java Application using Maven."...

neilcsmith-net commented 5 years ago

I'm 0 - For what it's worth, I agree with @matthiasblaesing I think making Maven (feel) default is good, but I don't necessarily agree with hiding the build system, including from newbies (a few conversations I've had recently have made me question whether doing that is a good idea). Although the description is better than the Ant one. Isn't having the same category and title as before potentially confusing for anyone finding old info online though?

jtulach commented 5 years ago

Can this PR be merged now? Or is there someone who wants Toni to organize a vote on the mailing list?

My feeling is that there exists a majority that is either +1 or +0 on the "Maven 1st UI change" and this PR is good enough to begin our move towards that direction. A formal vote would of course verify/reject my feeling properly.

Speakup if you want Toni to initiate such vote.

geertjanw commented 5 years ago

I agree with merging this. Would we cherry pick this for Apache NetBeans 10?

matthiasblaesing commented 5 years ago

There is always the option to cancel the PR and rethink. My opinion stands, I want our users to make informed decisions and that means he/she should know what he/she chooses. You plan to take away that information . For me this is a step back.

The quoted article Joel on Software - Choices does not even apply here. It argues, that useless decisions should not be presented to the user, which this PR does not do, it leaves all options accessible. It explicitly does not state, that information should be hidden from the user, which hinders the decision process.

jtulach commented 5 years ago

Certainly not eligible for cherry picking into NetBeans 10. We need more time to stabilize and polish the change.

@matthiasblaesing and/or everyone else, please explicitly state you insist on a vote. Otherwise I'll push forward merging of this PR on the basis of lazy consensus.

matthiasblaesing commented 5 years ago

I don't insist on a vote, I want a better solution. I veto the merge of this PR.

vieiro commented 5 years ago

Hi all,

I have to agree with @matthiasblaesing and I think this deserves some further consideration/thought, preferably in the mailing list. Matthias is putting the user first, and that's my motto as well, so I have to agree with his veto.

Trying to be positive, I'd rather see a "Java" main section with the following options:

Also let's try to be positive about ant. Apache Ant is a companion project in the ASF and deserves our consideration. The fact that it's an "old technology" deserves a respect as well. Ant has served NetBeans well during many years, and we still depend on it to build our own food.

eppleton commented 5 years ago

@viero I think everyone here tries to put the user first. In my personal opinion, the PR does that, and the other solution would be confusing and bad for the user. You have a different opinion. That's OK and I respect that. But please don't assume that I don't care about usability. If you read my replies you should be able to see that my whole argument is about usability, and I'd be glad if you could respect that too, even if you don't agree.

@matthiasblaesing There was a "Java" category before, which defaulted to ANT, now it defaults to Maven. How is this a step back? It is a change of the default for Java, no more no less. And regarding the "Choices" blog, that Tim Boudreau mentioned on the mailing list: For a Java newbie it's exactly the same as the "optimize database" example in the blog: We ask the user for a decision he very likely doesn't care about and doesn't have enough information to make (What is ANT or Maven?). And for a more experienced user it's not hard to find the information, as it is in the description of the wizard.

matthiasblaesing commented 5 years ago

@eppleton the referenced article argues, to not ask the user at all, if the developer should know better and the user can be expected not to care/know. We can't take that road, as there are different pros and cons to choose the build system and the option needs to be there. So the user needs to choose and needs information to base its decision on. Given that the difference between the two options is the build system I don't see why that fact should be hidden and why that would help the developer at all.

Before the the change there was:

No we have:

So what tells me what "Java" does? If my peer group says "gradle" is the build system, I would expect that to be created. Bummer - does not happen - there is some file "pom.xml" generated, but no "build.gradle". You can replace "gradle" with $featured build system. So why not:

Putting maven first, indicates to order "we" suggest and lets the user choose.

vieiro commented 5 years ago

@eppleton Oh, of course we all want the best for the user. Apologies for my bad explanation. I like best your proposal of explaining the build system "Java (ant based)" and "Java (maven based)".

jtulach commented 5 years ago

What shall be the next steps with this PR? Can those who object to currently proposed version (@matthiasblaesing, @vieiro) modify the PR so it is acceptable for them?

Btw. recently I was teaching my kids Java and found a nice course that uses NetBeans! Having courses like this is an excellent value that we don't want to loose. It has to be admitted that for existing materials like this, it is important to keep the Ant based projects around and deprecate them carefully.

geertjanw commented 5 years ago

Since this is going to impact one of the very first steps in all of our tutorials, and could have an adverse effect on the starting point of each and every newbie of Apache NetBeans, I think we should together take a look at the impact of this on the documentation -- i.e., if someone can't do step 1 because they cannot find the project template described in step 1 of a tutorial, there's a real chance they'll not go to step 2 at all.

geertjanw commented 5 years ago

Here is where our documentation at Apache is found:

https://github.com/vieiro/incubator-netbeans-website/tree/feature/third-donation-tutorials/netbeans.apache.org/src/content/kb/docs

Here's the quick start, i.e., the starting point for most users, for example, though note some broken images:

https://github.com/vieiro/incubator-netbeans-website/blob/feature/third-donation-tutorials/netbeans.apache.org/src/content/kb/docs/java/quickstart.asciidoc

vieiro commented 5 years ago

I think @geertjanw has a good point. Let's polish our tutorials (http://netbeans.apache.org/kb/docs/java/quickstart.html, for instance) and then let's update the "New Project Wizard". Otherwise the users will be confused.

Proposal: What about adding different new categories to the left of the wizard?

...

matthiasblaesing commented 5 years ago

To answer the "put your work where your mouth is" request: I created:

https://github.com/matthiasblaesing/incubator-netbeans/tree/pr-1038-suggestion

That modifies this suggestion in the following way:

Screenshot: screenshot

This way:

This is a suggestion and should be taken as such.

geertjanw commented 5 years ago

Why is "NetBeans Modules" deprecated?

I'm not sure about the idea of a Deprecated folder, though I understand the intention behind it, maybe use "Legacy" instead?

Chris2011 commented 5 years ago

-1 for the depcrecated or legacy stuff, because we don't want to remove ant at all. We should close this PR and should find a consens on the mailing list first. My proposal is similar to that what PHP and HTML5 does. so It should be consistent.

HTML5 -> Choose Project type -> Last step is to choose the tools (Package.json, grulpfile, gruntfile, etc.)

PHP -> Choose Project type -> After some other steps choose the framework

So my proposal is this

Java -> Choose project type -> Next step or later choose your build/package pipeline (ant, maven, gradle, etc.)

NetBeans Module Development -> Choose project type -> Next step or later choose your build/package pipeline (ant, maven, gradle, etc.)

Cheers

Chris

geertjanw commented 5 years ago

I must admit I am very hesitant about it too. For anyone actually using Ant, it is not Deprecated or Legacy at all. Maybe instead -- until we have the full implementation similar to what Chris suggests -- we could have two folders, Recommended and Other, with Maven and PHP and NetBeans Modules in Recommended and Ant and JavaFX in Other? I think there's nothing wrong with recommending one approach over the other -- both in terms of our support of it as well as the direction in which the industry has gone over the past years.

pdurbin commented 5 years ago

Hi! @geertjanw posted an updated tutorial on the netbeans-users mailing list: https://lists.apache.org/thread.html/5c6a64062a3d4a4ce99264089a304bad23613b061a13ad436dc206eb@%3Cusers.netbeans.apache.org%3E

I was a little sad to see that Ant is still the default. If possible, the default should be Maven.

geertjanw commented 5 years ago

Some believe it is obvious that the default should be Maven, but it's not obvious to everybody, that's for sure. And even if Maven should be the default, what does that mean? That it is listed first?

Ideally, we'd have one single Java project wizard, within which one can select whether one wants a Java SE project or a Java EE project, with a choice of Ant, Maven, or Gradle for the build system. But who is actually going to step forward and create this unified wizard?

geertjanw commented 5 years ago

I think I may have a very simple solution that everyone will probably agree with -- change the name of the Maven category to "Java with Maven", change the Gradle category to "Java with Gradle" and change the Java category to "Java with Ant". Then put all the templates from "Java Web" and "Java EE" into the "Java with Ant" category, which simultaneously solves the whole "Java Web/Java EE" discussion.

And put "Java with Maven" first, "Java with Gradle" second, "Java with Ant" third. After that "HTML5/JavaScript", "PHP", etc.

OndroMih commented 5 years ago

I like @Chris2011 suggestion best but it would require some refactoring of the dialogues.

As an intermediary solution, maybe what @geertjanw suggested today is best, but I suggest making Java with Maven more prominent by grouping Java with Gradle and Java with Ant into a subcategory Java (other):

Java with Maven Java (other) -> Java with Gradle -> Java with Ant HTML5/JavaScript PHP

This would simultaneously make it easier for newcomers to choose the proper dialog for their new project, make it explicit that Maven is used for the preferred projects and also make it easy to access other build systems for experienced programmers.

I think we should give Maven a prominent position Netbeans wants to make it the recommended and most supported build system.

geertjanw commented 5 years ago

hey @OndroMih, now you're going to make the Gradle people and Ant people upset. :-) I think the best and fairest we can do, without making various factions of the Java community run after us with flaming pitchforks, is to order them in a way that discriminates in favor of Maven, but that doesn't completely push the others under the carpet.

neilcsmith-net commented 5 years ago

@geertjanw +1 to that suggestion, keeping them all top level, prioritising but not hiding / deprecating. Possibly prefer Java (Maven) over Java with Maven - wonder if in brackets is more or less confusing to a newcomer?

Where does NetBeans RCP and plugin stuff end up? Under Java (Ant) as Maven is now, or under NetBeans Modules (Maven) as Ant is now?

Chris2011 commented 5 years ago

I'm also ok with the solution from geertjan, until we have a better solution for that and we will not loose it from our eyes. Maybe we should make a ticket for the other, better solution to not miss that.

ggam commented 5 years ago

That sounds pretty reasonable.

El mié., 30 ene. 2019 17:07, Geertjan Wielenga notifications@github.com escribió:

I think I may have a very simple solution that everyone will probably agree with -- change the name of the Maven category to "Java with Maven", change the Gradle category to "Java with Gradle" and change the Java category to "Java with Ant". Then put all the template from "Java Web" and "Java EE" into the "Java with Ant" category.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apache/incubator-netbeans/pull/1038#issuecomment-459001880, or mute the thread https://github.com/notifications/unsubscribe-auth/ACAucO1VGfr93bkDG0mWXrMzTNi14snPks5vIcNKgaJpZM4Yx26W .

gilbertoca commented 5 years ago

My proposal is similar to that what PHP and HTML5 does. so It should be consistent.

HTML5 -> Choose Project type -> Last step is to choose the tools (Package.json, grulpfile, gruntfile, etc.)

PHP -> Choose Project type -> After some other steps choose the framework

So my proposal is this

Java -> Choose project type -> Next step or later choose your build/package pipeline (ant, maven, gradle, etc.)

NetBeans Module Development -> Choose project type -> Next step or later choose your build/package pipeline (ant, maven, gradle, etc.)

Cheers

Chris

This proposal is uniform and would remove any doubt about legacy discussion. Even better, it is open for new future build tool.

Chris2011 commented 5 years ago

@gilbertoca I think the most (or some) people will agree with that solution and find it nice, but someone has to hook that topic up and change the current wizard to the new one. And to say that, it was my idea but I will not find time to do that, unfortunately.

So we have some options/opinions:

  1. Leave it as it is now and close this PR
  2. Use a fast and maybe quick win solution i.e. that what Geertjan said (Not perfect but for the first run it is a nice to have)
  3. You or someone else will take this to his own project and change it to the better solution.
neilcsmith-net commented 5 years ago

@gilbertoca that also assumes that each build system has the same project type requirements, and at the moment at least they don't overlap. It may be a bit of work to try and make them overlap, and might be less understandable if they did (eg. what's the generic variant of POM Project?)

gilbertoca commented 5 years ago

@gilbertoca that also assumes that each build system has the same project type requirements, and at the moment at least they don't overlap.

@neilcsmith-net Do you think the idea is complex? How they(each build) work today (they need or use any generic project type)? Each build system knows your own requirements, doesn't it?

@Chris2011 thank you! I understand and I can't help much right now (maybe testing).

neilcsmith-net commented 5 years ago

@gilbertoca I'm not sure I understand your question. I don't think the idea is complex technically, I think the idea is complex for the user. The three build systems have different project types. At least in the proposal outlined by Geertjan all the options are still easily discoverable. Until there's a good user facing way to categorize those different types of project across build systems, I think we need build system as the first choice.

Chris2011 commented 5 years ago

@neilcsmith-net I don't think, that we need it as a first choice, because what happens when there is more popular stuff is coming? Like for JS? The first view of the new projects shouldn't that overloaded with options. Go choose your language and later you can choose the build system. But yes, this is your opinion and this is my opinion, maybe we should make a vote later for this.

geertjanw commented 5 years ago

I think we should only do a vote on a unified wizard once we have a commitment from someone to actually implement that. And it will not be trivial to implement. :-) (Plus, as @neilcsmith-net points out, it may end up being a lot less intuitive than the current situation for end users. Don't forget that all changes have unintended side effects, so it's better to make changes as small as possible.)

Today, I will create a PR for the proposal I suggested above and that seems to have everyone's approval -- "Java with Maven", "Java with Gradle", and "Java with Ant", in that order, with all the project templates related to Java organized into those three categories.

geertjanw commented 5 years ago

Here is the newly created issue with full description: https://issues.apache.org/jira/browse/NETBEANS-2040

geertjanw commented 5 years ago

Here is the PR: https://github.com/apache/incubator-netbeans/pull/1115 Here is the blog with pic: https://blogs.apache.org/netbeans/entry/restructuring-of-project-templates-in

geertjanw commented 5 years ago

My PR is merged. As a consequence, since Maven is now first, as requested via this PR, I am closing this PR.