-
Notifications
You must be signed in to change notification settings - Fork 1
Home
If you're visiting from another team project, then check out the Integration page which details how we plan on integrating with the other teams.
If you're here looking to kick the tires, then perhaps start your tour from the right navigation sidebar to learn about the structure and contents of the project.
This guide will get you quickly up to speed with the WE99 Dose Response Analysis System so you can start contributing. The system is a web application that relies on a java server backend and an AngularJS-based frontend. You can find and clone the repository from here: https://github.com/massfords/we99 Building the server:
- Install Maven
- Install NPM
- Install Bower and Grunt Globally:
npm install -g grunt-cli bower - Clone the repo onto your machine: https://github.com/massfords/we99. I will assume for now that this is (/home/jharvard /we99)
- go into the parent folder (/home/jharvard /we99) and run: “mvn clean install”
- Let the program install.
NOTE: The very first build will take some time because maven needs to retrieve all of the third-party dependencies from various repositories. All subsequent builds should be much faster after these dependencies are retrieved. - Change directories into the child folder 'we99-web'
- Load up the server. In the directory '/home/jharvard/we99/we99-web' run:
mvn clean jetty:run - You’re all set. Assuming default settings you should now be able to see the site at: http://localhost:8080/we99
#Account Creation: The system takes advantage of role based security. It is implemented in the backend using the spring security suite. To get access, you will need to create an account. A step-by-step guide to account creation can be found here: https://github.com/massfords/we99/wiki/Users:---Login-and-Create-Account
#Stack and Libraries
##Front-End (shipped):
- AngularJS
- Bootstrap 3
- Angular-UI
- Smart-Table
- D3
##Front-End (development):
- Yeoman
- Grunt
- Karma / Jasmine
- Bower
- Istanbul
- PhantomJS
##Back-End (shipped):
- Maven
- Spring
- Spring Security
- JAXRS
- Jetty
- H2
##Back-End (development):
- Clover
- JUnit
#File Structure
The files are separated into several maven sub-modules that are all aggregated by the maven ‘parent’ module.
##Backend and Overall File Structure
we99-parent : The parent module
|-- we99-test : Contains some helper classes useful for unit and integration testing.`
|-- we99-util : General utility class used across modules`
|-- we99-domain : Core domain and service interfaces`
|-- we99-domain-impl : Service implementations and supporting implementation classes`
|-- we99-jpa : Implementation of the storage interfaces that uses JPA.`
|-- we99-ddl : Module for the dynamic generation of the DDL file for our H2 database.`
|-- we99-web : Frontend code and REST service integration tests.`
More Details can be found here: https://github.com/massfords/we99/wiki/Project-Modules#modules
The application’s java code adheres to maven’s default layout for directories in modules. Ths makes sure that we minimize configuration issues. For example, like maven’s standard guidelines, java source code will be accessible from the modules ‘src/main/java’ folder, config files and other resources should be in in the ‘src/main/resources’ folder and the test files should follow the same folder structure as the source files except that instead of ‘src/main’ the paths are in ‘src/test’.
The one exception are for cases where there are generated files from plugins that don't place the files in the expected output directories.
More details can be found here: https://github.com/massfords/we99/wiki/Project-Modules#folder-structure
##Front End File Structure
The front end is based off of the Yeoman Angular Generator. You can find full details in the following link: http://yeoman.io/codelab/review-generated-files.html
Key details include:
- index.html – where all the javascript is linked
- app.js – where all the angular routes and main configurations reside.
- scripts/ - folder with all the js files
- views/ - folder with the angular templates
- styles/ - folder holding all the css
#REST Service Calls The service calls that connect the front end to the back end generally follow REST practices but not entirely. Calls are generally formed as such:
VERB http://{{server}}/services/rest/{{object}}/{{id}}
where:
- VERB – HTTP verb (GET, PUT, POST, DELETE)
- server – the address of the backend server
- object – the object in question, e.g., the object for getting a list of experiments is experiment.
- id – the id of the object if a particular object is being queried.
The main deviations from the REST practice is as follows:
- We use PUT for creation of a new item and POST to an update an existing item.
- When querying for a list of items, instead of returning a list, we return a json object. This lets us also provide metadata such as the total count, page, and offset details.
The REST interface is implemented using JAXRS. See the below slide for more details:
For a list of rest service calls, please load up the server and refer to the swagger page (assuming you are running the server on localhost port 8080): http://localhost:8080/we99/swagger/?url=http://localhost:8080/we99/services/rest/api-docs
#Testing: Backend testing can be run through the maven test runner. It depends on JUnit. Integration Tests are located under the we99-web module in the ‘src/test/java’ folder. Frontend testing is built off of Karma/Jasmine for unit testing and Protractor/Selenium for end-to-end testing. These files can be found in the we99-web module under ‘src/main/test’ The folder structure of both the frontend and backend tests mirror the folder structure of the actual implementation.
#Further Details: The wiki is full of Details that go well beyond this getting started guide, including discussion about the analysis pages and algorithms, architecture diagrams, charts, text, and all other sorts of goodies. Please review it to delve deeper into the app: https://github.com/massfords/we99/wiki
- [Application Flow] (https://github.com/massfords/we99/wiki/Application-Flow-Mockups)
- Mockups
- Dose Response Curves
