arguments for choosing rest style web services instead of soap [closed] - web-services

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We are about to decide a common approach for intranet web services.
I find rest style web services much elegant and easier to implement.
I'd like to have more information about the pros of using rest style ws

The computing world is definetly leaning towards REST these days.
Principle advantages are:
Easier to setup service, as it can be as simple as installing a web sever and placing some resources in the file system.
Easier to implement service, you don't have to worry about complex XML's, WSDL, XSD with all the trimings thats make it hard to see what they are trying to represent and even harder to debug.
Better Performance, the additional data required in soap messages for namespaces, envelopes etc.. can lead to a big overhead which over time can have an impact specifically with mobile devices, especially when compared to return JSON messages.
Easier to develop clients for as you can implement a simple parser to process the response and if your client is javascript the use of JSON objects can be very advantages. It's also clearer to see what you are receiving.
It's how the internet was initailly designed to work, http is set up for this sort of interaction.
I hate SOAP

for me, this sums it up...
The main advantages of REST web
services are: Lightweight - not a lot
of extra xml markup, Human Readable
Results, Easy to build - no toolkits
required
SOAP also has some advantages: Easy to
consume - sometimes Rigid - type
checking, adheres to a contract,
Development tools

Related

What is a passive web service? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Our company is studying the adoption of a new SaaS, but we'll have to integrate some resources into ou current application.
Talking to the SaaS company development support team they told us that the there is a webservice (SOAP) available but it is a 'passive web service', and that the connection to the software needs to be initiated to send or recieve datas.
We have a very short time to take a decision, and the support team is not available on weekends, so I came here to stackoverflow... and would like to know more about it, because I googled and coudn't find anything about the subject
All web services are based on HTTP, which is a request/response protocol as written today. If the SaaS consultant means that there's no push capability built into it, then s/he's correct.
A web service can certainly send data in response to a request, so that's not a problem. It can receive any data you send to it, provided that you conform to the contract that the web service will publish. But in both cases the conversation is initiated by a client that makes an HTTP connection to the web service.
The SaaS consultant is creating mystery where there shouldn't be any. I think s/he smells cash, and you're going to be the source who will provide it.
It could also be that the consultant is being perfectly straightforward, but this is your first attempt to think about web services or service oriented architecture and you haven't the foggiest idea of what it's about.
You don't give any information on what you have to decide on or why that answer is unacceptable. There's not a single use case or requirement to help someone here understand what your needs are. I hope your understanding of the problem and requirements statements are better than this question. If not, no wonder you're having issues. Voting to close.

Web Services vs. REST APIs for Domino and XPages [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We have had in Domino for some time Web Services.
Now, after the release 8.5.3 one can install and deploy REST Services (http://extlib.openntf.org).
From my understanding the REST way is clearer and just feel right.
However, the Web Services are still for some reason here.
Now, as it looks like i'll have to dive deeper into this topic, i'd like to set the question:
Does it have any reason to study and try to implement the Web Services or i'd rather start right away with the newest libraries?
(http://www.openntf.org/blogs/openntf.nsf/d6plinks/NHEF-8J994J )
Update.
Discovered the following Link/Duscussion SOAP or REST for Web Services?
Though it's not Domino specific, but has a lot of good info. Now only some Domino-specific experience fails, which i'd be glad to see here...
SOAP beats REST by a large margin when it comes to system to system communication. Providing just one end point (the wsdl file) a reliable and verifiable grammar can be established: what can you do, what data is needed, what to expect in return. (Not sure if the latest we service spec extended the reliability to REST). REST based services on the other hand work by (manual) convention. You need to know the URL syntax, not just the location of the wsdl file and there is no relation to a schema other than doing a get and hoping the returned XML has one.
When it comes to browser system communication the picture is different. Here the lean operation of REST specifically when the payload is JSON beats the robust definition of SOAP any time. Just keep in mind you need to bar in for syntax and format. If you are on both ends - that's easy to bargin then.
In conclusion: both REST and SOAP (actually both are called web services in the definition, it is only 'colloquial' to refer to SOAP when saying 'web service') have their 'sweet spot' use cases.
It depends on your application needs. Your Domino app might have the need to consume Web-services, or a 3rd party/another app might accept communication only using Web-services. Regarding studying, it never did any harm to someone, and for sure you will find use of Web Services knowledge outside of Domino :-)

Web application architecture with web services [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to build a web application + web service just to learn some new technologies, and I was thinking about the architecture of the projects in the application. I made an architectural diagram (never made one before), but I was wondering if this is a good one, if it's reusable, and if I should stick with it.
Here is the diagram, waiting for your opinions. Thanks.
Your architecture diagram is in line with a common 3-tier architecture. Some other images providing the same idea.
The seperation between the UI / logic and database is needed as deployment pre-requisite, being able to scale-up and scale-out your application. The seperation between the DAL and the data source is for sake of DB technology abstraction, so you can privide compatibility with diffent DB technologies without your UI and business logic knowing this.
A bit more detailed picutre showing the different components and their placement in the layer pattern. But in principle, all follow the same high-level concept you have drawn.

what points i should consider to create API for a new website i am building? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What points i should consider while building a website, and planing to support users with API to use?
I see that most of famous websites are giving developers an API to deal with, such as facebook, twitter, google, ....
There are any general points i should consider while building a new website to be able to support developers with an API? "just very general points regardless the website service its self"
UPDATE all answers below helped me a lot.
Soap or XML
Depending on your application. If it is complex you might need the functionality of soap. KISS should apply with APIs especially. Have a sensible URL layout that makes sense in terms of resources:
www.site.com/people/london
As a resource.
http://en.wikipedia.org/wiki/Restful
Look into why using PUT, POST, GET and others is important.
Good Luck
I recommend the complementary PDF and presentation of Joshua Bloch's "How To Design A Good API and Why it Matters".
I imagine you would start off by identifying the functions (e.g., addUser, addStory, addComment, editXYZ, etc, depending on the type of website) that the websites supports, and the data that it provides (getCommentsForStory, getStories, getUser, ...), and creating a web service API for these functions, with appropriate security checks and so on.
If you've coded the website well, putting a web service layer in front of your website functionality should be quite simple (it's just another view on top of your controller and model).
The most compelling reason, IMO, to provide an API is that your site provides information and/or services that people will be motivated to interact with programmatically. Since you cannot prevent this (despite many site owners' hopes and dreams), it's better to embrace it, since providing an API means people can access exactly the information/services they want, reducing load on your systems.
One simple thing, that could save you a lot of hassle in the future - include the "API version" as part of your URL, something like..
www.example.com/api/v1/getAnswers/
If and when you decide to revise your API, you don't have to worry about all your URL's being backwards compatible (breaking existing applications), your users just start using /api/v2/ and you eventually depreciate the old version.
Among others, del.icio.us and github both do this
building a good api is hard and needs a lot of practice.
the first api you build should be the api of your enemy's website.
the second api is for your friend's website.
the third api you build is for your customers.

SOA - What Internal Web Service Did Your Company Implement First? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What internal web service did your company implement first? What did you learn?
One of the first movers was the "Customer base system".
The common authority for all customers in the company.
EDIT:
regarding the comment:
It did indeed open up for more SOA. It's about 3-5years ago (before me) and currently it was publicly known last year that the SOA helped the company switch from a 3years delayed system to a new one within a year.
Regarding other stuff:
Dont get me started on our SAP integration :S Thats 3 years old as well, and nobody is really able to debug or update the setup. Currently we are POCing webservice integration with SAP. Pheeew
We just implemented a credit card processing web service that allows us to process transactions from a Delphi POS system and a Classic ASP web site. Additionally, we are hoping to get it to work with a Java based IVR system.
The web service was written in ASP.NET (C#) and utilizes SSL encryption, XML, XSD validation and a load balanced web farm.
We have also recently implemented various utility services that do everything from address verification to creating orders in our ERP system.
Our first web service was actually externally exposed. It caused us to think about security upfront...
Let me see if I can get this conversation going. My company implemented a wrapper around the most common Active Directory look-up needs. I imagine this might be one of the most common things to do first in Microsoft/.NET shops.
Anybody implement a library of utility services? Write a facade to some SAP module? Wrap up some services for Human Resources? I'm curious to what people are working on.