GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Developers -- What do you use for APIs? (https://gfy.com/showthread.php?t=1009129)

Kiopa_Matt 02-05-2011 08:12 PM

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?

Barry-xlovecam 02-05-2011 08:31 PM

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

Mutt 02-05-2011 08:31 PM

Quote:

Originally Posted by Kiopa_Matt (Post 17896441)
Then this young, ambitious, intelligent sexy russian who now works for Microsoft convinced me to join him in the shower, soon of course he 'accidently' dropped the SOAP and gave me that look, soon we were doing it together. Absolutely hated it at first, and couldn't think of a more disgusting thing. Once you "get it" and everything in place though, it's actually great.

:Oh crap

Due 02-05-2011 08:38 PM

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

fris 02-05-2011 10:56 PM

mixture of all of them, depends on the api im using

Kiopa_Matt 02-05-2011 11:01 PM

Quote:

Originally Posted by Due (Post 17896469)
SOAP appears to be very stable

SOAP is great in ways, but a pain in the ass to setup. If you've ever opened up Notepad, and wrote a WSDL file from scratch, you'll know what I mean. Has its benefits though. Once setup, you don't even know data is being passed between servers, and it's the same as calling any function within the software. Great concept, but unfortunately developed by Microsoft, so of course it's overly complex for no reason whatsoever.

Nonetheless, for larger APIs, I think I'm going withe REST from now on. Much nicer, and better to work with. :thumbsup

Kiopa_Matt 02-05-2011 11:07 PM

Quote:

Originally Posted by Barry-xlovecam (Post 17896456)
Compiled C++ API's?

To interpreter languages a simple query string.

Sometimes, I think programmers/coders get paid by the line ? they create overcomplexity.

Let me take a wild guess. You're 40+ years old, correct?

KillerK 02-06-2011 12:07 AM

Quote:

Originally Posted by Due (Post 17896469)
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

My playing with soap was terrible.

Very difficult to use. Maybe i'll try it again in the future.

Kiopa_Matt 02-06-2011 12:25 AM

Quote:

Originally Posted by KillerK (Post 17896635)
My playing with soap was terrible.

Very difficult to use. Maybe i'll try it again in the future.

SOAP is great, but has its limitations, and it a pain to setup. I think I'll stray away from it from now on. The great part is, once setup, and say you're using PHP, it's the same as including any library. Only difference is, instead of:

Code:

require_once(SOME_LIBRARY);
You use:

Code:

$client = new SOAPClient(SOME_WSDL);
That's it though. Then you just call functions as you normally would. $client->some_func($vars); type of thing, and you don't have to worry about the data getting sent to the other server. It all happens behind the scenes.

Still overly complex though, and a pain though. :( I'll stay away from it, me thinks.

Barry-xlovecam 02-06-2011 05:17 AM

Yep — that means?

Kiopa_Matt 02-06-2011 05:43 AM

Quote:

Originally Posted by Barry-xlovecam (Post 17896838)
Yep — that means?

Ever since I started in this field, back when I was 19, I've always pinned a developer's shelf life at 35 years old. After that, the creativity and innovation disappears, plus they can't competently keep their mind wrapped around 2000 different things at once, which is what's required in a good developer. I've always told my clients to stay away from hiring developers 35+ years old, as they're not going to be providing you with the most innovative, creative, and cutting-edge solutions, which is what's required to succeed as a business.

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.

alf6300 02-06-2011 06:11 AM

Quote:

Originally Posted by Kiopa_Matt (Post 17896850)
Ever since I started in this field, back when I was 19, I've always pinned a developer's shelf life at 35 years old. After that, the creativity and innovation disappears, plus they can't competently keep their mind wrapped around 2000 different things at once, which is what's required in a good developer. I've always told my clients to stay away from hiring developers 35+ years old, as they're not going to be providing you with the most innovative, creative, and cutting-edge solutions, which is what's required to succeed as a business.

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.

Not sure if that is a rule, but there are certainly notable exceptions... some of the best developers (= including writing code) i worked with, were 50+.

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.

Barry-xlovecam 02-06-2011 06:36 AM

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.

Kiopa_Matt 02-06-2011 06:38 AM

@alf6300: There are exceptions to every rule. :)

fris 02-06-2011 07:09 AM

http://www.programmableweb.com/apis

this is a nice link

Ex-centro 02-06-2011 07:31 AM

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:

<?
echo "<html>";
echo "[..tonns of html code]"
?>

its PHP baby ;)

sexy-frenchie 02-06-2011 07:34 AM

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).

Barry-xlovecam 02-06-2011 07:54 AM

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 ...

Code:

#!/usr/bin/perl
####################
print "hello world";

Perl is the devil I know best but there are lots of devils in this world ...

http://search.cpan.org/search?query=SOAP&mode=all

NemesisEnforcer 02-06-2011 07:56 AM

Quote:

Originally Posted by Kiopa_Matt (Post 17896850)
Ever since I started in this field, back when I was 19, I've always pinned a developer's shelf life at 35 years old. After that, the creativity and innovation disappears, plus they can't competently keep their mind wrapped around 2000 different things at once, which is what's required in a good developer. I've always told my clients to stay away from hiring developers 35+ years old, as they're not going to be providing you with the most innovative, creative, and cutting-edge solutions, which is what's required to succeed as a business.

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.

You can't be serious. I lose more money with young developers trying to sell me on the latest and greatest rather than giving me what I need. There is something called "cost effective" and that seems to go over the head of young developers. When you hit 35+ you will probably be a much better developer. Hang in there, it will only get better for you.

u-Bob 02-06-2011 07:58 AM

I prefer to keep things simple:

HTTP POST / GET.

Ex-centro 02-06-2011 07:58 AM

Right, perl rocks, and its easy like PHP.

u-Bob 02-06-2011 08:09 AM

Quote:

Originally Posted by Ex-centro (Post 17896971)
Right, perl rocks, and its easy like PHP.

and a lot more powerful!

Kiopa_Matt 02-06-2011 08:31 AM

Quote:

Originally Posted by NemesisEnforcer (Post 17896967)
You can't be serious. I lose more money with young developers trying to sell me on the latest and greatest rather than giving me what I need. There is something called "cost effective" and that seems to go over the head of young developers. When you hit 35+ you will probably be a much better developer. Hang in there, it will only get better for you.

The only fallacy with that is the people who developed things such as Google, Facebook, PHP, and Perl were all under 30. There's a reason for that.

EDIT: Sorry, Larry Wall developed Perl when he was 33, so I'm a little off with the under 30 remark.

Barry-xlovecam 02-06-2011 10:57 AM

Right, as we age we understand our errors :)

grumpy 02-06-2011 11:01 AM

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