adding doc on angularjs and reorganizing a bit security
authorAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Thu, 19 Feb 2015 13:59:17 +0000 (14:59 +0100)
committerAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Thu, 19 Feb 2015 13:59:17 +0000 (14:59 +0100)
projectsetup.md

index 12ae2ebe905de4c308779232e4b1a620adfd9bf3..9230b2f80a2de323026c38cc246c31835739f338 100644 (file)
@@ -1,25 +1,30 @@
+JACQ Architecture
+==============================
 
-### Links
+## Spring Documentation
 
-* http://spring.io/guides/gs/accessing-data-jpa/
-* http://projects.spring.io/spring-data-jpa/
-* http://docs.spring.io/spring-data/data-jpa/docs/current/reference/html/
+### spring boot
 
 * [spring boot starter POMs](http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-starter-poms)
-
 * [spring-boot-autoconfigure](https://github.com/spring-projects/spring-boot/tree/97cb7f096798ecd016de71f892fa55585d45f5eb/spring-boot-autoconfigure#spring-boot---autoconfigure)
-
 * [spring-boot-sample-data-eclipselink](https://github.com/dsyer/spring-boot-sample-data-eclipselink)
 
+### data jpa
+  * http://spring.io/guides/gs/accessing-data-jpa/
+  * http://projects.spring.io/spring-data-jpa/
+  * http://docs.spring.io/spring-data/data-jpa/docs/current/reference/html/
+
+### spring data rest
+ * http://projects.spring.io/spring-data-rest/
+
 ### Spring HATEOAS
 
 * https://github.com/spring-projects/spring-hateoas
 
-### EclipseLink
+NOTE: HATEOAS will make it a bit harder to retrieve the contents using AngularJS, see [Rapid prototyping with Spring Boot and AngularJS](http://g00glen00b.be/prototyping-spring-boot-angularjs/)
+
+BUT: If you're looking for an example of a JS app running on top of Spring Data Rest checkout github.com/gregturn/task-manager-app. It has Spring Data Rest, Spring Boot, and even a custom Spring MVC endpoint serving an angular front end working nicely with the hypermedia. >>> see __angular-hateoas__ below
 
-* Weaving 
-** http://www.eclipse.org/eclipselink/documentation/2.5/solutions/testingjpa004.htm
-** http://wiki.eclipse.org/Introduction_to_EclipseLink_Application_Development_%28ELUG%29#Using_Weaving
 
 #### @RepositoryRestResource
 
@@ -27,24 +32,96 @@ Adding the @RepositoryRestResource has a big advantage since this creates a HATE
 
 
 * http://stateless.co/hal_specification.html
-
+/home/andreas/tmp/mdwiki-0.6.2/
 ### spring boot & security
 
 * http://www.future-processing.pl/blog/exploring-spring-boot-and-spring-security-custom-token-based-authentication-of-rest-services-with-spring-security-and-pinch-of-spring-java-configuration-and-spring-integration-testing/
 
+### JPA & EclipseLink
+
+* Weaving 
+  * http://www.eclipse.org/eclipselink/documentation/2.5/solutions/testingjpa004.htm
+  * http://wiki.eclipse.org/Introduction_to_EclipseLink_Application_Development_%28ELUG%29#Using_Weaving
+
+### spring & Vaadin
+
+* http://stackoverflow.com/questions/1183801/should-i-use-vaadin-framework - VERY INTERESTING!
+
+[vaadin4spring](https://github.com/peholmst/vaadin4spring)
+
+This add-on adds support for Vaadin to Spring and Spring Boot, or Spring support to Vaadin, depending on your point of view ;-).
+This project is not yet an official Vaadin Spring add-on, but a Vaadin R&D prototype that I work on whenever I have time. I'm also using the add-on in several customer projects to make sure it meets the requirements of a real-world project.
+Please note! As of February 2015, Vaadin is working on an official Spring add-on which will be a small subset of Vaadin4Spring. Once the official add-on is released, Vaadin4Spring will be converted into a set of add-ons that provide features that the official add-on does not have. You can follow the progress of the official add-on here: https://github.com/vaadin/spring
+
+__Vaddin and memory leaks__
+
+http://zeroturnaround.com/blog/understanding-vaadin-sessions-with-xrebel/
+"Vaadin allows you to easily build interactive web applications by working with a familiar server-side architecture. The rich component model is usually driven by session state that is preserved for each instance of a Vaadin application. Each user and browser window will create such a new instance, which can make the size of your server-side sessions grow very quickly if you refer to too much data from your UI or accidentally create a memory leak.
+.....
+.....
+.....  you need to limit the results of your query or switch to a lazy loading container implementation like LazyQueryContainer.
+
 
 ### spring boot & angularjs
 
-* http://g00glen00b.be/prototyping-spring-boot-angularjs/
-* http://spring.io/blog/2015/01/12/spring-and-angular-js-a-secure-single-page-application
 * https://spring.io/guides/gs/consuming-rest-angularjs/
+* Angular JS and Spring Series - MUST READ!
+  * [Spring and Angular JS: A Secure Single Page Application](http://spring.io/blog/2015/01/12/spring-and-angular-js-a-secure-single-page-application)
+    *  compacting,compiling js files:  __wro4j__ (wro4j-maven-plugin) or bower and/or __grunt__.
+  * [The Login Page: Angular JS and Spring Security Part II](https://spring.io/blog/2015/01/12/the-login-page-angular-js-and-spring-security-part-ii)
+   * [The Resource Server: Angular JS and Spring Security Part III](https://spring.io/blog/2015/01/20/the-resource-server-angular-js-and-spring-security-part-iii)
+   * [The API Gateway Pattern: Angular JS and Spring Security Part IV](https://spring.io/blog/2015/01/28/the-api-gateway-pattern-angular-js-and-spring-security-part-iv)
+   * [SSO with OAuth2: Angular JS and Spring Security Part V](https://spring.io/blog/2015/02/03/sso-with-oauth2-angular-js-and-spring-security-part-v)
+* [Rapid prototyping with Spring Boot and AngularJS](http://g00glen00b.be/prototyping-spring-boot-angularjs/)
+  how you can write a good looking, responsive full CRUD application in less than 150 lines of code (100 lines of Java code and 50 lines of JavaScript), all thanks to a great Java framework (Spring) and a great JavaScript framework (AngularJS).
+  * uses [Bower](http://bower.io/) - A package manager for the web (requires Node and npm and Git.)
+  * alternative metioned in the comments: [WebJars](https://github.com/webjars))
 
-### example queries of the JAQC Web application:
+### spring boot & swagger
 
-* http://localhost:8080/specimens?page=1&size=20&sort=herbNummer,desc
+* a guy having problems with it: http://stackoverflow.com/questions/27861872/unable-to-get-swagger-ui-working-with-spring-boot
 
 
-## TODO 
+## js framework decision
 
-* configure security
+### AngularJs
+
+plugins:
+
+* [angular-hateoas](https://github.com/jmarquis/angular-hateoas)
+* [angular-spring-data-rest](https://github.com/guylabs/angular-spring-data-rest)  — based on angular-hateoas but designed specifically to consume Spring Data REST responses rather than vanilla HATEOAS objects
+
+* https://www.airpair.com/js/javascript-framework-comparison
+
+* http://stackoverflow.com/questions/14994391/thinking-in-angularjs-if-i-have-a-jquery-background
+__ngTerm Chaet Sheet:__ http://demisx.github.io/angularjs/2014/09/14/angular-what-goes-where.html
+
+__README:__ http://stackoverflow.com/questions/14049480/what-are-the-nuances-of-scope-prototypal-prototypical-inheritance-in-angularjs 
+
+### creating angularjs code from swagger definitions
+
+[Swagger to JS Codegen](https://github.com/wcandillon/swagger-js-codegen) generates a nodejs or angularjs class from a swagger specification file.
+
+There is a __grunt__ task that enables you to integrate the code generation in your development pipeline. 
+
+## JAQC Aplication
+
+### running the application
+
+In maven
+
+    mvn spring-boot:run
+
+In an IDE, just run the main() method in the application class
+
+To package and run as a standalone JAR, you can do this:
+
+    mvn package
+    java -jar target/*.jar
+
+### example queries of the JAQC Web application:
 
+* http://localhost:8080/specimens?page=1&size=20&sort=herbNummer,desc
\ No newline at end of file