HTML5 Java web app with latest and greatest components.
With Tobacco, you can create modern good-looking Java webapp with simple one-liner
and start experimenting or coding real stuff few seconds later without configuration headache.
Real website is worth thousands of words, so I setup Tobacco Demo for you to check.
Make sure you have the latest Maven installed, at least version 3.0.4 is required
The generation of Tobacco projects is super-simple one-liner. You don't need to install anything, just anytime you are ready to rock the world with new project:
This will automatically use the latest Tobacco Bootstrap version found in Maven Central.
Now your project is generated, it is recommended to setup SCM. git is meant to be used:
cd <app-name> git init git add -A # .gitignore is already provided there for you git commit -a -m 'initial commit'
Now you're ready to go:
cd <app-name>-webapps mvn package t7:run
after few minutes of terrifying console output, you can hope to access your new app at
Read through README to get an idea how to get most from Tobacco.
Tobacco tries it's best to always include the latest release versions of most popular client libraries.
Latest Tobacco 1.0.15 charges you with Spring 3.2.4, Twitter Bootstrap 3.0.0, jQuery 2.0.3 and Backbone.js 1.0.0.
All components are of latest versions and Tobacco makes sure to keep itself on the edge.
- Twitter Bootstrap 3.0.0 for your UI to not suck
- HTML5 boilderplate 4.2.0 for your result HTML to use best practices available
- Modernizr.js 2.6.2 to make your app display good on anything
- Normalize.css 2.1.3 for your app to look consistent
- jQuery 2.0.3 for you to write less and do more
- Backbone.js 1.0.0 to make your JS code to be organized more MVC-ish
- LoDash.js 1.3.1 to give you powerful common library
- dust.js 2.0.2 for you to use the fastest client-side templating engine on the planet
- dust4j 0.5.2 to let you write your templates in pure JSP and make them dynamic
- Spring 3.2.4 for wiring your components
- Spring Security 3.2.0M2 for your app to be secure
- Tiles 3.0.1 to organize your views
There is some dozen of other smaller and less important stuff that you find adding to any new project all the time, because it's useful or just convenient.
Work of H5BP and TB was combined and Bootstrap is used by default, but you can still easily fallback and use plain H5BP if you don't intend to use TB
I didn't bother to configure JPA to create another zillion-and-one archetype for 3-tier Spring web app. It's not cool and overkill to require full-blown JPA persistence and/or ORM mapping for any project. If you need it - you can still set it up though.
All needed stuff is still there for you to configure or remove at all if you don't need it - it's just commented out and not used from start.
As for security, there is simple form authentication workflow setup with single user, just to give you something to start with. That way you can use home page for experiments and for more serious work you have boring stuff done for you already.
I always thought Java can do no less than RoR or any other fancy whistle framework out there without any mimicking aka Roo. So I decided to create this client-centric archetype that is always packed with latest JS and Java libraries, uses all the latests best practices and called it Tobacco because it's addictive!
Tobacco shows how Java can do modern projects in 5 seconds in it's own style. It doesn't dictate you to three-tiers if you do something simple, nor does it tells you which persistence layer to use, instead it tries its best to save your time on starting and setting up new web project and not be in the way after that.
Another focus of Tobacco is to be simple and to make toy projects easy and serious projects possible. Sometimes I just need to create project, experiment with Mongo, JS etc for an hour and forget it, so why do I need JPA and H2 or Postgres database then? That's kind of archetype that Maven Central is so full of. So I put inside everything that will be definitely useful, prepared configs that I hate searching for, got the latest and best client libs from the wild and called it Tobacco :)
Yes. You don't need to download Tobacco or install it. Thanks to the power of plugins and Internet, Maven does the magic for you. Make sure you have the latest Maven installed, at least version 3.0.4 is required.
Thanks to Maven guys, you made this possible (http://maven.apache.org/).