2015. február 23., hétfő

Breaking DartRocket up

Maybe some of you noticed I finally started doing updates on the library(in form of git commits). After thinking about a lot about the library and how it structured. I finally decided to break up the big library into smaller sub libraries and I also started adding unit test for it. For now there won't be any new feature added to the library, because I feel that I need to make the unit tests first.

Why the sub libraries?
Whenever I see a big chunk of code I became  nervous, because I like simple and small things. Although I still wasn't sure about the sub libraries, because the big library structure worked, but I find out with a little test(making physics into a sub lib) that my project has high coupling , which was kind of like a punch in the face(Ughh). The final push came from StageXL, because it already used sub libraries. Once again the solution for my problem was to copy-past an idea from StageXL. :D

The night of the unit tests
I never really did any unit testing, because I kind of like to do Cowboy coding, but unfortunately it's not considered a "clean" way of doing software developments, so I started to write unit tests to make the code base cleaner and it's actually working.(Weird :D) At first I  will only do synchronous test, because I still have no idea how to write async tests.

That's all I can say for now.

Before I forget. Let me know if any of you want to jump on the DartRocket train.