Hi Melania,

I happened to be looking at the Spring annotation-based servlets today.
I committed a change that should allow us to start using @Controller and
@RequestMapping attributes to map Spring servlets into the webapp. The
only examples in our current codebase of this are very simple cases:

opennms-webapp/src/main/java/org/opennms/web/controller/FrontPageController.java
opennms-webapp/src/main/java/org/opennms/web/controller/CategoryStatusController.java

Now that the dispatcher-servlet.xml context has been updated to support
the @RequestMapping annotations, it should be easy to start moving
legacy Spring MVC servlets over to the new annotation-based conventions.
The first priority for me is to move all of the servlets that inherit
from org.springframework.web.servlet.mvc.SimpleFormController since it
was deprecated in Spring 3.0 specifically in favor of using annotations
for your controllers.

Please let us know on this opennms-devel list if you have any questions
about this work! It will be great to move the code over to annotations:
it will make the controller code simpler and much easier to read and
maintain. Thanks!

Seth Leger
The OpenNMS Group


On 07/28/2011 01:42 PM, Melania Galea wrote:
> I am Melania. My google summer of code target is to finish converting the
> OpenNMS GUI pages to Hibernate. For the UI layer refactoring process, the
> SpringMVC web framework was chosen, which due to its underlying MVC design
> pattern offers the possibility to build flexible and loosely coupled
> applications. My mentor and I have managed to create a design for the
> controllers which are meant to process the requests and display a response.
> The controller classes are using annotations and autowired dependency
> injection which leaves out the burden of the xml configuration. They are
> also easily to be unit tested directly. All the logic regarding the requests
> is contained by the controllers since now a Hibernate session is
> automatically opened for all web requests. There will be no need for a
> separate service layer that handles the database queries. I have built a
> wiki page which will be more explanatory regarding the above topics.
>
> http://opennms.org/wiki/Annotation_Driven_Controllers
>
>   
>
>
> ------------------------------------------------------------------------------
> Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
>
>
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
>
> opennms-devel mailing list
>
> To *unsubscribe* or change your subscription options, see the bottom of this 
> page:
> https://lists.sourceforge.net/lists/listinfo/opennms-devel

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to