Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
NickyYo
|
Posted - 2011.05.02 15:08:00 -
[1]
Just been curious of this for the past year or so. What are the benefits of using this? Isnt it best to code your own stuff?
|
Lutz Major
|
Posted - 2011.05.02 15:19:00 -
[2]
|
MJ Maverick
IronPig Sev3rance
|
Posted - 2011.05.02 16:41:00 -
[3]
Edited by: MJ Maverick on 02/05/2011 16:42:40 You want to import a characters corp into variable, so what are you going to do?
PHP XML this that - other this that other xml(this that rabble rabble) etc - etc boring now still boring xml this that probably - some - - loop - somewhere sad $corp = xml(this->that->boring->stuff);
OR... $api = coolPhealStufz(CharacterInfo => characterID); $corp = $api->corp;
Do I really need to explain? Some one has made nice shiny functions that save you hours upon hours of coding and banging your face against the API server. So why not use it? I refer to the triangle wheeled bike.
------------------ CCP are not perfect. :) [EVEOTS] Eve Online Teamspeak 3 API Registration
|
Hel O'Ween
Men On A Mission
|
Posted - 2011.05.02 16:54:00 -
[4]
Can't tell for Pheal, but I can tell you why I did my own stuff:
1) at the time I started EWA there was no 3rd party API warpper available which I could use. It needs to be either a COM component or native Win32 DLL to be useful for me. I might be mistaken, but AFAIK no such wrapper exists even today.
2) I have never coded anything XML-related, so I thought this might be a good excercise to finally become familiar with XML. And it was.
If I ever come around to port EWA to DOT.NET, I will most likely use one of the existing wrappers. -- EVEWalletAware - an offline wallet manager |
NickyYo
|
Posted - 2011.05.03 11:33:00 -
[5]
Ah okies thanks for the replies, was just curious. I'm a student studying this kind of stuff so il avoid it and code it from scratch. It's the best way to learn i guess.
|
Cyerus
Galactic Dominion Eternal Strife
|
Posted - 2011.05.03 12:10:00 -
[6]
Hi,
I've been writing my own functions to grab the API data, but I'm planning to switch to Pheal in the very near future.
Basicly the calls are the same, you still have to request a page (for example "/eve/CharacterID.xml.aspx").
require_once "Pheal/Pheal.php"; spl_autoload_register("Pheal::classload");
$pheal = new Pheal(); $pheal->scope = "eve";
$result = $pheal->CharacterID(array("names" => "Cyerus")); echo $result->characters[0]->characterID;
If you look closely, you'll see I set the scope to "eve" (basicly the directory of the information I want) and I request the "CharacterID" page to search for my nickname "Cyerus". After that I echo the value stored in the XML under tag "characterID".
Conclusion; I will be using Pheal, because.. ..it has the ability to grab error messages as an exception ..saves me the hustle of reinventing the wheel of dumping XML data into an array ..has the ability to a simple means of caching ..can output the bare XML file aswell, for example on debug purposes ..works just as fast or even faster compared to you making the functions yourself ..build in support for cURL ..and it's lightweight.
Hope this helps.
~Cyerus
|
Zeta Zhul
Caldari Preemptive Paranoia
|
Posted - 2011.05.07 20:38:00 -
[7]
Originally by: NickyYo Ah okies thanks for the replies, was just curious. I'm a student studying this kind of stuff so il avoid it and code it from scratch. It's the best way to learn i guess.
Yep. It really is the best way.
|
Johnathan Roark
Caldari The Graduates Morsus Mihi
|
Posted - 2011.05.08 03:59:00 -
[8]
Originally by: Zeta Zhul
Originally by: NickyYo Ah okies thanks for the replies, was just curious. I'm a student studying this kind of stuff so il avoid it and code it from scratch. It's the best way to learn i guess.
Yep. It really is the best way.
I disagree, use one of the ones already built, dig aground in the code and look to see how they did it.
POS-Tracker 3.0 Hosting |
Hel O'Ween
Men On A Mission
|
Posted - 2011.05.08 11:21:00 -
[9]
I disagree.
It depends, I guess.
- People are different in the way they're learning the best. Some do better by "reading", some do better by "doing"
- If a topic is completely new to me, I can't make sense out of other people's code most of the time. Only after I wrote some simple stuff dealing with the topic at hand myself and "get the hang of it", reading other code does help me. -- EVEWalletAware - an offline wallet manager |
Xander Hunt
Minmatar Dead Rats Tell No Tales
|
Posted - 2011.05.10 13:33:00 -
[10]
Originally by: Hel O'Ween I disagree.
It depends, I guess.
- People are different in the way they're learning the best. Some do better by "reading", some do better by "doing"
- If a topic is completely new to me, I can't make sense out of other people's code most of the time. Only after I wrote some simple stuff dealing with the topic at hand myself and "get the hang of it", reading other code does help me.
x2 EXACTLY... for me anyways.
I've always initially re-invented the wheel because it helps with understanding what is going on in the background, or at least how to deal with things when something else breaks. Time consuming, yes. Beneficial to me? Hell yes. Very rarely do I go rely on someone else for code (That doesn't say I haven't) initially as trying to understand why they used $a for a variable name that is used quite often, and not as a loop identifier, is more of a nightmare than anything. Once I've figured out how things are done, I will go and look at other peoples code to try and discern what they're doing. I've also found that when I start with code someone else wrote that sits in a "very close, but no cigar" scenario, trying to modify the code to do my bidding probably would have taken longer to muck with than writing the code ground up myself.
|
|
Zeta Zhul
Caldari Preemptive Paranoia
|
Posted - 2011.05.10 15:53:00 -
[11]
Edited by: Zeta Zhul on 10/05/2011 15:53:47
Originally by: Johnathan Roark
Originally by: Zeta Zhul
Originally by: NickyYo Ah okies thanks for the replies, was just curious. I'm a student studying this kind of stuff so il avoid it and code it from scratch. It's the best way to learn i guess.
Yep. It really is the best way.
I disagree, use one of the ones already built, dig aground in the code and look to see how they did it.
When you use a pre-developed package as a starting point what you've done is automatically accepted every tradeoff and assumption made by that developer. That -may- be the only recourse but often times if you start from scratch with no prior examples other than small code snippets to accomplish specific tasks then you've greatly expanded your horizons and you can then make -your- tradeoffs and assumptions.
Additionally by using a pre-developed package as a starting point you are also accepting the coding practices of that developer(s) as your own. This may be entirely sub-optimal.
Another point is that if you always use someone elses code as your starting point then you are crippling yourself simply because you will never actually do the underlying steps or code necessary to create such a package to begin with. I have friends who are completely and utterly incapable of coding without Visual Studio. VS has "helped" them so much over the years that they simply could not code a C#/.NET solution by hand using notepad.
Now that may not be a big deal to some, or even everyone. But it can definitely be an issue because I have been in a multitude of situations where such specialized tools simply were unavailable to me. Laptop missing a charger and goes power dead. Now you're stuck using someones computer that only has notepad on it while the customer is going ballistic because his system is down and he's losing a million an hour. What? You're going to download VS express? Install it? Configure it? Try loading an enterprise level solution into it?
*shrug* YMMV. IMO if you don't know the basics then really, what good are you?
PS: I have no problems with reading someones code -after- you have mastered your own. Then you know what to find, how to interpret, how to understand. And from that you can either learn more or learn how not to do things.
|
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |