Upload
marcus-hellberg
View
303
Download
0
Embed Size (px)
Citation preview
What is Polymer then?
– Helper library for building Web Components
– Comes with a collection of ready made Web Components
... the DOM is the framework
– Component model (= HTML elements)
– Data flow (= attributes, properties and events)
– Declarative format (= HTML)
– Extensible through Web Components
Building apps out of components
– Composition
– Encapsulation
– Mediator pattern
Business logic
API API
APIcomponent
child 1 child 2
Spring Boot
Takes an opinionated view of building production-ready Spring applications. Spring Boot favors convention over configuration and is designed to get you up and running as quickly as possible.
– Create stand-alone Spring applications
– Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
– Provide opinionated 'starter' POMs to simplify your Maven configuration
– Automatically configure Spring whenever possible
– Production-ready features such as metrics, health checks and externalized configuration
– Absolutely no code generation and no requirement for XML configuration
projects.spring.io/spring-boot
JWT authentication
Client Server
1. Login request (username/password)
2. token gets returned to browser Authenticate, create token
3. Request, token in header
4. Response Validate token
Some additional tools we'll use
npm – development time JS dependencies
bower – Polymer dependencies
gulp – JS based build tool used to run some optimization tasks
...integrated into Maven build process
server
<summary-panel>
<login-page>
<expenses-editor>
<expense-application>
<expenses-page>
<expenses-list>
Optimizing
vulcanize – combine all imports into one file
crisper – pull out all JS into separate file for CSP compliance
htmlmin & uglify – minimize assets
turn on server gzip
gulp.task('build', function() { return gulp .src(SRC_DIR + '/elements.html') .pipe($.vulcanize({ inlineScripts: true, inlineCss: true })) .pipe($.crisper()) .pipe($.if('*.js', $.uglify({ preserveComments: 'some' }))) .pipe($.if('*.html', $.htmlmin({ customAttrAssign: [/\$=/], removeComments: true, collapseWhitespace: true }))) .pipe(gulp.dest(DEST_DIR)); });