• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Framework to access Services from a Server...

 
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently, the services will use Servlets. (through this Framework)..but, later, the Servlets would be replaced by web services. But, the Swing Client will use the Framework so that we do not need to change many classes. Framework will protect the client. Can someone suggest me such a framework?
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the business problem you are solving here?
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the servlet return now - XML? Then you could argue that it is a service already. If not then you may want to standardize now on an URL scheme that you can use unchanged later when you switch to REST-style services, and on a response format you can use now and later (most likely XML or JSON).
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My servlets, return serialised objects. I am eager to know more on REST, can you provide my some good links on it.
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The http://faq.javaranch.com/java/WebServicesFaq has an extensive section with good links regarding REST.

Serialized objects are a Java-only technology, which goes against the spirit of web services. If your objects are JavaBeans you could use java.beans.XMLEncoder/Decoder for serialization. That would give you a shot at cross-platform compatibility and might still be usable in a more WS-style architecture.
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh Great tip. So I should plan my servlets not to use serialised objects, and use JavaBeans instead?
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The benefit is that if your objects can be represented as JavaBeans, then you get the (de)serialization for free. I'm not sure how well that works with more complicated objects (like nested arrays and collections), but it's easy to try and see what those classes create from those.
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic