MetaWidget – Convention over Configuration UI

I already know that I'm not going to do MetaWidget justice as I describe it. What the heck is it? According to the MetaWidget site, it is...

Metawidget takes your domain objects and automatically creates User Interface widgets for them, saving you handcoding your UIs and leaving you to concentrate on stitching together your application.

Think of a configurable form widget driven off of your beans through runtime inspection of properties, getters and setters, annotations, etc.

But wait, there's more. It automatically detects your backend at runtime and makes friends with Hibernate, Spring, Seam, Groovy, etc.

But that's not all you get. MetaWidget will work with JSF, Swing, GWT, Android, Struts, and on and on. I'm just scratching the surface here, including how it will work with IDE GUI Builders and such.

Definitely check out the MetaWidget tutorial.

Just a little taste of MetaWidget code from the tutorial:

public class Person {
	public String name;
	public int age;
	public boolean retired;
}
 
import javax.swing.*;
import org.metawidget.inspector.propertytype.*;
import org.metawidget.swing.*;
 
public class Main {
	public static void main( String[] args ) {
		Person person = new Person();
 
		SwingMetawidget metawidget = new SwingMetawidget();
		metawidget.setInspector( new PropertyTypeInspector());
		metawidget.setToInspect( person );
 
		JFrame frame = new JFrame("Metawidget Tutorial");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().add(metawidget);
		frame.setSize(400, 220);
		frame.setVisible(true);
	}
}

I have a couple of tedious GWT/Swing apps with lots of forms that are going to see and application of MetaWidget.

Related posts:

  1. Griffon: Convention over Configuration for the Desktop
  2. GWT 2.0 RC1 Released
  3. YAACGF – Yet Another AJAX Component GUI Framework
  4. Making GWT JSON not Quite so Painful
  5. PureMVC, Spanning the Platform Spectrum?

Comments: 1 so far

  1. Dietrich,

    Thanks for your blog entry, and your interest in Metawidget.

    I’ll be very interested to hear how you go, and very willing to help/make changes to Metawidget to suit your needs.

    User feedback like yours is critical as we move towards a 1.0 release!

    Regards,

    Richard.

    Comment by Richard Kennard, Friday, July 18, 2008 @ 8:23 pm

Leave a comment

Powered by WP Hashcash

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com