• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WebApplication design problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebApplication design problem


  • Subject: Re: WebApplication design problem
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 3 Jan 2006 15:39:18 -0800

While I am on the topic...

On Jan 3, 2006, at 3:52 AM, Miguel Arroz wrote:

I'm building an WO application to manage the participant of a conference. One of the features is a public form where people may register themselves on the conference, and the registration will later be approved by someone from the organization team.

To do that, I have a main page, that links to a "subscription" page with a form. When the user submits a form with no errors, a confirmation page is shown, basically with a message that tells the user he will receive an email shortly with the confirmation.

On the form page, I create a new user and context, and bind the user fields with the form fields.

I would do this immediately after the save and before showing the confirm page. That way, if the user backtracks, they will get a fresh, blank form.


The problem is... if the user is in the confirmation page, and goes "back" in the browser, he will see the form again. If he changes data and submits again, he will effectively change his data.

This is a common problem in web apps, compounded in WO by the fact that it normally maintains state. Pierre Bernard has an article and code on this on his website. There are a few different ways of handling this.


I may think of a number of solutions for this (not binding directly to the user, but to temporary variables; having some king of "alreadySubmited" flag; etc). What I would like is to have your opinion to know what is the more "WOish" solution, the best practise. I'm sure you all had this problem before, and I'm sure you all solved it! :)

In this case, I would probably go with the alreadySubmitted flag and if it is set, then don't save and just return the confirmation page.



Chuck

--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >WebApplication design problem (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: How to handle relationship properties?
  • Next by Date: Re: How to handle relationship properties?
  • Previous by thread: WebApplication design problem
  • Next by thread: Direct to Java Client and frameworks
  • Index(es):
    • Date
    • Thread