The week didn’t start off on the right note. Dr Shawn was rather disappointed at the fact that I didn’t do something as properly as I should. I thought it was safe to assume the outcome of that particular thing, but Dr Shawn made me realize the error of my ways. He highlighted what it means to be a true professional software engineer. One thing about it is that professionals make sure they have concrete evidence when proving something. They could not just assume about something that may happen, when in actuality that might not be the case. Doing so would not only be costly to the business or the individual himself or herself, but to the lives of other people as well (think about the engineers who programmed those medical devices that are being used in an effort to save lives). Therefore,  we should always make sure that in anything we do, we should do it as properly as it should be. I had to remind myself that I am not doing some university assignment, but something far more than that.

Anyways, on to what I have done for the project. Briefly, the project basically involves building a web application to handle the registrations for a competition. At the end of the registration, it should output registration slips, certificates of participation and a spreadsheet containing the details of the participants, which would be used as input to a system done by a previous intern for the same client. The first thing that I did for the project was designing the database to store data regarding the registrations and implement its fundamental CRUD operations. Wt::Dbo was helpful in this situation. It wasn’t such a hill climb to actually implement it, however there are issues that I would need to address in the near future, such as the concurrency issue of read and write operations to the database. You can refer to a previous intern’s blog about it.

In the competition there are different categories, venues and also age groups, and each of them have different entry fees to be paid. We would represent these entry fees as products in a WooCommerce online store. Of course there would also be tickets for the general audience and maybe even merchandise for sale, but we are mainly concern with participants’ registration. The users that are gonna browse through the store would be mainly teachers or parents, who would want to register their students or children. These users just have to select the correct product, fill in their details, pay the required fee and then fill in the details of the participants. They basically place an order for the products. WooCommerce allows us to retrieve details regarding the order made and it is through webhooks, as mentioned in a previous blog post, that would send JSON data to our server. I implemented a class that would capture the JSON data, parse it and extract the essential details to be saved in the database.

Each order has a status in which it would determine what our application would do. I would not mention all of them here but, what I have done so far handles the part where the order’s status is in processing. In WooCommerce, an order’s status is in processing when the customer have confirmed their payment (we would create a webhook that triggers when an order is updated, which in this case, its status). Once that happens, we send them a link to a registration form within an email to fill in the participants details. I used POCO’s SMTP classes in my implementation, that send the emails to a third party SMTP server, which aids in delivering the emails to the registrants.

Next week, I would be working on the registration form itself, handling the other order status, as well as generating the outputs. So far I think my progress on the project is not too bad, but I know it won’t get any easier from now on. Dr Shawn wants me to finish up as early as possible so that we could spend a considerable amount of time testing. The race against time has already begun.


Leave a Reply