You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Duncan McLean <du...@blueyonder.co.uk> on 2006/01/17 22:24:53 UTC

Design help/questions for cforms application

Hi

We are currently trying to develop a forms based application which 
integrates into an existing cocoon-hosted site.

The application consists of 7 or so forms which collect information from 
the user, which is eventually packaged up and used to invoke a business 
service which
will call an application to  perform some complex financial 
calculations, before returning the result. We then capture the result, 
and deliver this in the form of a
"quotation" page.

Also. there are occasions between some of the forms that necessitate the 
need to call out to another business service to supply information that 
affects fields displayed on the next form in the
process. For instance, there is a need to bring back a set of funds 
(which changes depending on what the user has chosen in the previous form).
Also, some of the data may also influence the validation of subsequent 
forms.

Currently I have built a proof of concept page (actually the first of 
the actual pages in the application). that actually proves that I can 
incorporate the cforms framework into the existing site.

However, I have some questions about overall design and implementation:

1) Can someone explain how we could call out to the business service, 
retrieve the data and supply to the next form in the sequence (there may 
be quite a large amount
of data returned at some points) - I assume call a java servlet that 
handles the business service interaction.

2) We allow the user to return to any point in the form filling process, 
therefore the form will have to repopulate the fields that they have 
already filled. How easy is this to achieve.
Is this where we would introduce data binding (beit to java beans or xml 
for instance)? I am a bit fuzzy on the concept of data binding in this 
instance. Could someone please explain the rationale
behind data binding please and why it should be used if I it isn't used 
like this?

3) Are there any other issues/problems that we may come across using 
this approach to the application?

Forgive me if this seems a bit wooly, but we are still very much feeling 
our way about cocoon forms, and want to have a clear understanding 
before we make too many stupid mistakes!

Thanks in advance

Duncan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Design help/questions for cforms application

Posted by Antonio Gallardo <ag...@agssa.net>.
Hi Duncan,

using flow and jumping between screens, see the calculator demo:

http://cocoon.zones.apache.org/demos/release/samples/flow/

In the same way is posible to use cforms.

Best Regards,

Antonio Gallardo.

Duncan McLean wrote:

>Hi Thanks again
>
>I'd like to ask a further question:
>
>Effectively, there is a set of 7 forms that are distinct from each other
>in as much as they capture different data, but are still logically linked
>(i.e previous input effects behaviour in subsequent forms and their
>handling, and the final result will be that all captured data is gathered
>and sent to be calculated and a result returned).
>
>Can someone give me an example of how this is achieved in flowscript - I
>seem to be getting a bit mixed up, and cannot really find a good example
>of something like this. Will the same function in flowscript handle the
>transitioning from one form to another, or do I use a separate function
>for each form, in which case how is the overall data collected at the
>conclusion/final submission of the form.
>
>Apologies again but I'm new to Cforms and conceptually its taking time to
>get up to speed!
>
>Thanks
>
>Duncan
>
>
>
>
>  
>
>>Duncan McLean wrote:
>>    
>>
>>>So can anyone take my other question - can someone explain the uses of
>>>data binding in forms (java bean or xml) citing some examples of where
>>>it might be useful? (I guess I am interested in what gains it could give
>>>us in our situation)
>>>      
>>>
>>I'll take a stab at it briefly...
>>
>>The CForms binding framework is simply a way to map values back and
>>forth between the form model (essentially a tree structure of widgets)
>>and a "business object".  For instance, your business processing layer
>>probably already defines JavaBeans for transferring data around, but the
>>CForms form object has a different structure.  So once a user fills in
>>the form object with their values, somehow those values need to get
>>mapped onto the JavaBean.  A binding allows you to define the rules for
>>how those two specialized objects' contents can be synced up.  You could
>>of course do it manually by copying the values over one-by-one in your
>>Java/JS code, but the binding framework lets you define the mapping
>>declaratively in an XML format, which can be more convenient.
>>
>>Hope that's a good start.
>>--Jason
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Design help/questions for cforms application

Posted by Duncan McLean <du...@blueyonder.co.uk>.
Hi Thanks again

I'd like to ask a further question:

Effectively, there is a set of 7 forms that are distinct from each other
in as much as they capture different data, but are still logically linked
(i.e previous input effects behaviour in subsequent forms and their
handling, and the final result will be that all captured data is gathered
and sent to be calculated and a result returned).

Can someone give me an example of how this is achieved in flowscript - I
seem to be getting a bit mixed up, and cannot really find a good example
of something like this. Will the same function in flowscript handle the
transitioning from one form to another, or do I use a separate function
for each form, in which case how is the overall data collected at the
conclusion/final submission of the form.

Apologies again but I'm new to Cforms and conceptually its taking time to
get up to speed!

Thanks

Duncan




> Duncan McLean wrote:
>> So can anyone take my other question - can someone explain the uses of
>> data binding in forms (java bean or xml) citing some examples of where
>> it might be useful? (I guess I am interested in what gains it could give
>> us in our situation)
>
> I'll take a stab at it briefly...
>
> The CForms binding framework is simply a way to map values back and
> forth between the form model (essentially a tree structure of widgets)
> and a "business object".  For instance, your business processing layer
> probably already defines JavaBeans for transferring data around, but the
> CForms form object has a different structure.  So once a user fills in
> the form object with their values, somehow those values need to get
> mapped onto the JavaBean.  A binding allows you to define the rules for
> how those two specialized objects' contents can be synced up.  You could
> of course do it manually by copying the values over one-by-one in your
> Java/JS code, but the binding framework lets you define the mapping
> declaratively in an XML format, which can be more convenient.
>
> Hope that's a good start.
> --Jason
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Design help/questions for cforms application

Posted by Jason Johnston <co...@lojjic.net>.
Duncan McLean wrote:
> So can anyone take my other question - can someone explain the uses of 
> data binding in forms (java bean or xml) citing some examples of where 
> it might be useful? (I guess I am interested in what gains it could give 
> us in our situation)

I'll take a stab at it briefly...

The CForms binding framework is simply a way to map values back and 
forth between the form model (essentially a tree structure of widgets) 
and a "business object".  For instance, your business processing layer 
probably already defines JavaBeans for transferring data around, but the 
CForms form object has a different structure.  So once a user fills in 
the form object with their values, somehow those values need to get 
mapped onto the JavaBean.  A binding allows you to define the rules for 
how those two specialized objects' contents can be synced up.  You could 
of course do it manually by copying the values over one-by-one in your 
Java/JS code, but the binding framework lets you define the mapping 
declaratively in an XML format, which can be more convenient.

Hope that's a good start.
--Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Design help/questions for cforms application

Posted by Duncan McLean <du...@blueyonder.co.uk>.
Hi

Thanks for this, think we are headed along the right lines then!

So can anyone take my other question - can someone explain the uses of 
data binding in forms (java bean or xml) citing some examples of where 
it might be useful? (I guess I am interested in what gains it could give 
us in our situation)

Thanks again

Duncan

Antonio Gallardo wrote:

> Hi Duncan,
>
> You might use Control Flow continuations for the whole process. It 
> will help you a lot wiith all decribed tasks. See 
> http://cocoon.apache.org/2.1/userdocs/flow/continuations.html
>
> Best Regards,
>
> Antonio Gallardo.
>
> Duncan McLean wrote:
>
>> Hi
>>
>> We are currently trying to develop a forms based application which 
>> integrates into an existing cocoon-hosted site.
>>
>> The application consists of 7 or so forms which collect information 
>> from the user, which is eventually packaged up and used to invoke a 
>> business service which
>> will call an application to  perform some complex financial 
>> calculations, before returning the result. We then capture the 
>> result, and deliver this in the form of a
>> "quotation" page.
>>
>> Also. there are occasions between some of the forms that necessitate 
>> the need to call out to another business service to supply 
>> information that affects fields displayed on the next form in the
>> process. For instance, there is a need to bring back a set of funds 
>> (which changes depending on what the user has chosen in the previous 
>> form).
>> Also, some of the data may also influence the validation of 
>> subsequent forms.
>>
>> Currently I have built a proof of concept page (actually the first of 
>> the actual pages in the application). that actually proves that I can 
>> incorporate the cforms framework into the existing site.
>>
>> However, I have some questions about overall design and implementation:
>>
>> 1) Can someone explain how we could call out to the business service, 
>> retrieve the data and supply to the next form in the sequence (there 
>> may be quite a large amount
>> of data returned at some points) - I assume call a java servlet that 
>> handles the business service interaction.
>
>
>
>> 2) We allow the user to return to any point in the form filling 
>> process, therefore the form will have to repopulate the fields that 
>> they have already filled. How easy is this to achieve.
>> Is this where we would introduce data binding (beit to java beans or 
>> xml for instance)? I am a bit fuzzy on the concept of data binding in 
>> this instance. Could someone please explain the rationale
>> behind data binding please and why it should be used if I it isn't 
>> used like this?
>
>
>
>> 3) Are there any other issues/problems that we may come across using 
>> this approach to the application?
>>
>> Forgive me if this seems a bit wooly, but we are still very much 
>> feeling our way about cocoon forms, and want to have a clear 
>> understanding before we make too many stupid mistakes!
>>
>> Thanks in advance
>>
>> Duncan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Design help/questions for cforms application

Posted by Antonio Gallardo <ag...@agssa.net>.
Hi Duncan,

You might use Control Flow continuations for the whole process. It will 
help you a lot wiith all decribed tasks. See 
http://cocoon.apache.org/2.1/userdocs/flow/continuations.html

Best Regards,

Antonio Gallardo.

Duncan McLean wrote:

> Hi
>
> We are currently trying to develop a forms based application which 
> integrates into an existing cocoon-hosted site.
>
> The application consists of 7 or so forms which collect information 
> from the user, which is eventually packaged up and used to invoke a 
> business service which
> will call an application to  perform some complex financial 
> calculations, before returning the result. We then capture the result, 
> and deliver this in the form of a
> "quotation" page.
>
> Also. there are occasions between some of the forms that necessitate 
> the need to call out to another business service to supply information 
> that affects fields displayed on the next form in the
> process. For instance, there is a need to bring back a set of funds 
> (which changes depending on what the user has chosen in the previous 
> form).
> Also, some of the data may also influence the validation of subsequent 
> forms.
>
> Currently I have built a proof of concept page (actually the first of 
> the actual pages in the application). that actually proves that I can 
> incorporate the cforms framework into the existing site.
>
> However, I have some questions about overall design and implementation:
>
> 1) Can someone explain how we could call out to the business service, 
> retrieve the data and supply to the next form in the sequence (there 
> may be quite a large amount
> of data returned at some points) - I assume call a java servlet that 
> handles the business service interaction.


> 2) We allow the user to return to any point in the form filling 
> process, therefore the form will have to repopulate the fields that 
> they have already filled. How easy is this to achieve.
> Is this where we would introduce data binding (beit to java beans or 
> xml for instance)? I am a bit fuzzy on the concept of data binding in 
> this instance. Could someone please explain the rationale
> behind data binding please and why it should be used if I it isn't 
> used like this?


> 3) Are there any other issues/problems that we may come across using 
> this approach to the application?
>
> Forgive me if this seems a bit wooly, but we are still very much 
> feeling our way about cocoon forms, and want to have a clear 
> understanding before we make too many stupid mistakes!
>
> Thanks in advance
>
> Duncan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org