This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 248115 - Need to rethink the "Download Online Template" option in the New HTML5 project wizard
Summary: Need to rethink the "Download Online Template" option in the New HTML5 projec...
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-22 13:58 UTC by Petr Jiricka
Modified: 2014-11-11 16:44 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2014-10-22 13:58:30 UTC
(And I suspect some of the notes below also apply to the "Select Template" option.)

Scenario 1
----------
1. Create a HTML5 project
2. On step 3 (Site Template), choose "Download Online Template" and select Twitter Bootstrap 2.3.2
3. On the next step, leave all the tools checked, and Finish

Problem: bootstrap.js library is added to my sources, which I presumably don't want, as I want to manage my libraries through bower.

Scenario 2
----------
1. Create a HTML5 project
2. On step 3 (Site Template), choose "Download Online Template" and select Twitter Bootstrap 2.3.2
4. On the next step, uncheck bower, and Finish
5. Open Project Properties -> JavaScript files

Problem: I would expect that Bootstrap will be shown here, but it is not.

Besides, when I attempt to install twitter-bootstrap through this UI, it fails, see bug 248113.

Scenario 3 
----------
1. Create a HTML5 project
2. On step 3 (Site Template), choose "Download Online Template" and select AngularJS Seed
4. On the next step, uncheck everything, and Finish

Problem: The application created by the wizard still contains package.json and bower.json, even though I disabled these. So it does not respect my choices.

Probably an analogous problem happens with the Cordova Hello World template, which assumes/requres npm, so it probably does not make sense to disable package.json in that case either (though I can not test right now because of issue 248087).

-----
These scenarios show that the Templates feature has some conceptual problems, and should probably be redesigned from the ground up.

Another consideration is that HTML5 sample projects are outdated, and they in general don't use npm/bower/grunt, which is almost bad practice these days. So the question is whether sample projects should be reconsidered at the same time.

Another thing is, if I was a web developer creating a webapp from scratch, I would probably use Yeoman, because I trust Yeoman to promote good practices. Then I would "import" the project into NetBeans (where "import" in NB 8.1 will hopefully be something more user-friendly than the "HTML5 project with existing sources" wizard). So you may want to consider this as well, and even if NB doesn't use Yeoman directly, at least it should make sure if also promotes good practices, as Yeoman does.
Comment 1 Vladimir Riha 2014-11-11 16:44:32 UTC
(In reply to Petr Jiricka from comment #0)
> (And I suspect some of the notes below also apply to the "Select Template"
> option.)
> 
> Scenario 1
> ----------

I had a look at all the online templates and only Bootstrap has officially supported bower installation (at least it is the only one which mentions it in installation instruction) but this is only for version 3.X while the online template in IDE is for 2.X. So the question is probably if we want to offer older bootstrap or not. 

> 
> Scenario 3 
> ----------

I would vote (if possible) to "disable" the "Tools" step if user is selecting online or custom template as presence of bower.json/package.json should (I think) depend on the template, not user's choice (if you e.g. use AngularSeed and would uncheck package.json to not have it in your project, it would be quite difficult to make the project working as you need NPM install)