Looking for Recomendations

  1. 3 months ago

    Richard A

    Mar 8 Pre-Release Testers, Xojo Pro Puerto Vallarta Mexico

    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.

    Thanks

  2. Hal G

    Mar 8 Pre-Release Testers, Xojo Pro, XDC Speakers CampSoftware.com

    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.

  3. Richard A

    Mar 8 Pre-Release Testers, Xojo Pro Puerto Vallarta Mexico

    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.

  4. Hal G

    Mar 8 Pre-Release Testers, Xojo Pro, XDC Speakers CampSoftware.com

    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.

  5. James D

    Mar 8 Pre-Release Testers, Xojo Pro Europe (Switzerland)

    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.

  6. Richard A

    Mar 8 Pre-Release Testers, Xojo Pro Puerto Vallarta Mexico

    James,

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

  7. Tim H

    Mar 8 Pre-Release Testers Portland, OR USA

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

  8. Richard A

    Mar 8 Pre-Release Testers, Xojo Pro Puerto Vallarta Mexico

    Actually it's our membership db in mySql.

  9. Tim H

    Mar 8 Pre-Release Testers Portland, OR USA

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

  10. Tim H

    Mar 8 Pre-Release Testers Portland, OR USA

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

or Sign Up to reply!