Joined: 18 Dec 2003
Posts: 13497
Location: Behind You
Posted: 01/28/09 18:43
Thanks, I found that but wasn't sure if there was something already there for it that I was supposed to use.
I guess I'm still a little confused where some of the functions are to be used, and where to just dig stuff from the php docs. Have you only listed functions where its not just a one liner in php, or completely specific to jamrooms internals?
Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA
Posted: 01/28/09 18:44
djmerlyn:
Thanks, I found that but wasn't sure if there was something already there for it that I was supposed to use.
I guess I'm still a little confused where some of the functions are to be used, and where to just dig stuff from the php docs. Have you only listed functions where its not just a one liner in php?
If it is listed in the Jamroom Function Reference:
Joined: 27 Apr 2006
Posts: 22009
Location: Southern California
Posted: 01/29/09 01:35
Jamroom has lots of "streamlined" functions that make things easier than having to do a bunch of regular php functions, i.e. instead of having to do fopen, fwrite, and fclose to writes something to a file, you can just use Jamroom's writeToFile() function.
Joined: 18 Dec 2003
Posts: 13497
Location: Behind You
Posted: 01/29/09 12:18
smith.kyle:
Jamroom has lots of "streamlined" functions that make things easier than having to do a bunch of regular php functions, i.e. instead of having to do fopen, fwrite, and fclose to writes something to a file, you can just use Jamroom's writeToFile() function.
See, its sorta confusing for me because;
"Jamroom Module API"
I can't really think of this as an API anymore, the name just doesn't fit what this is to me. To me, the ranking system is an API (you pass specific data to a script and get data back, wrong data passed to the script and you get nothing).
This is more like an external hook to third party scripts, or a folder where you can add changes and functions that won't be overwritten on upgrade. I think of an API a lot more like the ranking script where you have to create data a certain way before passing it to a script in order to get anything back from the script.
Most API's that I've worked with don't work like the jamroom modules at all. They have a very specific interface for communication, sometimes they take XML input and sometimes they take post data, but one way or another the data has to be formatted exactly how it wants it or it won't work.
This is more like, you call a specific file from jamroom in to the top of your script and poof you're in and can do what you want That doesn't strike me as an API, but as an external hook in to an unused directory.
I approached this with the idea that it was an API, where I need to format my code very specifically for jamroom to take it. So I keep grooming the docs for a point in the right direction, but its very open "do this and this, then write whatever php code you want".
Not that there is anything wrong with calling it an API, but it just doesn't strike me as an API at all which has left me a bit bewildered. The existing scripts (ranking, comments, guestbook, etc...) act much more like an API to me then the module system.
But either way, this is cool so that something custom can be built- and you don't need to re-do it on every upgrade
Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA
Posted: 01/29/09 12:24
djmerlyn:
smith.kyle:
Jamroom has lots of "streamlined" functions that make things easier than having to do a bunch of regular php functions, i.e. instead of having to do fopen, fwrite, and fclose to writes something to a file, you can just use Jamroom's writeToFile() function.
See, its sorta confusing for me because;
"Jamroom Module API"
I can't really think of this as an API anymore, the name just doesn't fit what this is to me. To me, the ranking system is an API (you pass specific data to a script and get data back, wrong data passed to the script and you get nothing).
This is more like an external hook to third party scripts, or a folder where you can add changes and functions that won't be overwritten on upgrade. I think of an API a lot more like the ranking script where you have to create data a certain way before passing it to a script in order to get anything back from the script.
Most API's that I've worked with don't work like the jamroom modules at all. They have a very specific interface for communication, sometimes they take XML input and sometimes they take post data, but one way or another the data has to be formatted exactly how it wants it or it won't work.
This is more like, you call a specific file from jamroom in to the top of your script and poof you're in and can do what you want That doesn't strike me as an API, but as an external hook in to an unused directory.
I approached this with the idea that it was an API, where I need to format my code very specifically for jamroom to take it. So I keep grooming the docs for a point in the right direction, but its very open "do this and this, then write whatever php code you want".
Not that there is anything wrong with calling it an API, but it just doesn't strike me as an API at all which has left me a bit bewildered. The existing scripts (ranking, comments, guestbook, etc...) act much more like an API to me then the module system.
But either way, this is cool so that something custom can be built- and you don't need to re-do it on every upgrade
I'm not sure of your familiarity with API's in general, but Jamroom's API is pretty straightforward. Basically the Jamroom functions provide an "interface" to Jamroom's functions (i.e. saving info, showing info, display things, etc. - in the "Jamroom way"). Like a C API, or jQuery (javascript) "API", you're never stuck using only what is in the API, but can always go outside the box by using your own commands and code ALONG with the API.
What you are referring to sounds more like a REST style "interface" - i.e. something that performs a very specific function based on criteria you pass it.
100% of API's that I've used (so far) work this way, you specifically format something then send it to another script and if your code is right it accepts it, processes it and sends something back. I use this type of API system every day and it makes perfect sense to me.
This is sorta what I had expected of JR's API system because, well because its called an API. I like the way it is "actually" set up because its far more free then a typical API, but it still doesn't strike me as an API like what I'm accustomed to.
Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA
Posted: 01/29/09 12:34
This is a SOAP Web Services request - not an API However, I think the acronym API is used all over the place now, and probably means some different in a lot of places.
Jamroom's API can be thought of as a functional library that provides an "interface" into Jamroom's functionality.
Joined: 18 Dec 2003
Posts: 13497
Location: Behind You
Posted: 01/29/09 12:38
bigguy:
This is a SOAP Web Services request - not an API However, I think the acronym API is used all over the place now, and probably means some different in a lot of places.
Jamroom's API can be thought of as a functional library that provides an "interface" into Jamroom's functionality.
Hope this helps!
- Brian
Yeah, see they call it an API. Cpanel uses a similar XML system which they also call an API. Our shoutcast system also uses an XML/SOAP system also called an API. Our billing software too, same type of deal. This is why I've been so confused. I think if I just ditch the jamroom modules docs, to check my work, and strike out on my own I'll be just fine
Joined: 18 Dec 2003
Posts: 13497
Location: Behind You
Posted: 01/29/09 12:42
Quote:
Web services are frequently just Web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.
Boy, I thought I was nerdy, but clearly not enough