What is your efficiency by deleting XML in Java projects?

I just moved from stage 1 to stage 2 of the project. In this transition, we got rid of the whole XML configuration for spring and struts2, switching to a fully annotated mode.

All participants are amazed at the actual effect it has on the speed of development. There are several reasons for this:

  • structured to think about what roles are needed to lead to a clear understanding that we need @StubRepository, @TestService and @NotTestService annotations to facilitate all the different models at runtime that our project uses (at runtime, unit test, integration test, selenium test)
  • These annotations have replaced a large number of duplicate xml definitions.
  • All dependencies are fully tracked in the idea.
  • Simplify working with code as dependencies are clear

Some of these accomplishments could probably be realized by restructuring the xml, but that would not be a trivial task.

I honestly believe that this gave an approximately 10% increase in productivity for our project of 20,000 man-hours. It's almost hard for me to believe.

Anyone else share this experience? What do you get and how do you explain it?

+3
source share
3 answers

Basically, this can be seen as a matter of configuration files and annotations.

If you are faced with a performance improvement when adding some data in the form of annotations, this means that they were not “configuration” material in the first place.

The difference between the two:

  • : , Java. - , , . , , , , , , .

  • -, . , Java.

, , - , .

: : , , . , , - .

+2

( , XML, , ...; -)

XML- ( , ), , : " ". (, XML) , , " " , .

, , " - ".

, , , ? , , , , ?

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

:

factory, . , . , . ( ). , , - .

, ( ..), .

.

+2

I do not have such performance indicators as you, but I saw a significant improvement in the transition from xml configurations to annotations. I think this is because the configuration information is in the same place with the code.

Before you had to search for a separate file to find configurations and slow down.

0
source

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


All Articles