Forums Register Login

RESTful Architecture vs. servlet Framework

+Pie Number of slices to send: Send
Hello world,

i'm just new to webservices (thanks to ivan for your study notes !!!) and have a question regarding application architecture.
e.g. an architect wants to build a resource-oriented application based on RESTful webservices (http-binding). he talks about this
approach with a collegue (which is new to jax-ws) and after some time his collegue states the opinion that its better to do the
job using a plain old servlet framework like struts, turbine or spring.

what is your opinion about this ? which are the strong advantages of the RS approach ?

thanks in advance for your answers.

ulli

+Pie Number of slices to send: Send
I think there's some confusion over technologies:

  • JAX-WS is an API for SOAP-based WS, not RESTful WS


  • Struts et al. are web app frameworks - they're used for web pages, not web services


  • So if you're looking to implement a RESTful WS, check out projects like Jersey (the JAX-RS reference implementation).
    +Pie Number of slices to send: Send
     

    Ulf Dittmer wrote:I think there's some confusion over technologies:

  • JAX-WS is an API for SOAP-based WS, not RESTful WS

  • ....



    hi ulf, my understanding is that RESTful WS is fully supported in JAX-WS via Provider/Dispatcher/HTTP binding lowlevel programming.
    The following article explains this (with examples):

    http://www.oracle.com/technetwork/articles/javase/index-137171.html



    +Pie Number of slices to send: Send
    Yes, but that's a kludge. Using a SOAP framework for REST WS is not the best way to go about things.

    Also note that JAX-WS may support REST, but it does not support JAX-RS - which is the standard Java API for REST WS.
    +Pie Number of slices to send: Send
     

    Yes, but that's a kludge. Using a SOAP framework for REST WS is not the best way to go about things.



    Agree++

    You lose all the clarity of RESTful style by trying to jam it into a SOAP framework. JAX-WS is too tightly tied to JAXB and XML in general. Remember that a RESTful approach can serve any (repeat any) resource with equal facility.

    Bill
    (repeating myself I know, but read Fielding's Dissertation!)
    +Pie Number of slices to send: Send
    Hi!
    I am going to repeat myself a little too.
    Of course you can use servlets etc to build services, but the interesting question is (in my opinion) what the consequences will be.
    As before, REST is an architectural style which aim is to obtain certain goals as described in the Wikipedia article: http://en.wikipedia.org/wiki/Representational_State_Transfer
    In order to obtain those goals, you have to follow certain principles (also described in the Wikipedia article).
    It is possible to follow those principles when developing servlet-based services. I can also develop Object-Oriented software using assembly language - the question is if it is a convenient and time-efficient approach.
    Also, my experience is that the more clear patterns, for instance for developing a service, there are, the more likely it is that the result created by different developers is more similar. One of the risks is that there is no clear pattern how to develop a service using servlets. Using JAX-RS annotations, it becomes, in my opinion, much more clear.
    Best wishes!
    +Pie Number of slices to send: Send
    Rob Heittman once spoke to it in the context of Restlets at Differences between Servlet and Restlet.

    Regards,
    Dan

    +Pie Number of slices to send: Send
     

    Ivan Krizsan wrote:Hi!
    Using JAX-RS annotations, it becomes, in my opinion, much more clear.



    Agree
    +Pie Number of slices to send: Send
    Hello,
    I just came across this post and one article on REST. Just thought of posting it here if it clarifies some of the aspects.

    Here is the link.

    Regds,
    Amit
    WARNING! Do not activate jet boots indoors or you will see a tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 35510 times.
    Similar Threads
    RESTful webservices
    How to create a webservice for existing JSP application
    web pages: which technology
    JAX-WS or JAX-RS for RESTful??
    SOA Consumer scalable Architectures/Design patterns
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Mar 19, 2024 03:20:53.