Page 2 of 2

Re: Looking for an OO PHP mentor

Posted: Sat Dec 13, 2008 11:33 am
by Christopher
I think ZervWizard would probably work. Or you can code it yourself. And IDE won't help you solve the problem, just make coding easier.

Is it the wizard/multi-step part of the problem or how to divide up the parts between presentation code and domain code that you have the most questions about? As I alluded to above, I would start with the Domain objects and build the presentation layer on top to display and get data for them.

Re: Looking for an OO PHP mentor

Posted: Sat Dec 13, 2008 12:23 pm
by jeffrydell
My first concern was how to divide up wizard, but I'm pretty confident now that the correct approach would be to have a class extending ZervWizard for each of these:

Event
User Info / Legal

Participant / Activities
(reinstantiate this class as many times as necessary for all participants being registered in this session)

Payment

As each class is instantiated, I could then determine the proper number of steps for that class's constructor.

My Model class would not necessarily be a ZervWizard extension ... I'm thinking it should be a class that
1) Checks to see if the user asked to go somewhere specifically and send them there or
2) Send them to the next "logical" step in their class or the next logical class in the domain if they have not instructed the application on what they specifically wanted to do.

#2 would be accomplished by checking the state of each class along the way.

Earlier I referred to a ViewFinder class. This class would identify what step of what Class we were "in" and then determine the appropriate form (view) based on the state of that class.

Does this make sense?

Re: Looking for an OO PHP mentor

Posted: Sat Dec 13, 2008 12:47 pm
by Christopher
What is on these "pages"? It seem like there is Participant information on the Event page, and Activity information on the Participant page. Are there just 3-4?

Re: Looking for an OO PHP mentor

Posted: Sat Dec 13, 2008 1:03 pm
by jeffrydell
Event Class
Events - a dynamic table of date, location info for the events being sponsored by that client

Owner Class
Owner - Name / Addy / other contact info
Legal - a dynamic display of the Hold Harmless agreement and checkbox for electronic signature

Participant / Activity Class
Participant - single field to acquire the participant's registration number for lookup
Result page confirming we have the right participant (correct / continue OR incorrect go back)
Participant Details - Name, Height, Birthdate, other demographic info
Activities - List of all activities available ... user can select what they will do, how advanced they are at that game, which days they will participate.
Review - Shows Owner / Participant / Activity info for review with links to edit anything entered so far.
What Next? - Lists participants entered so far with the option to add anther participant or continue on to payment.

Payment
Payment Calculator (Shopping Cart) - Shows billable activities and gives the user the option to take advantage of any package discounts or enter coupon info.
Invoice Displays results of Payment Calculator & offers option to pay online or pay by mail Upon selection, the user's session info is inserted in db tables & user is taken to either the payment processor website with necessary info 'handed off' to the processing site OR they are taken to a page which gives mailing address, etc. for 'Pay by Mail'.