Closed iluwatar closed 3 weeks ago
Hello @iluwatar
I was thinking, should we have both the command and view parts in our solution? This way, commands can deal with the business side of things, while views can handle how things look to the user. So, when a request comes in through the FrontController, it would go to the dispatcher. There, it would get sorted out for both the business side and how it looks on the screen. Does that sound good to you? If it does, just let me know and I'll get started on it.
Yes, I think there already are the Command
and View
hierarchies. At the moment FrontController
is handling the Dispatcher
responsibilities as well and this should be fixed.
commands can deal with the business side of things
Yes, and just to get on the same page, command should encapsulate the request.
I'll assign to you @Mayankchoudhary294
Hello @iluwatar The PR is ready for review. Could you please take a look on it? Thanks
Description
The Front Controller design pattern typically consists of the following key parts:
Looking at the provided code from the front-controller module, it seems to have the Front Controller (FrontController), Command (Command), and View (View, ArcherView, CatapultView, ErrorView) components. However, it appears to be missing a distinct Dispatcher component. In the current implementation, the Front Controller (FrontController) is directly handling the dispatching of requests to the appropriate views. While this might work for a simple application, for a more complex application with a larger number of views, having a separate Dispatcher can help keep the Front Controller from becoming overly complex and hard to maintain.
Acceptance Criteria