![]() |
Developers -- What do you use for APIs?
Obviously it depends on the project, but in general, what methodology do you prefer for developing APIs? Just simple HTTP POST / GET, XML, SOAP, REST, or? And in what format do you return the results? Raw text, name/value pairs, XML, JSON, serialized array?
I used to just pass XML request back and forth, and thought that was great. Then this young, ambitious, intelligent russian who now works for Microsoft convinced me to use SOAP for a large project we were doing together. Absolutely hated it at first, and couldn't think of a more complex way to send data between servers. Once you get the WSDL and everything in place though, it's actually great, as you don't even have to worry about the data transfer part. It's all just functions, plus it can easily be used across multiple platforms (PHP, Java, .NET, etc.). On to REST right now, with returning either JSON or serialized arrays, depending what they want. Gotta say, I think I found a winner! :thumbsup Clean, easy to develop, flexible, light-weight, and easy to learn. Perfect! How about you other developers? What do you use for APIs, and why? |
Compiled C++ API's?
To interpreter languages a simple query string. Sometimes, I think programmers/coders get paid by the line — they create overcomplexity. TMTOWTDI |
Quote:
|
We are using both SOAP, HTTP POST / GET, SMPP and some XML feeds.
I like HTTP as then I'm able to see exactly what's going on too :1orglaugh:1orglaugh SOAP appears to be very stable |
mixture of all of them, depends on the api im using
|
Quote:
Nonetheless, for larger APIs, I think I'm going withe REST from now on. Much nicer, and better to work with. :thumbsup |
Quote:
|
Quote:
Very difficult to use. Maybe i'll try it again in the future. |
Quote:
Code:
require_once(SOME_LIBRARY); Code:
$client = new SOAPClient(SOME_WSDL); Still overly complex though, and a pain though. :( I'll stay away from it, me thinks. |
Yep — that means?
|
Quote:
That means I have about another 5.5 years to get myself in a management position, where I never have to type a single line of code again. |
Quote:
I remember one guy that was offered countless times to take a management position. He did not want to: he just had more fun writing code. He may not have been the fastest in jotting down lines, but what he did was clean and *worked*. He had a singular gift for writing almost bugless code. We could have released his stuff with no beta testing. |
I am a Web Developer. I suppose that is like an Executive Producer in the motion picture industry (similar in function.)
Just for the record, SOAP is not exactly new ... I suppose the "how" part depends on what is needed to be achieved. If you define a "developer" as someone who develops necessary programmatic code ? I am the guy that specifies the necessary end result. Seeing how what you do fits into the greater picture is what really counts. |
@alf6300: There are exceptions to every rule. :)
|
|
We do the most in XML, we have for the eritoc partys and swingerclubs a XML feed to all pages, clubs, event companys, provider... most of them in plain PHP script.
the ticked system (book a place on a party, show, event...) is a mix of SOAP, php and shell sripting. we have a server only for the event reservation. on the webserver at the client side we run php script that puts a XML file on the drive without any database and crap, easy to run it on the remote server (club owner, event...). a shell sript checks every hour with a http request (wget/curl) the XML pages on the remote system, put them on a tmp folder and make a short check with a awk script, after them a php script put the informations into the database. steady customer have a direct access to the XML interface the send a POST request to the server like: <event>freefuck 2011</> <do>reservation</> <person>female:1 male:3</> with a easy fsockopen and fput php scriot. i dont like to code 200 include files and 500 php classes for a easy operation :-) here in germany we have ppl they are "HTML software architect" the need at least 2 inluce files and 5 classes for a "hello world" php script. Very funny is to see a php script that starts with: PHP Code:
|
SOAP is a pain with PHP when you want to add authentication to it "by yourself", ie. without using any other library.
For the REST part, I do like JSONP for its protection against XSS (no direct eval of JSON code here). |
The "devil" we know best is generally the "devil" we rely upon. This would explain much of the "swiss army knife" approach. The most simplistic (and generally the least lines, classes, modules, what have you) code that you can use, that will accomplish the task, is generally best ... |
Quote:
|
I prefer to keep things simple:
HTTP POST / GET. |
Right, perl rocks, and its easy like PHP.
|
Quote:
|
Quote:
EDIT: Sorry, Larry Wall developed Perl when he was 33, so I'm a little off with the under 30 remark. |
Right, as we age we understand our errors :)
|
Soap and xml sucks, way to much data for comm.
|
All times are GMT -7. The time now is 02:04 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc