New MITB is Harbinger of Spring
Posted by Matt Soukup at 03/24/2012, 12:28 PM CDT
Towards the end of last year, I had MITB in a semi-working state. The chat was functional. Games could be hosted, joined, and fired. Decks could be rapidly constructed and piloted in solo mode. Finally, the gameplay with remote players was just functional enough to squeeze out some fun.
My vision for MITB was starting to coalesce. It was at this time that I could see that my “proprietary” server side framework wasn’t going to cut it. Not even close. I began to research Java MVC frameworks. The two major players seemed to be Struts 2 and Spring, but I felt like I wanted something more lightweight. At some point I was on board with Induction, but it didn’t feel sufficient.
I woke up one day with the seemingly insightful (and out of nowhere) notion that Spring was in fact the way to go. While it may be more complex, it’s a very popular framework with tons of reference material. It is also more than an MVC framework, which would help MITB in becoming much more robust. I soon started my mission of unlocking the power of Spring.
A couple of months later, and things are good. I basically started over, reusing code where I could. I’ve used Spring Security to learn about and implement a much stronger password system (and the “keep me logged in” cookie). I’ve added a service layer between the web and data layers and made them transactional. The app can now support multiple languages. I’ve written unit tests that cover approximately 90% of the working code. The web side has become more “RESTful”, but I’m still learning more about that. This is actually fulfilling my dream of creating the “perfect” system.
Besides Spring, the other areas that warranted a rewrite were the UI and JavaScript. I felt like I’ve been learning more about UI design through work, and I was becoming disgusted with the dialogs + tabs of version 1.0. YUI 3.5 will include an awesome new App Framework that makes possible things I could’ve only dreamed of a year ago. I also just reimplemented auto-complete using YUI’s AutoComplete widget and shored up a few other issues with improved support for multiple card arts.
After finishing up rewriting the Card management aspects, I’ll get started on redoing the deck editor. After that, I will integrate Spring and Comet, and implement the global chatroom. At that point, I think a beta is in order.
Cheers!