To be and not to be with repeating patterns

In my new assignment, I inherited this old fragment, which I had to redesign and reorganize. The scope was initially limited by the level of presentation, which turned out to be the largest of all. During the analysis, it was realized that the application was built over a certain period of time using different modules using different classes to display the same model.

These models are actually used to bind information to both the view and the db level (code reuse?). Binding logic is a complex procedure and has stabilized after several rounds of testing. Now I have this dilemma: save these semantically repeating but syntactically inconsistent models or start from scratch. The second option means revising the entire application, and the graphs do not allow this, but I have a bad idea. Can you guys share some thoughts (pros and cons) and any unforeseen problems that I may encounter in the future.

Giving the following analogy, which closely reflects the state of affairs.

  • To begin with, there is a user data module that looks more like a getter. The view is rendered using the TO (transmitting object) structure provided for this. Say 'Class UserInfo'
  • Later a new requirement appeared, and the right to edit the details was granted. The one who encoded it decided that they would use the new TO structure and create their own "Class UserEditInfo". What type of super-kit is an earlier class.
  • Finally, at another point in time, a new enhancement was created to track user transactions and guess which new "Class UserDetails" was created.

, JSP, - ( ). , . ,

+3
4

, , , .

, , - , (, ) . IDataBindingsModule, , "" ( ) .

IDataBindingsModule, , , , IDataBindingsModule .

, , , .

, , , , - .

+4

, 1 1 , .

, . - ( ). - , .

. . , , .

+1

, . , .

.

, .

0

, Adapter, . , , .

Over time, you can reorganize the fragments that you want to change, while still being able to verify the results obtained against the function application.

0
source

Source: https://habr.com/ru/post/1698064/


All Articles