Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Phil Lee 4 posts 25 karma points
    Jun 02, 2011 @ 03:16
    Phil Lee
    0

    Modelling events/workshops with registration - document types, custom tables, or another solution?

    Hi there,

    I'm currently trying to work out the best way to model workshops (which are really just events, like the ones in the events package) and registration/attendance. Basically, members of the site can sign up for workshops they want to attend using the public site, and administrators can also manage attendance using the Umbraco back-end.

    I currently have a workshop document type, which has properties such as start/end time, location etc. What I need to do is create a link between the workshop, and the individual members who are attending. I've thought of three possible ways to do this:

    I've thought of three possible ways to do this:

    1 - Create another document type called workshop attendee, which has only one property for  member, and some additional audit data (who registered them, time registed, who deregistered, time deregistered etc). This can use a member picker control to select the id of the appropriate member. Then under the content tree for each workshop, we can add a document using this type for each attendee. This creates the necessary link between the workshop and it's member attendees, in a similar way to the poll package and how it links a poll to the responses. So the content tree could look something like the following:

    - Home
        - Workshops
            - Dummy Workshop One
                - Attendee One
                - Attendee two
                - etc.
            - Dummy Workshop Two
                - Attendee One
                - Attendee two
                - etc.

    The benefits of this approach I can see are that it doesn't require us to add any additional tables to the umbraco db, and makes it easy to see all of the workshop attendees without having to add custom sections to the umbraco backend. The downside is that it would create a lot of nodes, and each time someone registered or deregisted it would cause the umbraco xml file to be regenerated (I could be wrong here though). Given that registrations can happen fairly frequently, this could negate many of the benefits of having the cache, since it's being regenerated so often. I also read that umbraco scales to about 150k nodes and then degrades after that. Whilst we wouldn't get to 150k immediately, I can see how we would probably reach that figure it we store a node for every workshop attendee.

    I could possibly store attendees as unpublished documents, however, I'm aware that in order to retrieve and get their details this may require a lot of database calls. Does anyone know whether this is the case? I've seen some info in http://www.netaddicts.be/articles/document-api-vs-nodefactory.aspx, but am not sure this is up-to-date...

     
    2 - Create an additional table (workShopAttendee) which has foreign key references to the cmsMember and umbracoNode tables (plus some additional audit data as described earlier). We could then use custom sql to access this table and add/remove attendees.

    The benefits here would be that we avoid the caching issues mentioned above, and we're not trying to use the umbraco document model for something it might not have been intended for. The downside is that we have to write more custom code. However, this shouldn't be too hard (we'll probably have an EF data model which can handle generating sql for us).
     

    3 - Try using the relations api, although this doesn't allow for the additional audit data described in (2), so I don't think it would work.

    4 - Try using the http://our.umbraco.org/projects/backoffice-extensions/repeatable-custom-content control. This would result in a single item being stored under each workshop in the content tree, which represented all of the attendees. Querying on this could be difficult though, as we'll need to retrieve the workshops a user is attending to display on their profile screen.

     

    Does anyone have a view as to which option would work best, or if there are other alternatives available?

    Thanks,

    Phil

     

Please Sign in or register to post replies

Write your reply to:

Draft