These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
Previous page12
 

EVE REST API payload change request.

First post
Author
Miilla
Hulkageddon Orphanage
#21 - 2012-04-22 10:24:33 UTC
Steve Ronuken wrote:
Miilla wrote:
Now, what is SDE?


Static Data Extract

It's the database dump that gets updated every major release (then converted by people into alternate formats)



As for YAML:
SnakeYaml

http://stackoverflow.com/questions/4054083/is-there-a-good-yaml-library-for-android

total of 5 seconds of search on google.


Yes I know about it, thing is, I want to use platform libraries or a library I can redistribute with no issues in the license for paid apps and good support.

But they are using JSON so that isnt an issue now.
Miilla
Hulkageddon Orphanage
#22 - 2012-04-22 10:25:37 UTC  |  Edited by: Miilla
Dragonaire wrote:
You might also try looking at some of the other ways to parser XML as SAX just sucks IMHO Blink
http://www.ibm.com/developerworks/opensource/library/x-android/
It has a section or two on the pull parser which is much easier to work with and is similar to XMLReader from PHP it looks like.


I wont be using XML and SAX for the very reason you state, it sucks and an even bigger problem is that it is INCONSISTENT across some API levels for example, XPath is buggy across API levels.

Again , taking a dependency on external giblets (libraries) is a risk in both support and licensing issues when redistributing.

Great thing about JSON is it takes less code to process so I have less "plumbing" and more "app" in my app :)
Khorkrak
KarmaFleet
Goonswarm Federation
#23 - 2012-04-22 20:04:29 UTC  |  Edited by: Khorkrak
JSON is a subset of YAML.

XML is preferable when you can use xpath to avoid having to iterate through things to find what you need otherwise JSON is much easier to read and deal with both as a human and in code. Seems odd that XML processing is as borked as Miilla claims it is across android platform versions since they are using Java and in Javaland XML is heavily used for everything possible despite it being a particularly awful format for humans to have to deal with. For example, config files - lets use XML - bleah - that's where YAML comes into its own.

JSON is nice because its 98% Python - just fix the lower case true / false and convert null to None and voila. Blink

Developer of http://www.decloaked.com and http://sourceforge.net/projects/pykb/

Miilla
Hulkageddon Orphanage
#24 - 2012-04-22 20:53:15 UTC  |  Edited by: Miilla
Khorkrak wrote:
JSON is a subset of YAML.

XML is preferable when you can use xpath to avoid having to iterate through things to find what you need otherwise JSON is much easier to read and deal with both as a human and in code. Seems odd that XML processing is as borked as Miilla claims it is across android platform versions since they are using Java and in Javaland XML is heavily used for everything possible despite it being a particularly awful format for humans to have to deal with. For example, config files - lets use XML - bleah - that's where YAML comes into its own.

JSON is nice because its 98% Python - just fix the lower case true / false and convert null to None and voila. Blink



Android prefers JSON over XML, it is by design. XMl is there via a basic SAX library but does that even have Schema validation which is where XML gains benefit? I don't think it does (correct me if I am wrong, I dont use the SAX lib), JSON hasn't schema validation ether (there is a spec on that though) but not in the JSON library.

Lets not forget this is a mobile device and you want to keep your stuff lightweight. That is why REST and JSON is favoured on it, only an idiot is gona run SOAP and RPC based mechanisms over the air on them.

JSON maybe a subset of YAML but unless there is a native library or something CCP ships that we can redistribute, they may aswell be talking Swahilli.

yes XML is used on droid, for their form designer etc. but there has been reports of XPath being buggy and anyway JSON is so much easier to work with on the API on droid, so why not use it, not to mention the previous comment about traffic usage.

They COULD talk both payload formats easily without extra business logic behind it, just have dual interfaces on the Service contracts in WCF or base it on the parameter passed to change the ResponseFormat back to JSON from XML depending on the call.

But anyway that is all moot as they are going JSON, thank goodness.

The thing with droid development is you have to pick your minimum API level carefully, or you could cut out a huge part of your customer base (unless you control the "package" you can sell then you can supply whatever meets the feature bar).

The minimum API level u want is level 7 or 8, nothing lower, it is at API 15 publically currently (4.0.3) and even then that is narrow % out there. Most new devices are API 14 (unpatched to 4.0.3). 2.2/2.3 is more widespread cheap chineese tablets are 2.0 for some reason, most tablets are 3.0 minimum (fragment support) and new handhelds are 4.0).

If you want bluetooth SPD service, that is API 15 MINIMUM , which is crappy really lol as you cannot discover the UUID for the device service then unless you use reflection to call the private methods, which probably most are doing right now. This is what hit me, at first until I found out my device was using well known UUID's for RFCOMM, lucky me because I am talking over BT for augmented interfaces.

For XML you can use DOM's and XPath. Linq for XML actually just uses the XDom for querying. XML is like OOP, I was there back when it was all hyped up at the start, like OOP, both failed to deliver, they delivered bloat, and more problems as well as solving some problems. Both failed to deliver what they promised IMO :)

The only people that are using XML mostly are those that don't even know JSON or other formats exist. Most think SOAP is all there is for RPC, REST? uhh whats that ... JSON,... never heard of it... Most are 80%+ VB devs too...

I just want to build a house, not make the bricks too. I am a big believer in the less code we write the less issues we have... Declarative programming preferably :) Let me just tell the system what I want, it can figure out the how lol :)
Etil DeLaFuente
Aliastra
Gallente Federation
#25 - 2012-04-23 07:54:16 UTC
+1 for a JSON API, the actual xml version is crap and non consistent.



Previous page12