Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Scaffold for vraptor 3

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

Vraptor Scaffold

Scaffold for vraptor 3.

Installation

gem install vraptor-scaffold --pre

Dependencies

Ensures that you already have installed:

  • Java 6

  • Maven 2

Getting Started

At the command line client:

  • vraptor new myapp

  • Change directory into myapp

  • vraptor scaffold product name:string value:double

  • vraptor start

  • Go localhost:8080/products

Tests

At the command line client:

  • Running: mvn clean test

  • Code coverage: mvn clean cobertura:cobertura

Web Server

The default web server is jetty but you can import the project in your favorite ide and run your project with tomcat or jboss as for example.

Supported Java Types

The only supported types for now are: boolean, double, float, short, integer, long, string and text.

Architecture Overview

When you run vraptor new command will be created a java web application with:

  • Vraptor3 = Controller

  • Jpa(Hibernate and Hibernate Validator) = ORM

  • Freemarker = Template Engine

  • Sitemesh = Decorator

  • Maven2 = Project Management

  • jQuery = JavaScript

  • Junit

  • Hamcrest

  • Mockito

Description of Contents

src/main/java/app/controllers

Controllers will be placed here.

src/main/java/app/models

Models will be placed here.

src/main/java/app/repositories

Repositories will be placed here.

src/main/webapp

Web root folder.

src/main/webapp/decorators

Decorators will be placed here.

src/main/webapp/javascripts

JavaScripts will be placed here.

src/main/webapp/stylesheets

CSS will be placed here.

src/main/webapp/WEB-INF/views

Views will be placed here. Ex: product/index.ftl

src/test/java/app/controllers

Tests to controllers will be placed here.

src/test/java/app/models

Testes to models will be placed here.

src/test/java/app/repositories

Tests to repositories will be placed here.

Where next?

  • Anothers build framework like ant, gradle and ivy.

  • More views generators like velocity, jsp and scaml.

  • More ORM generators with openJPA and TopLink.

  • Relationship(ManyToOne, OneToMany, etc) and date(LocalDate, LocalDateTime, LocalTime) support.

  • JPA2 support.

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don't break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Author

– Rodolfo Liviero [rodolfoliviero@gmail.com] @rodolfoliviero

Copyright

Copyright © 2010 Rodolfo Liviero. See LICENSE for details.

Something went wrong with that request. Please try again.