= Wicket Rapid Application Development Panels =

Started by Jon Carlson (jon_carlson@writeme.com).
Added to by you.

(Update Dec 2005, I have the basic components built with basic features, and I have some higher level components that show how they could be used to develop usable CRUD application very quickly, however they are still maturing. If you would like something committed to CVS earlier than later so you can contribute, please bug me about it at jon_carlson@writeme.com).

When I (JC) was a child, my grandma taught me 3 or 4 chords on a ukelele. Those simple chords could be used to accompany any song, she said. That made a big impression on me at the time. This sub-project of Wicket is being started with the belief that it is possible to create a few well-crafted editing and listing panels (along with the flexibility of OGNL, dynamic queries, and modern ORM tools) that would allow easy management of almost any data schema.

These panels should be able to create more than just a glorified Microsoft Access tool which is very table-centric. Wicket's use of OGNL, combined with a modern Object-Relational management tool like Hibernate, Cayenne, EJB 3, or O-O databases, allows grouping of information from related objects in one place.

Motivating Principles

These are ideas for motivating priciples (please feel free to add your ideas for discussion!) I have some specific ideas for implementation in mind so hopefully this makes sense to others too.

  1. Attempting to speed up development always means trade-offs in flexibility and features. Simplicity should be the goal, but if flexibility can be achieved at little cost in code and end-developer hassle then we should "go for it".
  2. The end-programmer should be able to define an edit panel (for example) without having to bounce back and forth between the HTML and his Wicket page class. For example, he/she should be able to use the IDE to specify everything about the entry field: bean attribute, field size, maxlength, minlength, regular expression validation, etc, inside the page class.
  3. We should not assume all instances of a type can be read into memory at one time.
  4. Components should be built with the other components in mind. (For example, if the listing component allows bookmarking of instances, the editing component should allow showing those bookmarked instances in a dropdown)
  5. It should be easy for a new end-developer to get started with these components. Since many of them will be new to Wicket, either best practice patterns for page/link management should be spelled out or we should provide an easy-to-use framework for page/link management.

Panel Summaries

Below are ideas for the basic panels. Please edit with your comments! I (JC) have created components like these so I know these can be done. My components currently only support Cayenne, but I have written it to support another tool, like Hibernate, as well. (The tricky part is abstractly filtering the query for the List panel) Another database-abstraction, which is more single-object oriented and would fit nicely, is Jonathan Locke's wicket-contrib-database code of the wicket-stuff project:

  1. Listing panel - Lists instances and provides mechanisms for filtering the persistent object(s) from a potentially very large list.
  2. Editing panel - Allows editing of persistent objects and even fields in related objects
  3. Relationships tab panel - Allows editing or viewing of related instances in a tabbed panel
  4. Display panel? - probably not needed since the editing panel can be used in read-only mode.

Editing Panel

Construct a generic panel like this:

(Code here!!)

Listing Panel

– Example picture or HTML goes here –

  • The Listing panel too should use the same mechanisms as the editing panel for discerning which attributes to display.
  • The basis of a ListPanel is a persistent object query and (basically) a list of OGNL expressions, one for each column.
  • Columns can have query filters, generally either drop-downs or text fields (is this sufficient?).
  • Instances may (or may not) be bookmarked for use in other panels and the list may be filtered on the bookmark field (show all or just bookmarked instances).
  • Instances in the list can optionally have an edit link and/or a delete link.

Relationships Tab Panel

The RelationshipsTabPanel provides easy access to the relevant related instances and would logically go on the same page as the EditPanel (but not necessarily). Each tab contains a related object (EditingPanel) or list of objects (ListPanel)

– Image goes here –

  • No labels