And I am chiseling away at this project. Coded the registration form in true MVC fashion. As I said to Olivia today, they don’t call it software engineering for nothing. I had to really plan this out properly and code the components with lots of reuse in mind. It’s paying off, slowly.
So, I said, fuck it, might as well take some OOP features of Java and code some reusable error handling for forms. I came up with a nice idea of using a HashMap that stores keys of the form element identifiers and passing that object to the JSP page through the RequestDispatcher/Session. Once my JSP page has it, it checks if there are errors, and if there are, it outputs the error message and also marks off asterisks next to invalid form elements.
This is probably the kind of thing Struts/FormBeans handles for you easily, but I’m doing it from scratch. All in the name of knowledge, I guess. Is the time I’m spending on this from scratch > the time it would take to learn the Struts framework/deal with the issues arising from the Struts framework? Who knows. But at least I’m learning more, so I guess that’s why it wins out.
Argh, I need sleep. I’m so pathetic. I disabled Workrave, and so I haven’t taken ANY breaks in the last 2 hours.