#: Philipp Bracher changed the world a bit at a time by saying (astral date: 
2/7/2006 10:23 AM) :#
Sorry for the delay. I didn't have time to take a really deep look at your prototype but here's what came up to my mind:


Thanks for taking the time to take a first look at it.

Wow, that does look a lot nicer than the mysty code in the past! Can't wait to use the validation framework.

Nevertheless, some question marks and other remarks:

- What do you mean by "wicket like". Did you introduce anything new or is "wicket like" just a hint to make life easier for those who know wicket?

The ViewHandler was inspired by the approach the Wicket framework uses. I think this is what makes Wicket so easy to use for Java Developers. They turned around the responsibility (some would say they turned it right ;-). Other Frameworks like the JSF/JSP implementation gives the control to the template. This means that you write a tag in your template and the underlaying code will instantiate and configure the control during the rendering process. In other words: the template creates the view tree. This leads to unwanted side effects which only cracks understand.

In the Wicket like approach (this is what I do in Magnolia JSF) the template is a template with placeholders and the page is a Java class which will create the viewtree and renders afterward using the template. This gives the conrtol back to the code and makes the template what it should be: a rendering util. To use a easy to use and well known Template engine I chose FreeMarker. Please remark that a control itself can be templated the same way and since they are JSF controls like others it is easy to use them in other JSF Applications even if the JSP ViewHandler is used.

You may ask me why to change JSF. Well I did not change it really since the specification does intend such changes and others are doing this too. In magnolia we will use JSF only at two places: dialgos and trees where the dialogs part is where it is really needed!

- Did you already define an exception concept?

Depends on what you mean. If you are thinking on the validation messages or alerting of save problems this is already solved (defined) by JSF itself. There is nothing we have to add.

- How would you perform some action upon a store operation of a dialog (pre- / postSave)?
Each dialog can define its backing bean (managed bean or spring bean) if it does not like the default implementation.

- The dialog view tree itself is bind to the dialog property (this tree contains the controls, and the validated values).

- The definition itself is bind to the dialogConfig property

- The dialog ties to bind the controls to a named property (if available) if not possible it puts the value to the values map of the bean

- In addition to the Validators you define for the controls the bean will have a validate() method to process more complex data validation

- The save action is bind to the save() method of the bean which will return succeeded or failed

- If it fails the original dialog is showed again and the messages (validation, saving, ...) are alerted

Remark: Since in JSF the view tree is accessible and configurable in the code you can change all this behaviors in the dialogs create method if you have to. You change the bindings as needed.

- How, if at all, would it be possible to chain dialogs?

Are we talking about Wizards? There a lot of possibilities and they have nothing to do with magnolia they are JSF solutions

A) Use a backing bean in the session scope and define the navigation rules so that after clicking next the next dialog is shown. Bind only the final dialogs action to the save method.

B) Make only one dialog but set the rendered flags of the panels (step). This is easier to handle but not as flexible as the solution A.

The flexibility of the new dialogs is the flexibility of JSF.


- use <div> tags instead of <table> tag if you just want to list components in a row.
Yep

I hope to spend some more time in the near future to provide you more feedback.

Would be good. There is not yet much realized and what we discuss here won't be part of the next version we release, but I think that if we define it properly the realization can be done quick afterward. What I posted yet is just a proof of concept.

As a summary:

- The controls are templated with FreeMarker
- We do not use JSP to build the views we use our custom ViewHandler (this is what I call Magnolia JSF) - The only thing this changes is, that you configure the controls in the code (based on the configuration in the repository) instead by using tags - The full JSF feature set is still useable and the controls could be used in JSF/JSP too

Thanks for listening ;-)


Regards,

Philipp Bracher
obinary ltd.


Hi!

Unfortunately, lately I've been quite busy, so I missed the time to check Philipp's work. However, the description looks very smooth and I am quite happy to find here some of the ideas I've been talking in the past (wicket, freemarker, etc). Congrats!

./alex
--
.w( the_mindstorm )p.


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to