Looking for Recomendations

I’m looking for recommendations on how to handle something. I’m building our read system for our upcoming symposium. In the past I just created a lot of properties in the main form. For instance we have a number fee for earlybird, for normal, and a late registration fee. In the past that would’ve been three properties. Then it dawned on me I should be able to create an object and have all three of the crisis stored in that.

My problem is I’m not sure how to proceed. Can an object be a property of the form. If so how do I set that up?

I know I can do something like:

MembershipReg Obj {
earlyReg = 350
normReg = 400
lateReg = 500

Note I have many other like Non-Member and Special items like WelcomParty, etc.


If this is to look up the pricing, could a Function where you pass in the name of the Product and then return the Price using a Select Case statement work for you? The only bad thing about that is that you’d have to recompile to update the pricing.

A database table where you query the Price based on the Product would allow you to update the pricing without recompiling.

The database option however it would mean a lot of calls just to get one price. By that I mean it would have to make a call for the registration price, any additional items price. Maybe I’m being too cautious as far as overhead using a database. This is a web app and it’s not going to have hundreds of users or anything like that it’s just I’ve shied away from it because of the overhead.

Yet another option would be to store a text file with the pricing which you load into a Dictionary as a Property.

You could use a Timer that runs every so often that updates the Dictionary from the text file. That same text file could populate your list of Products. So if you needed to add a Product, you could just add it to the text file along with the Price.

Actually since prices don’t change often, you could have the class store the values returned from the database. That way you only take the hit on the first lookup. if you share the object in the web app, then only the first user of a price would take the hit.


How best to do that. OO is not my strong suite, but I need to learn more.

Since this is a web app, if you use an SQLite database, all the database calls are local, so the overhead is minimal.

Actually it’s our membership db in mySql.

Even that is usually hosted in the same network. Try it, you might be pleasantly surprised.

One issue to consider, though, is what kind of hosting are you on? Xojo doesn’t play well on shared hosting.