In the previous week, I was helping Nadia to set up the server for the music competition and also did a few test run with her. Everything is working okay now, so Dr Shawn asked me to start focusing on my actual project this week. Basically, he wanted me to make some changes to the competition registration and marking systems. For the registration system, he asked me to replace both the hard-coded registration slip and registration email text to a template instead. And this can done by using WTemplate, a widget that can render XHTML template. Next, he wanted me to generate a QR code and put them in the registration slip and also I have to figure out a method to verify whether the registration slip has been sent. For the marking system side, what I have to do is to generate a report on the result of the competition. All of these are very new to me right now and I am a little bit worry on whether I can do that in time. But come on, this is the time to learn and I will try my best to get things done.
I started the week by looking at a documentation on Introduction to Wt, a C++ library for developing web applications. After going through the main concepts of the library, I got to do some hands on tutorials on building my first web application using Wt. As usual, Hello World is always the first tutorial in programming and I managed to create my first Hello World application by following the instruction. Of course, it wasn’t just blind copying, I started to understand the basic format of using Wt to create a web application but I am still so far away to understand Wt properly. As I moved on to the second example which is to create a Hangman application using Wt. I thought I know how to do it with the instructions but I am wrong, even with the instructions I am still stuck! I will come back to this later because I really want to fully understand how to create the hangman application by myself.
Afterward, I moved on to the second documentation which is introduction to Wt::Dbo. Basically Wt::Dbo is a C++ ORM(Object-Relational-Mapping) library. This library is distributed as part of Wt for building database-driven web applications. Since our registration system deals with database a lot, therefore Dr Shawn told me that I have to understand Wt::Dbo. Luckily, there are a lot of hands on examples in the documentation, so that I can see what the codes written do actually. After working on all the examples, I got a big picture on how to start a database session, querying and updating projects. It is very important for C++ classes map to database tables, class fields to table columns, and pointers and collections of pointers to database relations. All of these are clearly explained in the documentation. However, even though I managed to follow all the examples, but I still need to practice a lot because when looking at the source code of the registration system, I wasn’t very clear what is going on.
Lastly, I spent sometime reading on WTemplate because Dr Shawn asked me to start with generating a template for the registration slip. Basically, WTemplate is a widget that renders XHTML template which means that we can design the registration slip using XHTML. Unfortunately, there is only Wt::WTemplate class reference that I can refer to without hands on example, or at least I haven’t found yet. Still a little bit blur on how can I generate the slip with the help of WTemplate. But, we will continue next week! Not forget to mention, I would like to thank Dr Shawn for the lunch and movie treat last Wednesday. It was a fruitful session with all the colleagues and I personally had learnt something from Dr Shawn’s experiences.