From: Stefan F. <ste...@we...> - 2014-05-05 10:27:19
|
> If so, that would probably be more a consequence of not knowing any better > than anything else. > When I started working on Rails (after Brett's initial work), I had got > neither much education nor much experience with Java, and so I had to invent > strategies mainly on my own > (many discussions with Brett notwithstanding. The XML processing approach > through the ConfigurableComponentI interface is from Iain Adams). > Erik: My (original) comment was mainly a joke, I hope you understand that. I consider the design used by Brett and you to be pretty well done given that there was no previous experience in building a 18xx program. I seriously doubt I would have been able to achieve that. And you really did very well in several aspects: The action-based save file, separation of engine and UI, state mechanism for undo/redo, extensibility, the xml based definitions and many more. It is more a refinement based on what worked out and what not. > I fully agree with that. One other consideration I have always tried to > adhere to was to keep the number of classes and class types as low as > reasonably possible, in order not to get lost in the kind of jungle that I > later noticed in another (and quite different) project. I believe that the mere number of classes is not an issue itself, however you need to keep them organized using packages. I even sometimes use nested classes to keep the class definition in one files and make them less visible. For example if you have a builder for a class, I prefer to define a Company.Builder instead of CompanyBuilder. Something I learned from googles guava library. Stefan |