Cinco de Mayo @ JavaOne
Monday, May 5. 2008
May 4th
Arrived in San Francisco after a smooth flight, this flight is so quick from So Cal, you get a little reading in and before you know it you're on the ground again. Grabbed a shuttle to the hotel, Serrano Hotel, got my room and headed out for a little stroll to find some grub before I get an early start on Monday.
Grabbed a tuna melt at TAD's which is a few blocks away. Never been, food wasn't bad and they seemed to have a big breakfast menu. Considerably cheaper than the Ponzuwhich is running about 30.00 a meal (maybe I'll check it out before I leave).
I must say, there is something about San Francisco, cool air hitting your face, homeless asking for money every corner, street musicians playing saxophone/guitar and what else they have,
cable cars going by, people on the move, that's really enjoyable. Every time I come here, there is some real character to this place that is like no other place I've been. Quite nice to walk the streets, to see the hustle and bussel moving through the streets being apart of it for a week is a nice change. The weather is cool jacket weather that feels great from the heat of the south lately.
After my walk, I headed back to the hotel, prepared myself for the day to come, set the alarm and hit the hay.
May 5th - Cinco de Mayo
Got up at the break of dawn, 6:10 am (that's early for me), headed over to Moscone North, grabbed my registration and went to the lower level to pick up my materials for the conference. It's been since 2004 since I've visited Moscone and JavaOne, it looks similar to previous years, it always looked good and ready to deliver. This year is no exception. I guess I was so anxious to get over to the center and get my learn on that I had about two hours before my first Session, Developing Enterprise Applications with the Spring Framework, with two backpacks in tow I headed back to the hotel to drop some of this mess off.
Headed back, I grab a coffee and a piece of Banana Nut Bread from Starbucks, then it's over to the Intercontinental Hotel (Nice hotel) for the session.
Spring Framework by Chris Richardson
Since I've used Spring Framework with uPortal and some of the other projects at work, the first half of this session was simply a reminder of configuration possibilities and reasons why to use the framework, like the removal of DRY (Don't Repeat Yourself) code, easy testing with Mock Objects (Chris used JMock 2), removal of dependancies. Chris also covered xml configuration and annotation based configuration, even covered Java Config for configuring Spring. I guess I must have skipped the Bean Scopes somewhere along the way because Chris' explanation of them eye opening, kind of woke me up (hey you know you can do this?)
Bean Scopes
Singleton
- The default and most common
- Only create a single instance
- Use for stateless beans
Prototype
- Create a new instance each time you need one
- When its injected or requested by getBean()
- Use for stateful beans
Request and Session
- Use in web applications for request/session-specfic state
- The bean lives for the lifetime of request or session
- Referencing beans are injected with a proxy
Next, he
covered Transactional Services in Spring. Transactional services offered by
Spring simplify user’s code by removing the repeated code. Spring allows you to
write metadata to create transactional POJOs. Via the help of Aspect Oriented
Programming (AOP) and Spring your code can be greatly reduced. Before I get
into the Spring AOP I’d like to cover a few AOP basics.
AOP Basics
Joinpoint
● Well-defined point during the execution of your application
● You can insert additional logic at Joinpoint's
● Examples of Jointpoint's
– Method invocation
– Class initialization
– Object initialization
Advice
● The code that is executed at a particular joinpoint
● Types of Advice
– before advice, which excutes before joinpoint
– after advice, which executes after joinpoint
– around advice, which executes around joinpoint
Pointcuts
● A collection of joinpoints that you use to define when advice
should be executed
● By creating pointcuts, you gain fine-grained control over how
you apply advice to the components
● Example
– A typical joinpoint is a method invocation.
– A typical pointcut is a collection of all method invocations in
a particular class
● Pointcuts can be composed in complex relationships to further
constrain when advice is executed
Aspects
● An aspect is the combination of advice and pointcuts
For more on Spring AOP see
http://www.javapassion.com/j2ee/springaopbasics.pdf.
Spring wraps objects with
proxies that can execute extra advice before method invocation, after invoking
a method, or instead of a method. Transactions are managed through TransactionInterceptor.
This class manages transactions and intercepts method calls then delegates to
the PlatformTransactionManager.
By wrapping objects, your
components are unaware of the transactional code that is executed when your
object interact with other objects what are using Spring’s AOP Transaction
Management. Management is configured through an xml
configuration or via Spring Annotations. Check out <context:annotation-config/>
for
annotation
configuration.
Spring allows programmers to remove tightly coupled, duplicated and tangled code with code that is easier to maintain, test, and develop. Chris did a good job of explain how Spring can help. The AOP/Transaction management was a real eye opener and features that I don’t currently use. The dependency injection part of spring has been something I’ve been using for quite some time. I’m not going to cover every aspect of the session but I’ve tried to highlight some of the key points that Chris when over in the session. Additional projects that Chris is involved with are: http://code.google.com/p/aop-oodhttp://code.google.com/p/projecttrackhttp://code.google.com/p/aridpojoshttp://code.google.com/p/ormunithttp://code.google.com/p/umangitehttp://code.google.com/p/cloudtools Web 2.0 Leveraging the Project jMaki and Google Web Toolkits for
Rapid Website Development
jMaki
This session started with
Evan Troyka discussing jMaki. jMaki is
a wrapper for different ajax libraries like dojo and Yahoo ui. jMaki uses jsp
tags, JSF components, php libraries, and phobos implementations for different
deployments. A jMaki component consists of three different files, component.js,
component.htm, and a component.css. An optional file is the config.json. This
is a central location for configuration of javascript libraries, API keys, CSS
dependencies, jmaki Glue handler mappings, mapping extensions, and theme
information. jMaki glue lets you wire together jMaki widgets via a
publish/subscribe event model. This was interesting to see how you can use
different components from ajax libraries via one technology like JSF or JSP tags.
Some additional information on jMaki can be found at:
http://forums.java.net/jive/forum.jspa?forumID=96
http://weblogs.java.net/blog/carlavmott
http://weblogs.java.net/blog/gmurray71
http://weblogs.java.net/blog/arungupta
GWT
The real value (for me) in
this session was the second half where David Geary went over GWT Toolkit. I’ve messed with
this a little but I haven’t really dug into the project much. Wow was this
helpful to see the possibilities with GWT. GWT is a java library that allows
you to compile Swing like code into JavaScript. This eliminates the need to
test code for cross browser compatibility or learn JavaScript altogether. Some
of the features of GWT:
·
Debug client-side UI in Java code
·
Make remote method calls to a servlet
·
Incorporate Javascript with native methods
·
Use widgets and implement new ones
·
Use the browser history mechanism
·
Integration with JUnit
·
Internationalization
More on GWT later. You can
also look at http://cooland usefulgwt.com.
I’ve been trying finish
this damn entry the last two days, there was just so much information at
JavaOne, it make it difficult to cover all that was there. To think I’m still
on Monday, Java University, before the conference session really started.
Really today was jammed with
material, each session was 3 hours long and we stopped after 8pm. I was toast,
tons of information and it's only the beginning. I really hope to finish the
blog but I'd like to get some sleep for tomorrow is another day of learning.
Really today was jammed with material, each session was 3 hours long and we stopped after 8pm. I was toast, tons of information and it's only the beginning. I really hope to finish the blog but I'd like to get some sleep for tomorrow is another day of learning.
Without actually thinking anyone would read this, I've been trying to spend a little more time writing in my blog. But work and life in general seem to get in the way.
Ok after years of procrastination, I've finally broken down and gotten a new phone, but not just any phone, I got an iPhone. After hearing all the hype and the expense I've fought the urge the purchase a new phone for some time. My previous phone was the Treo 650. Now I guess this phone serviced its purpose, but the interface had issues and I could never really tell how many voice messages were in my inbox without calling. The internet of the phone, was pretty much unusable.
Now I have a good portion of the
Now that I have the application (Sakai Gradebook) working as a portlet, I had to modify a few more things that the portlet framework didn't like. 
some work on behalf of the user that signed into 











