Welcome Guest, Not a member yet? Register   Sign In
API, REST, SOAP, XML-RPC, WTF?!?!
#1

[eluser]slowgary[/eluser]
Hi guys,

I'm considering writing an API for a project I'll be working on soon, but I'm not 100% sure of what an API even IS or if it's the best route. I hope you can help.

I've used the USPS Webtools API which allows me to send a chunk of XML to a certain URL and receive a chunk of XML in response. I do this with cURL and use SimpleXML to access the return object. Everything works and I'm happy ;-p That's the only API I've ever used , unless jQuery or CI are considered APIs as I've seen threads about the "CodeIgniter API Doc" which confuses me because I always thought of an API as a sort of black box where you could pass some GETs or POSTs in and you could receive some back. If anyone could add some clarification to my confusion I would greatly appreciate it.

So as far as writing my own "black box", I'll be putting together a site that sells custom made products with a very difficult pricing model. The company has previously had several sites made and they've alway been very spaghetti coded and can barely get the pricing right, additionally the UI is TERRIBLE and so inefficient that most customers end up calling to get a quote or place orders by phone. Since each site has re-implemented the logic for pricing, my idea for a solution is to abstract the pricing logic as an API that could be used in the future so that this problem will never have to be tackled again. Even if the next site ends up on a windows server in ASP.NET, the site could query my CI/Linux/PHP/MySQL based pricing API. Does this sound like a smart approach?

Can anyone also shed some light on all of the acronyms surrounding this topic? I know what the letters stand for, and I've done a lot of searching on the topic, but all I ever find are articles talking about 'Web Services' or 'a way to pass routines and data structures'. What my brain needs is an explanation of what each of these acronyms actually DOES as it relates to the code. So if I were to explain to someone how the USPS Webtools API worked, I would tell them: "You can build a string of XML tags, send it to this URL with cURL, and access the resulting data like this...".

Do the differences between REST, SOAP, XML-RPC have anything to do with the type of data that's exchanged? Are these terms synonymous? I've looked at the XML-RPC class in the user guide but I don't understand it, and I tend to shy away from things I don't understand. The class doesn't seem to mention anything about the order of parameters for a call - are they required in a fixed order as a function call is? I like the XML approach as it doesn't matter what order the data is in, each piece has it's own descriptive name.

Can anyone tell me what type of API the USPS Webtools API is? Where do I go from here?

Please help. And thank you.


Messages In This Thread
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 07:44 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 08:18 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 08:27 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 08:47 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 10:19 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 04:39 PM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 04:39 PM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 05:13 PM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 05:32 PM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 06-07-2009, 06:03 PM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 11-27-2009, 05:14 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 11-27-2009, 05:53 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 11-27-2009, 06:15 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 11-27-2009, 06:35 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 11-27-2009, 08:21 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 11-30-2009, 05:08 AM
API, REST, SOAP, XML-RPC, WTF?!?! - by El Forum - 11-30-2009, 06:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB