[Portfolio] Is there a better way to render subforms?

hongbo zhang hbzhang at vt.edu
Fri Jan 22 20:32:44 PST 2010


During the process of development OSP forms, or sakai form in general. I
feel that the current sakai form can be improved, if we can make the
data-binding structure more flexible. 

For the current sakai scheme. The element in the scheme file (XSD) has to be
exactly correspondent to one data retrieval and storage process in sakai. It
is a simple yet effective structure.  

However, it brings an issue that for a simple contact form, in XSD, we have
to have 6 elements. 
It means that it can be time consuming to write an XSD. It is also
complicate for non-programmers to create a simple form effectively.

So my thought is that 

  (1) if sakai form can be extended to a level that one element can be
correspondent to many UI elements, which will be interesting. Simply, I can
call it ONE-ELEMENT technique. For example, for a simple contact form, we
just need one element in XSD file rather than 6 elements. It means that a
non-programmer can use the form builder to drag one element, then your
contact form is done.  

Worth to mention, there should a delicate trade-off for this. We do not
expect to lose the simplicity, however we want to improve the efficiency. 

 (2) For the current sakai form, typically it only supports one-column
rendering partly due to the data retrieval and storage mechanisms. This
makes the many-elements form become very lengthy, hard to read, bad
usability. The multiple-columns rendering could be interesting to be
investigated. However, my guess is that it is not very easy to do or to be
generalized, since the scheme file element name is not standardized. It
makes the form render not able to know the meaning of the elements, which
elements should be grouped. In order to solve this problem (A) the
ONE-ELEMTNT technique (B) the enhanced XSD file, which can include more
information for example, which elements should belong to one group.      

   Hongbo

   




-----Original Message-----
From: portfolio-bounces at collab.sakaiproject.org
[mailto:portfolio-bounces at collab.sakaiproject.org] On Behalf Of Sean Keesler
Sent: Friday, January 22, 2010 9:01 PM
To: osp
Subject: [Portfolio] Is there a better way to render subforms?

I doubt I am the only one to notice that rendering a form that has a
complex element in it (ie: contact info that has a first name, last
name, address, city state & zip fields) results in a pretty lame UX.

When your schema has a single, repeatable field, the input element is
repeated with the same name.

I suppose we could use a little JavaScript in a renderer to replicate
a block of HTML form inputs in a fieldset for a complex element in a
XSD.
It would be great if there were some convention for naming the
"sub-elements" of a complex field to accomplish a similar
effect....something like:

"contactInfo_1_firstName"
"contactInfo_1_lastName"
"contactInfo_1_address"
"contactInfo_1_city"
"contactInfo_1_state"
"contactInfo_1_zip"

and then:

"contactInfo_2_firstName"
"contactInfo_2_lastName"
"contactInfo_2_address"
"contactInfo_2_city"
"contactInfo_2_state"
"contactInfo_1_zip"

Has anyone given something like that any thought?


Sean Keesler
130 Academy Street
Manlius, New York 13104 USA
315-663-7756
sean.keesler at threecanoes.com
_______________________________________________
portfolio mailing list
portfolio at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/portfolio

TO UNSUBSCRIBE: send email to portfolio-unsubscribe at collab.sakaiproject.org
with a subject of "unsubscribe"



More information about the portfolio mailing list