This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I'm looking for some resources (best practices) about how to use lightspeed in web applications. I have currently some problems seeing how the I could use lightspeed when I have a web app where there may be several postbacks between loading an object from the database and storing the modifications back to the database. Specifically, in our web app, we have a workflow like this:
I currently fail to see how this could be implement using the UnitOfWork concept/pattern, since we cannot prevent the postbacks during editing. Thanks a lot for any help. |
|
|
Hi, With the approach you are using (and I may have misinterpreted it) you would need to do the following:
Another approach is to not store the object in session but maintain a reference to its ID somewhere (perhaps session, perhaps query string, perhaps hidden field, etc - just be sure to consider security here) and reload the object from the database, bind the values back to the object, validate and, if valid, persist it to the database. This will remove the need to re-attach as it will be attached automatically when you re-load the object each time. I hope that helps, please let me know if I have completely missed the point of your question! Thanks, John-Daniel Trask |
|