It was nice to finally see what an application using this structure would look like, and to get an idea how one would actually use the supervisor idea presented in the last chapter to create an effective hierarchy. I'll admit I'm fuzzy on why the finite state machine was constructed in that way and built into the structure the way it was.
To answer the point about why would you construct a separate event handler from the server, I would assume it's because by splitting the two into independent modules we can allow for the full purpose of the structure to work for us. If both modules were combined into a single asset then any modules we built to deal with an error would need to be able to handle server and event errors, which may be being caused by such different conditions and solved in such different ways that we would be better off splitting them into two separate error handlers. And since we would need two totally separate error handlers that should be a huge clue that what we're trying to capture errors from is too complicated. Just because they seem like they serve similar functions doesn't mean we can lump them together without considering all possibilities and repercussions.
Thursday, November 5, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment