I'm learning Java EE. I'm getting a grasp on CDI, dependency and context injection. Doesn't seem too hard for now.
Now I want to try and actually write some code. I installed NetBeans (with GlassFish and everything else) and I'm kinda stuck now.
My book (Beginning Java EE 7 by Goncalves) has a nice simple example that demonstrates EJB and context/dependecy injection, annotations, interceptors, producers, etc... In the book, he just wrote the code he needed, added the bean.xml, and that was is. He used maven, so he added an explicit dependency to Weld and he was able to instantiate it in a main class, and run it without an application server.
But when I want to create a new project, I'm essentially given two choices, Web Application and Enterprise Application.
A WebApp lets me use all of the Java EE specification, the application server takes care of instantiation, life cycles, clean up for me. Good, the point is that in order to run my code I need a web page (with a servlet and an html page). Is there anyway I can avoid this and have a "normal" application? (Point is, I quite dislike writing HTML code, I would rather use a command line app anyday).
I tried to create an enterprise app, but it creates three projects (EJB, web, and another). I honestly don't know what to touch here, and the presence of the web project kinda tells me that I would still need to write html and serlvets.