1

We are in process of developing an Java based CMS related to travelling domain and are thinking about exposing web-services so that interested thrid parties can make use of them to fetch data/content from our system to publish in there portal/application

I am not sure how we should expose these Web-services and not able to get a clear idea about design prespective.

Since we have Action classes (Controllers) to handle view and send back data to view and these Action classes will be responsible for intracting with Facade layer.

Can some one suggest me what should be the best approach.

  1. Should we expose Action classes as Rest Interface Also.
  2. Should we create a seperate Set of classes which should be exposed.
  3. Should we go ahead with Rest style or SOAP based approach

myu question is a bit subjective but as of now without any direction i am not sure i can put any other information here

Update

As of now we do not thinking about booking tickets etc but most of the stuff will be with respect to only getting content out of the System. But might be in future we will provide options to offer some products to thrid party which can be sell over there appllication

Umesh Awasthi
  • 23,407
  • 37
  • 132
  • 204

2 Answers2

1

First of all you can take a look at Difference between REST and WebServices

then you must know, will third parties be able to change some data on your side (registration, authentication, booking tickets etc.). In this case using REST is more preferrable for me.

In my opinion, you should create some classes, which will be responsible for using your Action classes and they must implement some security features also. As I presume your Actions are internal stuff and security must be implementel on a higher level.

If the access is read-only (like get all data of type XXXX) then SOAP is also applicable.

So my suggestion: 2. Separate set of classes 3. User REST - though it seems to be more flexible.

Community
  • 1
  • 1
Alex Stybaev
  • 4,623
  • 3
  • 30
  • 44
  • Thanks for inputs, basically Action classes are Struts2 Action (MVC Framework) and yes from UI we have Spring security in place. – Umesh Awasthi Mar 26 '12 at 10:28
0

Expose Action Classes as URLs if you want to save time and effort overheads.

But, REST APIs would be your best bet in long term as they are scalable and if later on if you want users to update/create data through APIs.

shashankaholic
  • 4,122
  • 3
  • 25
  • 28