Showing posts from 2011

jsf2 – splitter composite component

I was playing with the composite component capability of jsf2. It essentially allows you to build up “templates” of reusable layouts and content. One component that I did  not find in the jsf component library I am using (richfaces) is a splitter. I know its in the openfaces component library, but I was wondering how easy it would be to create something quickly. So, without regard for colors and layout requirements, I put together: 1: <? xml version ="1.0" encoding ="UTF-8" ? > 2: <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3: "" > 4: < ui:component xmlns ="" 5: xmlns:h ="" 6: xmlns:f ="" 7: xmlns:ui ="" 8: xmlns:a4j ="

JSF2.0 and web applications

Well…after poking around a bit on web frameworks I decided to take a deeper look into JSF2.0. Why? Wasn’t the 1.x series of JSF standards pretty brutal? Well yes, from the looks of it. JSF2.0 is, however, a nice component based web framework. Oracle has ADF, JBoss has RichFaces, and there are many component libraries available for JSF. Even the ZK framework (which has a heritage in the GWT thinking) has some taglibs to leverage inside of JSF if you want to. Why JSF? Well, it has a nicely defined lifecycle, it allows you to bundle things up into a declarative syntax nicely and the available toolkits look pretty good. You can avoid some deeper tinkering with javascript if you like. Because JSF2.0 is ajax enabled, you can still get good partial page rendering support when you need it. A couple of the parts that I like about JSF is that it has: Templates: You can define page templates in xhtml and reuse them. Composite Components: It has composite components that allow you to build wh

javafx 2.0 - great progress, some thoughts...

I looked at javafx 2.0 beta and I am very pleased with the progress. I think Oracle could make a great steward for some java technologies especially if they can make it economic so that more investments in java can be made. I took a look at the programming model, which is based on the idea of directly programming a scenegraph, and here are some thoughts: I liked the programming model as compared to Swing. There are significantly fewer "model" constraints" I am a fan of less API for models. Swing always had complicated models for more complex controls. fx2 has fewer. More integrated thinking about effects and rich media. That's all good. CSS: I'm not a big fan of CSS for UI presentation specifications. Why? Well, first, you are typically using another "language" even if it is a DSL. I think WPF had it right in that that built the CSS-like stylers directly into the language and XAML supports the same "syntax" for specifying CSS-like effects. You

hibernate 3.6.0.FINAL and OSGi

Hibernate does not come OSGi enabled from jboss. That’s okay. We can use bundlor to fix that. Grab bundlor from springsource and execute the following commands to make them available in maven. You can also add these to a maven pom.xml to have them automatically run. Note that the commands below assume the jar is in a specific subdirectory and the output goes to another subdirectory. Just replace yourprefix with the prefix you want to use. Springsource likes to use com.springsource but pick your own. Then just use your maven dependency declaration as you normally would. bundlor.bat -i nonosgilibs/hibernate3.jar -o ./libs/ -m mvn install:install-file -Dfile=libs/ -DgroupId=org.hibernate -Dversion=3.6.0.Final -Dpackaging=jar bundlor.bat -i nonosgilibs/hibernate-jpa-2.0-api-1.0.0.Final.jar -o libs/hibernateuser.javax.persistence2-1.0.0.Final.

nhibernate, mapping attributes and LocalSessionFactoryObject

Wanted to use nhibernate with Also wanted to annotate my entities with nhibernate attributes. But there was no LocalSessionFactoryObject that could understand mapping attributes. The class below understands attributes. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; using NHibernate.Mapping.Attributes; using NHibernate.Cfg; using NHibernate.Util; namespace Spring.Data.NHibernate { /// /// Local session factory object implementation that understands /// nhibernate attributed classes. /// public class AnnotatedLocalSessionFactoryObject : LocalSessionFactoryObject { /// /// List of annotated classes that should be scanned for nhibernate attribute information. /// The type and assembly should be listed for each entry. /// public virtual ArrayList AnnotatedClasses { get; set; } /// /// Whether the schemas are validated after serializatio