Oh my god. It's full of code!

Building the Check In Application Part 1

So I am undertaking my largest visualforce/apex project ever. I need to migrate a very complicated piece of software into the cloud. At it’s core, it is an application that acts as a sign in sheet. We schedule people to come to events we organize, they RSVP beforehand, and this application tracks the actual response rate, and in turn creates payment data. It is powered by one type of object, but creates another, one of the reasons it is a bit tricky. At it’s core though, it’s really just a big pageBlockTable with some counters and things. Other challenges I see are as follows.

1) Dynamic column names
It isn’t the same application every. There are 10 columns that MUST be renamed based on other conditions (the selected event). So when a user selects a new event, the names of the columns must change as well. Never had to deal with that before.

2) Filter as you type system
I need to allow my users to quickly locate an incoming person in the large list of people. A filter as you type system makes the most sense for this. Problem is, I don’t know exactly how to make one. I’ve done it in other languages, but never apex. The hardest part is I don’t know how to filter against a query that is already in the heap, as opposed to just running a new SOQL statement based on the filter criteria (which would be insanely inefficient in a filter as you type system).

3) Running Tally’s
As my users use the application, there are various counters that must be continually updated. If a person represents a certain demographic and checks in, that counter needs to be updated. Our events are only allowed to have so many of certain categories of people so these tally’s need to be accurate and fast. They also don’t exist anywhere besides in memory. So as soon as a record is changed, they need to recalculated. Probably not super hard, but again, it’s something I haven’t done on this platform before.

4) Column Sorting
The application needs to allow the users to sort the data in the table however they see fit. Of course this functionality does not exist nativity. I know there are articles on how to add it, but they look a bit tricky. I’ll figure it out I’m sure, but just one more bridge to cross.

5) Cross object creation/preventing dupes
This is maybe one of the hardest things to deal with. The application is powered by an object called respondents. These are people who are SUPPOSED to show up to the event (they told us they would). We need to track which of these people actually show up. For every one that does, we need to create a different kind of record called a payment. One payment per person, no exceptions. Even no shows get a payment (just a placeholder one though). Since I am taking one kind of data, and creating another, and not just saying the same data back, the risk of duplicates is high. I’m going to need to be careful about ensuring I don’t mess that up. My first though is as payments are created, have a lookup field on the respondent object that is a lookup to a payment. When the payment is created, populate that field on the associated respondent. So then in the future I can just see if that field is null, or populated. If it is populated, I update the associated payment, if it is null, I create a new one. At least in theory I think that should fly.

6) Usability
Of course, as always, trying to get the users all the features they need and not having it turn into a steaming pile of buttons and links is challenging. Going to have to work diligently to create a user interface that doesn’t bite, and since I’m a programmer, well that is going to be hard.

So anyway, I just wanted to start posting about this project. As I tackle each of these challenges I’ll update and talk about how it went, and what I did to resolve it (if I did). If you have any tips or tricks for me, feel free to drop my a line in the comments.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s