Criticism Of MVC using Struts : A better way to design an applications
To understand this, just rollback your clock few year before.That is there no ajax in the market. At that time its good to have conventional MVC pattern. As there is no way for a user to get new look on the browser with out refreshing a page i.e. to follow a http request-response cycle.
In actual there is no actual definition of MVC found till date and hence its implementation. Question is whether MVC is a good or bad design to develop an application.
To get real instinct of MVC just turn the coin from web application to desktop application.Actually this MVC tern came from desktop application.So far the best available definition for MVC is
Model: The domain model including data and procedure.
Views: What the final user will see.
Controller: The communicator between model and and views that translate model to view and view to controller.
Although this definition provides a clean division of the task.But at the same time time it result into the tight coupling between model and view that leads our application less maintainable.Although MVC pattern able to divide the responsibility but yet these responsibility are not concretely divided. As there are still dependence between them.
Now comes to the implementation of MVC. Struts have implemented the above definition successfully. There is front-end controller (Global controller). It leads our application where things are less centralized.This front-end controller have all the responsibilities to run the application successfully.If this centralized power fails due to any reason that will become disaster for our application.
Hence best way to concrete division of responsibilities is not on the basis of task type but what the task is.So it may be useful to partition the application as follows.Simpy retrieve input data( validate it using filters,Crypt the data,Format the data for smooth processing) , Process the data (Perform business and persistence logic) ,Output(Retrieve data after processing,Encrypt It,prepare it to display over User Interface ).


