Showing posts with label SpringMVC. Show all posts
Showing posts with label SpringMVC. Show all posts

Saturday, December 7, 2013

Getting started with Spring UI MVC, a basic WebApplication "download and play"

Something that literally runs me crazy is when you must spend one hour just to setup the basics just to be able to start working with a new product. Need to download a dozen files, manually hack a few XML... just to do a basic Hello World. So aggravating.

Existing tutorials also do their best to flood you with words and giving you only fragmentary instructions on how to get started.

In reality, nothing is more educational than having a ready environment to start playing with the product. Just give me that sandbox, a link to the documentation and shut up.

Here for instance there are instructions on how to get started with Spring Source Tooolkit.

Here is a "download and play" https://javatoolsforweblogic.googlecode.com/svn/trunk/wlavatar.zip Eclipse project. All you need is to install Maven and create the Eclipse variable MVN_REPO to point to your Maven repository, then open a prompt in the Project's root folder and type "mvn package". Have fun.



Saturday, March 12, 2011

Spring MVC

This is the official doc.

here a nice getting started guide http://www.giantflyingsaucer.com/blog/?p=2373.

And here a "Spring MVC + Hibernate" template application to get started in 2 minutes.

this presentation is quite impressive:

http://www.infoq.com/presentations/Mastering-Spring-MVC-3

although Web programming is really not my cup of tea, so I fell asleep after 40 minutes.


some notes here:

DispatcherServlet is the "universal handler"
defined in web.xml

the ContextLoaderServlet bootstraps Spring and make it available in the web context

the controller runs a scan in the classpath to automatically instantiate all beans

@Controller defines a controller
@RequestMapping defines a request handler


data binding and unmarshalling can be done automatically with annotations - and supports many technologies (REST, JSON...)

RooJavaBean generates getters and setters

Many standard arguments are supported and injected by Spring, resolved based on their type.