Refactoring: Cross Cutting Concerns workaround -


In addition to aspects and point reductions, is there any way to implement cross-cutting concerns?

We are in Spring MVC, and are working on a business app where due to different aspects it is not possible to deal with aspects of Especus or Spring.

And some of our controllers have become extremely bloated (very heavy), each of which has many out-of-focus codes.

Every time I sit for a refactor, I see that the same things are being done up and down again. Allow me to explain:

Every time I have to create a scene, I add a list of countries for UI. (Added in the Object ModelAndView) that list has been dragged into the hahaches in DH.

Now, in the beginning it was terrible when I was trying to add inline to the list everywhere everywhere. Instead, I created a function that will be processed on every model endview. how? Well, with more garbage calls at the ceremony!

And I bought a problem for each other.

What is a design pattern / trick that can help me a bit? I am sick to call the functions to add things to my model Endview, and with only the controller code of more than 3500 lines, I'm getting mad that all the glue points where things have disappeared!

Suggestions are welcome. AspectJ or Spring Desire Resolve Concerns Concerns

Since you are using Java, you get the code as Scala, because it's Java Interact well, then you can use the properties to achieve your desired functionality.

Unfortunately, cross-cutting with OOP is a problem, so changes in functional programming can be a solution, but, I hope in reality they use AOP to implement these mixes. So, it will still be AOP, it is absolutely summarized.

The second option is to redesign your application, and to ensure that you do not have a duplicate code, but a major refactoring is very difficult and full of risk.

But, for example, you may end up with your model Endview, which has many stable utility classes for data needs, or make sure that the user has the right role, for example for.

You can see a book, refactoring pattern for some ideas.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -