Previous years I've been reasoning why JavaOne is better, so this year, I'll just settle for noting it's good to be here again. Sun general session opens the JavaOne as always, and I'm late because of the horrible traffic... Even though I'm on a motorcycle. Everything else is pretty much the same as previous years and that's a good thing in my books. Sun likes to announce big things in JavaOne and it's no different this year. The biggest thing is JavaFX brand, which by itself doesn't mean anything, but the way I read it, JavaFX Script is positioned as a direct competitor to Flash. Especially because under the same branding, they also publish JavaFX mobile - the same for mobile. I'm writing this the following day, and by now I'm sure "the blogosphere" is full of different takes on JavaFX, so google for more info. While different Java-integrated scripting engines existed even before Java SE 6, the official scripting engine support has validated the approach and created countless new Java scripting projects for specific tasks. So, JavaFX is another one of them, but this time for Sun.. for better or worse. Clearly geared towards multimedia, streaming, and graphics.. and if I'm not wrong, based on vector graphics, hopefully they endors SVG as format.
Besides JavaFX, there's many more interesting announcements in different sessions. Following my tradition, I go for sessions that are extremely bleeding and/or things not in my immediate area - on other things I can always read about from web. I've heard a lot of positive things about Groovy, but that's one language I *haven't* tried yet. Groovy is this "scripting" language that has full interoperability with Java and follows the Java syntax as closely as possible, without the annoyances. So for example, no needless getters and setters, no semi-colons, property-based access to everything etc. Scripting was in quotes, because with Groovy it's up to you: you can run Groovy as interpreted or you can choose to compile Groovy with the Grovvy compiler down to bytecode, indistinguishable from any native Java class. Groovy has been integrated into a number of projects already and I predict a bright future for Groovy.
I skipped most of the "boring" JSF sessions in the afternoon and instead opted out going for some session more out of my immediate area of expertise. I really had fun time in Sun SPOT session, which is Sun's new effort of creating a cheap-but good enough embedded system component, rather than just a single chip. Since laying out the wiring for chips in embedded systems is so expensive, SPOT takes the approach of providing a personal-area network and multiple connectors, like analog-to-digital-inputs, different sensors and a 32-bit ARM CPU running a version of JVM on "bare metal" plus a basic Java framework to handle the inputs. Pretty cool, no? So, they were demoing a home-made WII which didn't go entirely without trouble, but the point is bringing the cost down of building something like it by providing a common platform. Perrone System's "All you want to know about robotics and Java" continued on the same trails. They were focusing on building a higher-level Java framework to handle low-level I/O, like controlling servos or combining readingis of gyroscope and accelerometer so system developers could focus on higher level tasks - like "turn wheels 20 degrees" - rather than dealing with all the different states of servos, "oversteering" etc. In the end, they showed a video with all the applications built on using the framework, among them a car participating a DARPA autonomous driving challenge and side-parking the car by itself! The future truly is here.
The session I needed to stick around till 10pm at Moscone center was however about the ruby-like frameworks in Java: Grails, Sails and Trails. It was rather interesting to hear somebody else talking about a framework you are developing, namely Trails. Even though I noticed his information was a little - since I've been rather active on Trails in the past two monst, most of documentation is completely re-written and there's a lot of other minor improvments - Trails was fairly accurately presented and faired well against the others. However, I was mostly interested in Grails as though I had heard about it, I had never tried it out. Of course, I was looking for synergies there, but as Trails is very much a Tapestry framework, and Grails uses their custom view technology, there isn't a way the projects could be easily combined. Nevertheless, using Groovy for coding Trails is certainly possible and something I might look into in the future in order to make it easier for the users.
As in previous years, my raw notes are in the extended entry
---
JavaOne 2007 Day One
JavaFX Script - direct competitor to Adobe Flash. Scripting language for the rest of the world ("the humanity"). Geared towards multimedia, streaming, graphics.
JavaFX Mobile - Full Java SE on a mobile with JavaFX. Looked interesting actually. Nokia had some demo models available
TS-1742 Groovy
JSR-241
Groovy - Java friendly and feature rich
syntax aligned with J ava, full interoperability with Java classes
Groovy has optional types.
supports smart configs and DSLs, adaptable domain models
Meta-Object Protocol can change structure and behaviour at runtime
Groovy GString, but can use java.lang.String as well
no impedance mismatch with parent language
GroovyC to precompile or runtime compilation
Support for annotations just added - no other Java scripting language does that
Jboss announced integrated Groovy into Seam!
@BefroreClass
@Test, everything in the same "class"
Eclipse plugin for Groovy
Closures, Operators, GPath efficient object navigation, GroovyBeans,
Regular expression support in the language,
replace with calculated values
No primitive types in Groovy
manipulate objects at runtime
Groovy script Evaluation at runtime with Eval
Implements JSR-223 (Bean Scripting Framework)
two lines to consume a web service
grails.org
TS-1780 Sun SPOT
Small Programmable Object Techonlogy
Java on smaller and smaller devices
More portable JVM
Isolate application level
platform for wiress sensor network apps
SPOT processor board
180Mhz 32-bit ARM 920T CPU
Chipcon 24020 radio package
2.4 GHz frequency
IEEE 802.15.4 Low rate PAN protocol
SPOT Demo sensor board
accelerometer, temperature sensor, light sensor, 8 tri-clour LEDs, 2 push-button switches
analog to digital inputs/converters
Squawk virtual machine
no underlying OS, runs on "bare metal"
most of code written in Java programming language
interpreter and low level I/O code written in C
everything else in Java
Java ME CLDC 1.1
Analog input
- Read value with 10-bit resolution via IScalarInput class
accelerometer
- built in 3-axis accelerometer
- scale set to 2G or 6G
solid state gyroscope
- dual-axis
- provides rotational velocity, but some drift creeps in
- X and Y lines connect to ADC pins on SPOT
p5 data glove as demo
removed original chips, replaced with SPOT
compass sensor
3D and virtual reality
VrmlLoader - creates a scene from VRML file
JOGL OpenGL for Java
JOAL OPenAL for Java (Audio...)
Lw3dLoader for Lightwave 3D secenes
ObjectFile for Wavefront.obj files
SPOT interactions
Robot - emulates control of mouse from within application
movement is absolute, rather than relative
determining position
- not so simple with available date
- acceleromoter value changes with tilt
- need to combine gyro date with calibrated accelerometer data
radio positioning
- SPOT sends "ping" radio signal
- take signal strength from multiple basestations
- stability of signal strength is not high
- resolution of position changes is therefore low
client SPOT architecture
- hand interaction module
- positioning module
- communication module
- vibration module
robot translater handles the interaction with the virtual world
cool demo with a glove, lots of problems though
BOF-1692 Introducing the Sun SPOT
check out ts-1786: Writing Darkstart apps
TS-1519 Java robotics
Convergence has made robotics reality
personal and service robots are taking off
Java platform for robotics because
- simplicity in programming
- wealth of software compoennts
- wealth of available software expertise
- hardware and os independence
- scalable hardware support
Java ME platform for robotics
- low-level robotics processing
Java RTS for robotics
- deterministic Java platform processing
- SE grade platform support,
but enabling deterministic and timely processing
MAX: a java technology-based robotics engine
- provides higher-level robotics API
- common across platforms
Vex robotics hobby kit
- motors, r/c command encoders, feedback control
lego-based example
- java platform on lego nxt robotics hobby kit
- tinkering with legos
- replaced lego sensors
Tommy: DARPA Grand challenge AGV
- autonomous desert racing robot
single processor card
- GPS, intertial navigation system
- lasers/RADAR for detection
- brains: commands controllers
- two micro-controllers
- steering/shifting
- throttle/braking
- low-level sensing
- 10 man-months software development time
tommy jr: DARPA urban challenge AGV
- leverage reusable platform
- drop in more navigation rules
- drop in more detection rules
- drop in stereo sensor driver
- java real-time system
- project Sun SPOTs
kartbot: low-cost UGV
- modified go kart, bigger engine, more gas, 35 mph
auto-steering harvester
- autonomous farming
- real driver slowed by controls
- harvesting
- autonomous harvesting
- sense trees and form paths
- closed loop control of steering
- real-time steering controls
UAV terrain scanning
- laser scans of terrain
- fused real time with GPS/INS
- data processed to create point grid
- data acquisition timing is critical
Check the show floor for MAX
industrial automation example
- almost robotics :)
- distributed sensing for industrial automation
BOF-6012 Javascript best practices
- use caution when providing functions in the global namespce of modifying core Javascript objects
Try to use an existing Javascript toolkit
- in 99% of case it doesn't make sense to reinvent the wheel - use existing javascript toolkit
- already worked around numerous incompatibilities between different browsers
- provide useful helpers and general plumbing
- code can be used as style guide
- existing thriving communities which can help in case of problems
- packages, inheritance and modules are emulated.
- in dojo, package is an object, module is a file
- inheritance dojo way: declare, then attach to prototype
- call parent methods: call directly (duh!)
BOF-9843 Grails, Sails and Trails
Ruby on Rails started it all
- convention over configuration, Opinionated software, DRY, test driven development, 80/20 rule, MVC
- ActiveRecord - an internal DSL
coincides with trouble in Java world
- disillusioned with EJB 2.x; code, compile, deploy, restart cycle
sails, trails, grails
sails
- started in 2005
- brings the flavor of raild to java
- viento: custom template engine
- rigging for dependency injection
- generate nice URLs
- promotes easy testing
- templates are closest to Rails than other
- model: hibernate, view: Viento, controller: rigging
- eclipse support
- viento has custom method names, illegal in Java.. sort of same as internal DSL in Ruby
Trails
- heck I know this already..
- check if there's maven groovy plugin
grails
- 1.0 released early 2007
- interoperability with Java key goal
- first cousing of rails
- takes the most inspiration from rails
- design really driven by language
- groovy drives grails
- emphasizes domain driven development
- embrace legacy
- support for more complex relationships with hibernate
- go beyond crud
- half in groovy, half in java
- performance - uses native threads, runs on JVM
- deploys as a war
groovy view (GSP)
- groovy server pages
- creation of custom tags
- groovy taglibs increasing
- controllers - dynamic override
- groovy builders are cool
Posted by thoughts at May 9, 2007 08:13 PM | TrackBack