Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

API ? interfacing 3rd party company software w/ perl?

by convenientstore (Pilgrim)
on Feb 15, 2008 at 23:55 UTC ( [id://668280]=perlquestion: print w/replies, xml ) Need Help??

convenientstore has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I have a question. I saw some guy writing a software that can interace w/ 3rd party software
He wrote a software in something and Launched it from command line(unix) to control some behavoir for software that's running in windows
This is way over my head at this moment, but just for curiosity factor, I googled API(I have no idea what it is, I just heard that it stands for application interface)..
Is that the right way to approach something like that if one was interested in writing something to interace w/ 3rd party software
Is perl right software to do that sort of work?
How does one find out what the capability of that 3rd party software and how to interface that?(I am thinking API)
Does one need to find out the API specifciation of that 3rd party(possibly from that website?) and write according to it or is this somethings that experinced programmar already know how to do?
I guess this is more of computer science questions(?) but since perl is something I am into and know(and no other cs background), thought posted out there here.
Any response would be greatly appreciated
  • Comment on API ? interfacing 3rd party company software w/ perl?

Replies are listed 'Best First'.
Re: API ? interfacing 3rd party company software w/ perl?
by Joost (Canon) on Feb 16, 2008 at 00:13 UTC
    Bunch of questions here.

    I googled API(I have no idea what it is, I just heard that it stands for application interface)..
    An API in general is whatever interface the program provides so that it can be "controlled" by another program (instead of a user). Some APIs are in the form of a library of functions, others may provide some kind of network interface/protocol for instance. Many programs don't have an API at all; they just rely on button/keyboard clicks or mouse movement.

    Is that the right way to approach something like that if one was interested in writing something to interace w/ 3rd party software Is perl right software to do that sort of work?
    If your target program has a public API, then it's usually the most reliable and easiest way to control it. Perl's pretty good at doing that kind of thing, but the devil is as always in the details.
    How does one find out what the capability of that 3rd party software and how to interface that?(I am thinking API)
    Search the web. Especially the site of the manufacturer. You may need to pay for this information. An API is controlled by the target program(mer), so the info on the API is controlled by whoever controls the program. Unless you're content to rely on hacks that might break at the next update.

Re: API ? interfacing 3rd party company software w/ perl?
by cdarke (Prior) on Feb 16, 2008 at 14:49 UTC
    To add to Joost's comments: An Application Program Interface (API) is supplied by the 3rd party and should be documented with the product. Many APIs are designed to be driven from C, being a fairly portable, generic, and widely known language. We can create a Perl interface by writing a variety of C code (known as XS) between Perl and the 3rd-party product. This code will use the API of the product and also the Perl API, see perlapi.

    Once the code is written (if in a language like C) then the 3rd-party Run-time libraries are linked with the program. This means that you must have those libraries in order to build it, and that might mean buying a license.

    Some examples: Windows has a C API, known as Win32. UNIX also has a C API, documented in UNIX man pages (section 2). Microsoft Office, on the other hand, only has the OLE API, it does not have a C procedural interface (which is a real pain). Most commercial database products have C APIs, and indirectly this enables interaces to languages like PHP, Python, and good ole' Perl.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://668280]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-24 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found