The Modern Java Web Developer Bootcamp
The Modern Java Web Developer Bootcamp
Founder of AppFuse
Bus Lover
Blogger on raibledesigns.com
@mraible
Topic Inspiration
Inspired by Ben Evans and Martijn Verburgs The Well-Grounded
Java Developer
Vital techniques
@mraible
Purpose
JVM
#DV13
@mraible
@mraible
Fast Hardware
#DV13
@mraible
IntelliJ IDEA
#DV13
@mraible
!
!
!
!
!
@mraible
Java 7 and 8
Strings in switch statements
Diamond Syntax
#DV13
@mraible
Java 7 and 8
Parallel Collections
@mraible
Java 8 Parallelism
Servlet 3
Asynchronous Servlets
@mraible
Reactive Applications
Users expect millisecond response times and 100% uptime. Data
needs are expanding into the petabytes.
#DV13
@mraible
Event Streams
Stateful Clients
#DV13
@mraible
Avatar?
#dv13javaweb$
#DV13
avatar.java.net
@mraible
Scala
Venkat Subramaniam
Scala is like the dragon in Avatar. It will try to kill you, but if you master
it, you can fly great distances with it and have a wonderful time.
#DV13
@mraible
Scala Basics
def starts a method
#dv13javaweb$
#DV13
@mraible
#dv13javaweb$
#DV13
@mraible
#dv13javaweb$
#DV13
@mraible
#dv13javaweb$
#DV13
@mraible
#dv13javaweb$
#DV13
@mraible
Or not?
#dv13javaweb$
#DV13
@mraible
2.25
2
1.5
0.75
0
#DV13
Scala
Groovy
@mraible
Learning Scala
Scala for the Impatient - Cay Horstmann
Signup at https://www.coursera.org/course/progfun
#DV13
@mraible
http://redmonk.com/sogrady/2012/02/08/language-rankings-2-2012/
#dv13javaweb$
#DV13
@mraible
#dv13javaweb$
#DV13
@mraible
#DV13
@mraible
#DV13
@mraible
#DV13
@mraible
Fast APIs
Dropwizard
#DV13
@mraible
Jobs on dice.com
JVM API Frameworks, November 2013
600
564
450
300
150
#dv13javaweb$
#DV13
172
Grails
30
84
Play
JAX-RS
Spring MVC
@mraible
Skills
JVM API Frameworks, November 2013
20,000
19228
18128
15,000
10,000
5,000
#dv13javaweb$
#DV13
5784
Grails
Play
4132
JAX-RS
Spring MVC
@mraible
Trends
#dv13javaweb$
#DV13
@mraible
Job Trends
Absolute
#dv13javaweb$
#DV13
Relative
@mraible
Absolute
#dv13javaweb$
#DV13
Relative
@mraible
1125
Grails
1218
Play
222
Dropwizard
#dv13javaweb$
#DV13
325
650
975
1300
@mraible
14,000
10,500
7,000
3,500
#dv13javaweb$
#DV13
Grails
Play
JAX-RS
Jersey
Dropwizard
@mraible
#DV13
@mraible
Modern Principles
HTTP Overview
Request / Response Protocol
Features:
Keep-Alive
HTTP Secure
Binary
Compression
#DV13
@mraible
HTTP Methods
1.0 defined GET, POST and HEAD
#DV13
@mraible
Allows the server to actively push resources to the client that it knows
the client will need
#DV13
@mraible
Browser Tools
Firebug for FireFox
Settings
PageSpeed Insights
http://www.igvita.com/slides/2012/devtools-tips-and-tricks
#DV13
@mraible
HTML5
http://on.wsj.com/tEGIJL
#DV13
@mraible
HTML5 Forms
<form> !
<input type=text placeholder=Enter your search terms> !
<input type=submit value=Search> !
</form>!
<form> !
<input type=text autofocus> !
<input type=submit value=Search> !
</form>!
<form> !
<input type=text required> !
<input type=submit value=Search> !
</form>!
http://diveintohtml5.info/forms.html
HTML5 Forms
<form> !
<input type=email> !
<input type=submit value=Go> !
</form>
#DV13
@mraible
#DV13
@mraible
HTML5 Storage
Web Storage APIs: localStorage / sessionStorage
IndexedDB
Application Cache
File* APIs
#DV13
@mraible
window.localStorage
Simple key / value store
#DV13
@mraible
window.sessionStorage
Same as localStorage
#DV13
@mraible
IndexedDB
Application Cache
File APIs
#DV13
@mraible
Browser Support
#DV13
@mraible
CSS3 Secrets
Animated Transitions
Rounded Corners
Drop Shadows
Gradient Colors
transform: rotateY(180deg);
border-radius: 8px 8px 0 0;
box-shadow: 2px 2px 4px 4px;
#DV13
http://lea.verou.me/css3-secrets
@mraible
#DV13
http://f.cmiscm.com
@mraible
JavaScript
The Good Parts
Lambda
Dynamic Objects
Loose Typing
Object Literals
#DV13
@mraible
JavaScript Tips
http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
#DV13
@mraible
Singleton
Module Pattern
Custom Objects
http://www.klauskomenda.com/code/javascript-programming-patterns/
#DV13
@mraible
jQuery
http://trends.builtwith.com/javascript/jQuery
jQuery
http://trends.builtwith.com/javascript
$(document).ready
#DV13
@mraible
CoffeeScript
AngularJS
A JavaScript MVW Framework
@mraible
AngularJS Basics
#DV13
@mraible
#DV13
@mraible
http://bit.ly/UICDZi
My Angular JS Experience
http://vimeo.com/mraible/angularjs-deep-dive
#dv13javaweb$
#DV13
@mraible
Web Components
Templates
Decorators
Custom Elements
Shadow DOM
Imports
#DV13
@mraible
Polymer
Polyfills
Set of UI Components
#DV13
@mraible
Bootstrap
Good-looking websites by default
#DV13
@mraible
http://static.raibledesigns.com/bootstrap3
#DV13
@mraible
4. Gzip Components
#DV13
@mraible
#DV13
@mraible
http://spritecow.com is great
#DV13
@mraible
Wro4j
Open Source Java project for optimization of
web resources
http://webjars.org
http://tuckey.org/urlrewrite
#DV13
@mraible
Techniques
Versioning Static Assets with UrlRewriteFilter
http://raibledesigns.com/rd/entry/
versioning_static_assets_with_urlrewritefilter
http://www.operatornew.com/2012/10/adding-webresource-fingerprinting-to.html
#DV13
@mraible
http://kevinworthington.com/nginx-for-mac-os-x-mountain-lion-in-2minutes/
@mraible
http://vimeo.com/mraible/page-speed-demo
/etc/httpd/conf.d/deflate.conf
<IfModule mod_deflate.c>!
!
SetOutputFilter DEFLATE!
!
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
application/xml application/xhtml+xml application/rss+xml application/javascript
application/x-javascript!
!
DeflateCompressionLevel 9!
!
BrowserMatch ^Mozilla/4 gzip-only-text/html!
BrowserMatch ^Mozilla/4\.0[678] no-gzip!
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html!
!
DeflateFilterNote Input instream!
DeflateFilterNote Output outstream!
DeflateFilterNote Ratio ratio!
LogFormat '%r %{outstream}n/%{instream}n (%{ratio}n%%)' deflate!
</IfModule>
/etc/httpd/conf.d/expires.conf
<IfModule mod_expires.c>!
ExpiresActive On!
<FilesMatch \.(jpe?g|png|gif|js|css)$>!
ExpiresDefault access plus 1 week!
</FilesMatch>!
ExpiresByType image/jpeg access plus 1 week!
ExpiresByType image/png access plus 1 week!
ExpiresByType image/gif access plus 1 week!
ExpiresByType text/css access plus 1 week!
ExpiresByType application/javascript access plus 1 week!
ExpiresByType application/x-javascript access plus 1 week!
</IfModule>
http://raibledesigns.com/rd/entry/improving_appfuse_s_pagespeed_with
Load Testing
Performance Monitoring
#DV13
@mraible
Google Analytics
#DV13
@mraible
Application Architecture
Server to Client
Performance implications
Airbnb
Charm
Mobile Devices
If developing a mobile app with web
technologies
#DV13
@mraible
#DV13
@mraible
#DV13
@mraible
FastClick
Polyfill to remove click delays on browsers with touch UIs
Mobile Safari on iOS 3+, Chrome on iOS 5+, Chrome on Android, Opera
Mobile 11.5+, Android Browser since Android 2, PlayBook OS 1+
https://github.com/ftlabs/fastclick
#dv13javaweb$
#DV13
@mraible
#dv13javaweb$
#DV13
@mraible
PhoneGap
#dv13javaweb$
#DV13
@mraible
Background Modes
#dv13javaweb$
#DV13
@mraible
Lessons Learned
Develop Mobile Client first
#DV13
@mraible
The Cloud
#DV13
@mraible
The Cloud
Supports Ruby, Node.js, Clojure, Java, Python and Scala
#DV13
@mraible
The Cloud
Supports Spring, Grails, Scala, Play, Node.js, Ruby/Rails/
Sinatra
#DV13
@mraible
The Cloud
Apache TomEE
#DV13
@mraible
Security Matters
Be aware of SQL and Content Injection
@mraible
OWASP
The Open Web Application Security Project (OWASP) is a worldwide
not-for-profit charitable organization focused on improving the security
of software.
http://www.owasp.org
#DV13
@mraible
OWASP Top 10
1. Injection Flaws
2. Broken Authentication
3. XSS
8. CSRF
5. Security Misconfiguration
10.Unvalidated Redirects
https://www.owasp.org/index.php/Top_10_2013-Top_10
#DV13
@mraible
#DV13
@mraible
#DV13
@mraible
https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project
Fixing Vulnerabilities
<session-config>!
<session-timeout>15</session-timeout>!
<cookie-config>!
<http-only>true</http-only>!
<secure>true</secure>!
</cookie-config>!
<tracking-mode>COOKIE</tracking-mode>!
</session-config>!
!
!
<form action="${ctx}/j_security_check" id="loginForm" !
method="post" autocomplete="off">!
#DV13
@mraible
Bans inline <script> tags, inline event handlers and javascript: URLs
Supported in Chrome 16+, Safari 6+, and Firefox 4+, and (very) limited
in IE 10
#DV13
@mraible
@mraible
Staying Modern
Read
Attend Conferences
Submit a talk!
Write
Do
Get Paid
Open Source
#dv13javaweb$
#DV13
@mraible
People do.
#dv13javaweb$
#DV13
@mraible
Questions?
Contact Me!
http://raibledesigns.com
@mraible
Presentations
http://slideshare.net/mraible
Code
http://github.com/mraible