Angular EE
=============
A reference implementation for how to build an Angular JS application backed by a JavaEE RESTful API.
Features
---
This app showcases the following features ([related blog post](http://nayidisha.com/techblog/angular-js-from-a-different-angle "AngularEE")):
- How to build layers in an Angular JS MVC stack.
- How to write tests for each layer of the Angular stack
- How to run Angular and Server-side tests during the build
- How to make the Angular stack aware of the environment it is running in.
- Use [d3](http://d3js.org/) to render basic charts via angular directives.
Demo
---
View a demo [here](http://pointy-nayidisha.rhcloud.com/pointy)
<s>Related Blog Post</s>
----
<s>See [here for a blog post](http://nayidisha.com/techblog/angular-js-from-a-different-angle "AngularEE") explaining this effort.</s>
Checkout
---
Clone or fork [the repository](https://github.com/pankajtandon/PointyPatient "PointyPatient") in your workspace under a directory we will call $POINTY_HOME
Build
----
The build of the Angular __plus__ the Java stack is done using [maven](http://maven.apache.org/).
This will run unit tests and build the two war's (pointy-web and pointy-api).
Once you have downloaded and installed maven, please do the following:
`cd $POINTY_HOME`
`mvn clean install -f pointy-parent/pom.xml `
followed by:
`mvn clean install -f pointy-parent/pom.xml -Pall,dev `
Run all tests
---
The below commands run unit tests _and_ integration tests. This translates to *Jasmine Unit* tests and *E2E Selenium Integration tests* on
the Angular stack and *Spring MVC tests*, *Spring Transactional Tests* and JUnit tests using *Mockito* on the Java stack.
`cd $POINTY_HOME`
`mvn clean install -Pall,dev,alltests -f pointy-parent/pom.xml`
Run the app
---
The app can be seen in action by deploying the apps (pointy-web.war and pointy-api.war) to a jetty server running on port 9020 of localhost.
The jetty server can be started by doing the following:
`cd $POINTY_HOME`
`mvn clean install -f pointy-parent/pom.xml -Pall,alltests,dev`
`mvn jetty:run -Palltests,dev -f pointy-web/pom.xml`
Next, fire up a browser and navigate to localhost:9020/pointy
Register, Edit, Delete or List patients.
By doing this you are interacting with an Angular app (pointy-web) in the browser and using REST calls going out to pointy-api,
also, incidentally, hosted on the same server. Note, tho' that if you host pointy-api on a different server, then either a CORS solution
will need to be implemented (via a CORS filter maybe), or we have to change the app to accept application/javascript
instead of application/json (JSONP).
TODOs
---
The following still need to be accomplished. Pull Requests are welcome:
- Complete E2E tests using jQuery
- Write a Spring Service level unit test
- Write a Spring Service level Integration Test
- Write a Spring Repository level unit test
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
JS application backed by a JavaEE RESTful API (115个子文件)
bootstrap.css 119KB
bootstrap.min.css 99KB
bootstrap-datepicker.css 10KB
jasmine.css 2KB
app.css 968B
.gitignore 567B
SpecRunner.html 3KB
index.html 2KB
Patient.html 2KB
PatientList.html 858B
PieChart.html 485B
BarChart.html 450B
runner.html 226B
index.html 59B
favicon.ico 1KB
ReportingControllerFunctionalTests.java 6KB
PatientControllerFunctionalTests.java 5KB
PatientController.java 3KB
DefaultGenericDAO.java 2KB
Patient.java 2KB
E2ETests.java 2KB
PatientServiceImpl.java 2KB
ReportingServiceImpl.java 2KB
ReportingController.java 1KB
DateDeserializer.java 1KB
ApiResponse.java 912B
DateSerializer.java 736B
PatientDAOImpl.java 685B
PointyObjectMapper.java 570B
VisitFrequency.java 557B
ResourceDAO.java 524B
PointyRuntimeException.java 463B
GenericDAO.java 425B
PatientService.java 355B
PatientDAO.java 244B
ReportingService.java 205B
angular-scenario.js 783KB
angular.js 465KB
jquery-ui-1.10.3.js 426KB
d3.v3.js 302KB
jquery-1.10.2.js 267KB
d3.v3.min.js 140KB
ui-bootstrap-tpls-0.4.0.js 107KB
angular.min.js 76KB
jasmine.js 68KB
bootstrap.js 62KB
angular-mocks.js 54KB
underscore.js 40KB
bootstrap-datepicker.js 32KB
restangular.js 31KB
bootstrap.min.js 28KB
angular-sanitize.js 17KB
jasmine-jquery-1.4.2.js 17KB
angular-resource.js 16KB
underscore-min.js 13KB
restangular.min.js 10KB
angular-loader.js 9KB
xdate.js 7KB
jasmine-html.js 7KB
PatientControllerSpec.js 5KB
angular-cookies.js 5KB
jasmine.console_reporter.js 5KB
angular-sanitize.min.js 4KB
PatientServiceSpec.js 3KB
PatientController.js 3KB
ReportingServiceSpec.js 3KB
PointyBarChart.js 3KB
angular-resource.min.js 2KB
PointyPieChart.js 2KB
app.js 2KB
PointyDateService.js 2KB
scenarios.js 1KB
PatientService.js 1KB
ReportingService.js 1KB
jasmine.async.js 1KB
angular-loader.min.js 881B
PieChartController.js 833B
angular-cookies.min.js 792B
BarChartController.js 563B
CommonController.js 473B
DatePicker.js 418B
console.js 227B
jasmine_spec_runner_fixtures_path.js 93B
user.json 115B
index.jsp 27B
README.md 3KB
glyphicons-halflings.png 12KB
glyphicons-halflings-white.png 9KB
common.properties 293B
test.properties 104B
prod.properties 61B
prod.properties 59B
dev.properties 45B
qa.properties 45B
version.txt 6B
pom.xml 11KB
checkstyle.xml 9KB
pom.xml 8KB
pom.xml 5KB
pom.xml 5KB
共 115 条
- 1
- 2
资源评论
zero2100
- 粉丝: 163
- 资源: 2464
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功