View on GitHub

Tobacco Bootstrap

Java just got it's own Initializr

Download this project as a .zip file Download this project as a tar.gz file

Tobacco Bootstrap

HTML5 Java web app with latest and greatest components.

With Tobacco, you can create modern good-looking Java webapp with simple one-liner

mvn me.noroutine:tobacco:generate

and start experimenting or coding real stuff few seconds later without configuration headache.

Demo

Real website is worth thousands of words, so I setup Tobacco Demo for you to check.

How to use

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:

mvn me.noroutine:tobacco:generate

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 http://localhost:8080/<app-name>

Read through README to get an idea how to get most from Tobacco.

FAQ

How up to date Tobacco is?

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.

What else inside?

All components are of latest versions and Tobacco makes sure to keep itself on the edge.

Client-side stuff

Server-side stuff

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.

What if I don't need Twitter Bootstrap?

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

About JPA, database access and security

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.

Why Tobacco exists?

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's focus is on providing modern stuff inside and make it easy to start a project with best of breed HTML5 templates and JavaScript libs, so you don't spend hours settings up the project, downloading libraries and placing them in correct locations. With Tobacco you always get's this done for you. All you need is generate your project and start coding.

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 :)

Does it really works that easy?

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

Thanks to H5BP and TB guys. You're the best and I just love you!

Thanks to GitHub and Sonatype, your service is awesome.

Thanks to Maven guys, you made this possible (http://maven.apache.org/).

About Noroutine

His name is Alex, his key fun, food and profit right now is Java and JavaScript and his way is doing that without much routine. If you're interested in having your own Alex on board don't hesitate to check more of his projects or connect with him on LinkedIn. This guy doesn't mess around!