6. Two projects
Project with static
Project with static
content
content
-JavaScript
-JavaScript
-CSS
-CSS
-HTML files
-HTML files
What type of
What type of
project is this?
project is this?
Web Application
Web Application
(WAR)
(WAR)
with
with
JAX-RS services
JAX-RS services
7. Web Fragments
• Since the servlet 3.0 specification
– Web Resources can exist in external Jar files
• Web archive structure:
Content Web Application
Content Web Application
(WAR)
(WAR)
Static content JAR
Static content JAR
WEB-INF
WEB-INF
META-INF
META-INF
Classes
Classes
JAX-RS classes
JAX-RS classes
resources
resources
JavaScript
JavaScript
Static content JAR
Static content JAR
Other depencencies
Other depencencies
CSS
CSS
HTML
HTML
9. How to develop in application server?
• Every JavaScript change a redeploy?
– NO!
Life reload
Life reload
Application server
Application server
Node JS server for JavaScript
Node JS server for JavaScript
With GRUNT
With GRUNT
Static JavaScript
Static JavaScript
content
content
JAX-RS application
JAX-RS application
JAX-RS calls
JAX-RS calls
10. Build integration
• Running by Maven
• In the Maven bootstraps the Grunt build
– Minimizing JavaScript files
– Bundling JavaScript
– Optimizing images
13. AngularJS AJAX: Abstraction levels
• AngularJS has extensive support for AJAX
– With the $http service, you can make AJAX calls
– The $resource service is for making RESTful AJAX
calls
For addressing
REST services
For non-RESTful
AJAX requests
Not for use in
production
code, this used
is for testing
13