From: Erik V. <eri...@xs...> - 2012-09-03 15:17:44
|
> It often might seem simpler to drop some restrictions of the core engine and > add the special rules inside the core engine. However this makes the core > engine less robust and might fail at some other places. > So I usually prefer to allow a little bit more complexity at the outer layers if I > can keep the core simple and unchanged. Of course, you want to have the layer where Undo/Redo are executed as simple as possible. That's the lowest layer, I understand. Another consideration is that the services offered to the application layer should be as simple as possible, in the sense that the application programmer should not have to worry about technical details. Such as how wallets are constructed. Now we have (at least) three layers (in my view). The terminology is mine (and I have used a similar concept successfully several times throughout my career in IT): 1. The application layer. In Rails, that's mostly the Round classes. 2. The service layer. Companies, Portfolios and such. I think the Managers belong here too. 3. The lowest layer (core). That is (in Rails) where you register States, move items around, manage Undo stacks etc. In my opinion, your "little bit more complexity" should be handled in the service layer. If that is what you intend to do, I'm happy. But if you put it in the application layer, then I start worrying. Erik. |