Sneak Preview: Naked Members?
Posted by Eitan Suez Wed, 29 Nov 2006 18:36:00 GMT
A new JMatter release is overdue and coming soon! I need to tie together the loose ends, such as updating the documentation to reflect what's changed (there's a lot coming!), and making sure everything is in sync, that everything works together.
This blog entry is about one of the features that you will find in the upcoming release of JMatter: the fact that administrators now have the ability to view and edit Member metadata directly from the GUI.
What does this mean? And more specifically, what
metadata? Let's fire up our trusty
demo application (bundled with JMatter) and take
In the above figure we're viewing a model object: a contact. Here's what's new: fields' commands are exposed in a context menu on each field's caption:
Let's take a look at the "Home Phone" field:
Let's edit this information. We'll customize the label for this field to "Home Tel.". Let's also mark the field as required, specify a mnemonic, even provide a description (which will appear as a tooltip on the field):
Usability side note: note how the user interface for doing all this is precisely the same mechanism used for editing any old JMatter object. End users (administrators in this case) are already familiar with the gestures, how to go about manipulating their information.
Ok, let's now save our changes and dismiss the view. We notice the changes take place immediately:
Pretty neat eh? All this information is saved to the database, just like any other old JMatter object. So, we now have multiple ways for designers to specify metadata: there are annotations and conventions in the code. You can even use ultraviolet's designer to specify graphically some of this information. UV will faithfully generate the proper code for you. Here we see a different approach to code generation: the meta objects are part of the system and as such can be viewed, edited and managed.
Ryan (the author of ultraviolet) and I have had a discussion or two along these lines. Perhaps some day, full design capabilities will exist as a JMatter application proper: Type definitions, modeling, code generation, auto-compiling of the code, and finally, running the application.
One more round: Commands
We have two types of members: fields and commands. Let's do for commands what we just did for fields. Let's right-click on a command button to expose its context menu:
Let's open the
Edit command and edit some of the information
In this case, I didn't change the label or mnemonic, but I did
add a tooltip, and marked the command as sensitive. Sensitive
commands are ones that you want to guard, perhaps with a lock.
Delete command is a good candidate: to guard against
inadvertant deletions, you have to first unlock the command
and then invoke it (a sort of are you sure? mechanism).
Ok, let's save the object and view the change in action:
We see here the tooltip showing. Also, the command was locked; I first unlocked it before producing the above snapshot.
There you have it: the new Naked Members feature (in subversion), available in the upcoming JMatter release.
A note on Authorization
Since these features are really design features, they're accessible only if you login as a user with administrative privileges. In order to make this work, I've been hard at work on supporting authorization in JMatter. I've made a lot of progress on this front, but am not completely finished.
More information on authorization will follow.
Let us know what you think.