Announcement Announcement Module
Collapse
No announcement yet.
Why Spring likes annotations? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why Spring likes annotations?

    I've noticed that Controller's hierarchy had become deprecated. Why? Was it bad or what? For me XML is more intuitive and all in all it's the matter of tastes. So why Spring tries to get rid of XML based development?

  • #2
    You've misunderstood the intent. It's simply a realization that the best approach is a combination of annotations and XML configuration. Some things work well as annotations, some as XML config.

    Comment


    • #3
      I understand that for some people that may be true, but not for all.. I don't like annotations and prefer XML instead almost everywhere; that doesn't seem bad to me.

      Comment


      • #4
        Originally posted by ctapobep View Post
        I understand that for some people that may be true, but not for all.. I don't like annotations and prefer XML instead almost everywhere; that doesn't seem bad to me.
        annotation can reduce your configuration in xml, making the xml file and java file much simpler

        Comment


        • #5
          We could dispute a lot, but this doesn't make any sense, I like XML approach and have reasons for that. What I'm asking is why would Spring Community make XML approach deprecated just because they like annotations more? XML approach doesn't become bad because some people like annotations more.

          Comment


          • #6
            Well the new annotation based strategy is more agile, less cumbersome and less tightly coupled with the framework itself, making it the top choice for web mvc developers, I think it's so clear that it's impossible to disagree.

            That said, interface Controller and its implementations (FormController etc.) are still there so if you really want to stick to them, just do it. Deprecated doesn't mean "don't use them", it means "we (Spring developers) advise you chose an alternative that we deem to be better, but you can do what you want".

            Comment


            • #7
              Thanks for your answer.

              Comment


              • #8
                Enrico: I agree with all you are saying, the main problem is that new Spring 3.0 release notes specify those controllers will be removed in further revisions. I think thats a bad choice for many reasons (http://forum.springsource.org/showthread.php?t=95126).

                Also, is not good to deprecate a production component that has no bugs nor issues unless a full re - design is needed (that's actually what you are doing). But many of us simply can't understand why.

                Originally posted by Enrico Pizzi View Post
                Well the new annotation based strategy is more agile, less cumbersome and less tightly coupled with the framework itself, making it the top choice for web mvc developers, I think it's so clear that it's impossible to disagree.

                That said, interface Controller and its implementations (FormController etc.) are still there so if you really want to stick to them, just do it. Deprecated doesn't mean "don't use them", it means "we (Spring developers) advise you chose an alternative that we deem to be better, but you can do what you want".

                Comment


                • #9
                  Hi,

                  I'll answer you in your poll thread.

                  Enrico

                  Comment

                  Working...
                  X