Research Log of Web Science Students

Computer Science is not simply programming

Now starting to REST

leave a comment »

Now that we’ve finished our project forms, all that’s left is to call the RPC service that we’ve made so that forms can be saved. But I’ll put that for another day. Now I am starting to work on throwing the link of a project to Projectrix.

I’ve done some research about this before only that I wasn’t able to blog about it.

Initially I wanted to to implement/call a SOAP web service but I found out that it was a bit too hard. REST web services are more human readable and I’ve had some experience calling a REST web service when I helped projectrix with accessing

So I guess I was sold on REST. The next part was how to integrate an implementation/jar with Spring MVC so that I can take advantage of dependency injection in Spring.

Turns out that the Spring version we’re using, Spring 2.5.6 doesn’t support REST just yet but Spring 3.0 does. I didn’t use the latter because up until now, it is still an RC.

That left me a bit discouraged and resigned to read a chapter in my Spring In Action book. So I tried to look for more solutions and to cut the long story short, I stumbled upon this blog post:

I love how it handles http requests like Codeigniter does. This type of http request isn’t a feature of Spring MVC.

 <bean class="carbonfive.spring.web.pathparameter.ParameterizedUrlHandlerMapping">
   <property name="alwaysUseFullPath" value="true"/>
   <property name="mappings">
       <prop key="/view/noparameters">controller1</prop>
       <prop key="/view/(bar:foo)">controller2</prop>
       <prop key="/view/(*.html:html)">controller3</prop>
       <prop key="/view/(**/*:view).view">controller4</prop>
       <prop key="/view/c/(*:controller)/(*:id)">controller5</prop>

I tried to do more research and saw a simpler solution.

I guess all that’s left do now is to read about the REST spec and implement/call the web service.


Written by Jose Asuncion

December 3, 2009 at 6:35 pm

Posted in Hardwire

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: