Showing posts with label Devoxx2012. Show all posts
Showing posts with label Devoxx2012. Show all posts

2012/11/16

Devoxx2012: mgwt - GWT goes mobile - Daniel Kurka

PhoneGap: hybrid web app. http://phonegap.com
  • javascript
  • uses w3c standards (including future api's)
  • Web part / Native part
  • web part: uses local web browser (mostly webkit)
  • native part: called through special 'gap://...' urls
    • string parameters
    • asynchronous
  • temporary solution till browser capabilities are enhanced
GWT
  • compiles java to javascript
  • integrated debugging
  • deferred binding
  • optimal siz
  • can be combined with PhoneGap
mgwt http://www.m-gwt.com
  • native look and feel
  • optimizing compiler
  • local / offline support (appcache)
  • use css3 (faster and more flexible). E.g. Flexible box model http://hacks.mozilla.org/2010/04/the-css-3-flexible-box-model/
  • dead code removal: compilation per device

Devoxx2012: Search, the Final Frontier - Shay Banon

Elasticsearch features
  • uses lucene internally
  • Json / rest api + java library
  • web interface
  • distributed:
    • indexes: e.g. Time based indexes: logical grouping
    • shards, replicas
    • clusters
    • auto discovery of master
    • elected master: responsible for consistent state & does bookkeeping for new nodes
    • crashed master: logged, new master is auto-elected
    • move shards
  • other (lucene features)
    • whitespace analyser
    • stop word removal
    • keyword analyser: keep as string
    • ngram / soundex

2012/11/15

Devoxx2012 - Apache TomEE, JEE6 Web Profile on Tomcat - David Blevins

TomEE
  • Tomcat + Java EE
  • Java EE 6 Certified
  • young project: 1 year old (2011),
  • focus on
    • quality: testing
    • performance
    • low footprint (t1.micro linux image on amazon: 613 mb max)
    • tight integration of component's (no extra downloads etc)
TomEE exists in 3 flavors
  1. basic web profile (+ JavaMail) - certified
    • half of the JEE specs
    • missing in official web profile
      • corba, JAX-RPC
      • JAX-RS, JAX-WS
      • JMS, Connectors
  2. web profile + JAX-RS (new) - certified
  3. Plus: JAX-WS, Connectors & JMS - not certified
Integrates in Eclipse
  • dynamic web project
  • eclipse run as... run on server
  • embedded Debug adapter
Modern JEE6 demo's with TomEE
  • ejb:
    • @javax.ejb.Singleton:
    • @javax.ejb.EJB: inject
  • @javax./jws.WebService -> automatic wsdl / publishing.
  • @javax.ws.rs.... -> REST.
  • CDI:
    • bean.xml in WEB-INF
    • pojo + @javax.inject.Inject
Testing & certifcation:
  • very large TCK certification testsuite (+/- week)
  • test infrastructure on Amazon EC2 to speed up certification process
Attention points when choosing plain Tomcat instead of TomEE:
  • slower: lots of annotation scanning
  • bloated memory from duplicate classes
  • incomplete: OpenJPA, OpenWebBeans, JNDI
  • no extensive tests from JEE TCK
TomEE+Arquillian
  • arquillian
    • testing framework
    • junit based @RunWith("Arquillian")
    • create & deploy small war with selected classes to test functionality
    • distributed testing
  • adapters included
  • integrated debugging
Maven integration:
  • tomee-maven-plugin
  • configure servers
  • start/stop servers
  • deploy / undeploy
random TomEE stuff:
  • Jelastic: Cloud provider with upcomming TomEE support.
  • collects & reports multiple errors instead of stopping on the first problem
  • META-INF/resources.xml + @Resource (without spring) 
  • config:
    • tomee.xml:
      • hybrid xml+properties config for readability (cfr apache httpd config)
      • human readable durations
    • or xml alternative: properties: conf/system.properties (can be mixed)

Devoxx2012: Bootstrapping Android Apps with Open Source - Jake Wharton

Libraries:
  • ActionBarSherlock: backport of the actionbar.
  • ViewPagerIndicator: indicates swype action
  • NineOldAndroids: backwards compatibility of animation api
  • Otto: gueva eventbus.  E.g. Async access to the location api.
  • Dagger: dependency injection - @Module @Provide
  • RetroFit: client Rest-access
  • Tape: save locally on unreliable network
  • Activitycompat2: activity backport
  • PonyCrossing
  • Pollexor
  • OkHttp
  • Spoon: test tool

Devoxx2012: OAuth 2 and Identity - Tim Bray & Nicolas Garnier

Google's focus:
  • Oauth2
    • framework -> no guarantee on interoperability
    • core is frozen
  • Openid Connect
    • protocol
    • based on Oauth2
    • "Oauth2 for login"
Javascript-only flow:
  • register for client id + select API's ("scopes")
  • redirect to google.com in popup
  • access token is returned
    • 3600s timeout -> re-logon after that
  • optionally use gapi library (apache license)
  • redirect back to original page + use access token to access the google api's
Server side api:
  • register to get "super-secret" clientid
  • no popup needed
  • redirect to google
  • extra servers-side step: get code id.
  • logon not limited in time (occasional serverside refresh for access token neede)

Mobile
  • embedded browser: no sso -> re-logon
  • call external browser: less user friendly / extra security measures needed
  • Android specific: GoogleAuthUtil
other:
  • AccountChooser framework (javascript-based)