Wednesday, December 9, 2009

E Hoʻomaluō - Version 2.0

After this somewhat long hiatus, I'm back to blogging about software engineering. Over the past few weeks, we worked on improvements to our original web application based on feedback from both Philip and the code reviews. However, we were also tasked with implementing two new pages; a stoplight page that shows the current carbon status and a grid information page that shows a chart of the energy generated by the sources on the island. We already went through the pains of learning Apache Wicket for the first time, so this should be a piece of cake, right?

As is often the case, things are more difficult than they appear. Sticking to our original vision of having AJAX for everything, we decided to implement everything using AJAX. This includes using an AJAX tabbed panel in Wicket to switch between the different pages. This task turned out to be pretty easy, but it also lead to our biggest discovery: Panels as partial HTML.

Panels in Wicket have their own HTML and Java files. They are not to be used as pages in the application; instead, they are designed to be inserted into an existing page. This could be because you want to reuse the component multiple times. In our application, I created a custom loading component that is used twice and can be used even more. However, I also found panels to be useful in that they separate components of a page into separate HTML files. For example, the grid information page has a header, form, and chart. Instead of having these components all in one file, they can be separated into three parts. Given that HTML support in Eclipse is fairly lacking, this made it easier to read since everything isn't in one long file.

What really completes panels though is that they can also be tested separately. Since the form and graph are dynamically generated, they are typically difficult to test. However, the WicketTester class has an option to start from a particular panel class. Then we can test the panel as if it were a page in Wicket, even though it's only a partial.

I also feel that I got more experience doing some web design. I've done some basic web design before, but this is the first time where I was involved with a significant application that was designed by me from the ground up. And I am very much satisfied with the design of the application. The application could've been cleaned up a little, but we simply ran out of time.

I do think our group process left a lot to be desired. The four of us rarely met all at once. Aaron and I spent some time outside of class and I think we got a lot done. But it would've been nice to get all 4 of us together more often. I took a more hands off approach for Dean's and Yichi's work because we rarely met. Our design and code would've been more cohesive if we all got together and worked on it.

Overall, I am quite satisfied with the application. There were many places where we stumbled a little, but I think we came out learning a lot. Development on the system will continue without me, as Philip has decided that any further refinements would be extra credit. On the one hand, I would like to see the project move forward. I have had many ideas for functions that could be added to the current application. However, the extra credit points won't affect my grade and committing myself to extra work for nothing during finals week seems like a really stupid thing to do.

Our project is again located here. There, you can download a distribution of our application.

No comments:

Post a Comment