Skip to content

jcote/canvass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canvass

Requirements

  • Java 7
  • Maven 3
  • npm install instructions
  • Grunt, Bower npm install -g grunt-cli bower
  • MySQL
    • Create the database:
      • Run mysql -u root
      • Execute in MySQL: create database canvassweb; and create database canvasswebtest;
      • Exit MySQL shell
    • Set your MySQL password:
      • Run mysqladmin -u root password "newpassword"
      • Create a hibernate.properties file in canvass-web-main/src/main/resources
        • Use something like hibernate.connection.url = jdbc:mysql://localhost:3306/canvassweb?autoReconnect=true
      • Create a hibernate.properties file in canvass-web-test/src/main/resources
        • Use something like hibernate.connection.url = jdbc:mysql://localhost:3306/canvasswebtest?autoReconnect=true
      • Set the fields hibernate.connection.username and hibernate.connection.password to be root, "newpassword"
      • Advisable to create a 'canvass' user instead of using root
      • Don't commit changes to hibernate.properties, unless you want your password permanently stored in github history

Build

  • From base directory
  • Run mvn install

Run Embedded Server

Run Executable WAR

  • From base directory
  • Run java -jar canvass-web-exec/target/canvass-web-exec-1.0-SNAPSHOT-war-exec.jar
  • Visit http://localhost:8080/

Run Integration Test

  • From base directory, or canvass-web-test
  • Run mvn integration-test
  • This will start an embedded Tomcat server with Selenium and run integration tests in Surefire

Architecture

: Implemented,: Not Implemented

✓ Tomcat 7 (Web Host)

✗ JBoss AS7 (Potential Web Host)

  • After reading the great java server app debate report, and discovering that Glassfish has just been ditched by Oracle, JBoss (recently renamed Wildfly) seems the best option. It supports JavaEE, has a great management web console, and commercial support available. Wildfly RC8 was released in december, and a stable version is coming soon but it is too early to use it.

✗ RestExpress (Future REST API)

  • Built with Netty/IO for faster zero-copy, event-driven service (Node.js is event-driven)

✓ Jersey (Current REST API)

✓ Guice (Dependency Injection)

✓ Maven (Java Build)

✓ Hibernate (DAL)

✓ MySQL (DB)

✓ Bootstrap (Visuals)

✓ Coffescript Compiling (Frontend)

✓ Sass Compiling (Style)

✓ AngularJS (Frontend)

✓ Surefire/JUnit (Java/Server Testing)

✓ Selenium/WebDriver (Integration Testing)

✓ Protractor/Jasmine (Javascript/Client Testing)

  • Use Protractor, which supplants Karma as the recommended test framework for AngularJS

✓ Grunt (Javascript Build)

✓ Sailthru (Email)

✗ Logback (Logging)

Source File Locations

Notes

  • mvn compile will not work on canvass-web-test and therefore not on canvass-web
  • Use mvn install instead

About

Interactive government portal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •