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.
 

[Question] Which code does the EVE API work best with?

Author
Quince Rin
Doomheim
#1 - 2016-07-11 18:04:19 UTC
As the titles states, here's an explanation:

I am interested in learning a coding language and building a website but I'm not sure which code language I should learn so I'd like to figure out what the EVE API works with best.

Quince Rin

Director of Special Operations

Salgare
Violence is the Answer
Wormhole Society
#2 - 2016-07-11 19:15:06 UTC  |  Edited by: Salgare
Quince Rin wrote:
As the titles states, here's an explanation:

I am interested in learning a coding language and building a website but I'm not sure which code language I should learn so I'd like to figure out what the EVE API works with best.


The backend eve server does not care what language is used to generate the purely string based structures that are passed back and forth. It will not work any better with any given language.

What you want to ask is what will work best for you.

It's the age old dilemma for any programmer/company when starting a new project, what technologies should we use? When it comes to Web applications, these technologies choices lock you into a solo that spans a wide spectrum from what tools you will need to develop/debug to the deployment and maintenance of web servers to run it on.

A funny truism in programming is never put out a prototype as it will always become the end product. Of course this always happens and likely your best choice is a platform that was intended for quick prototyping but became an animal product of its own.

My advise would be based on your long term interests in programming in general. The learning curve for anyway you go will be steep. Pick a silo that will meet your long term (if you have long term) goals with programming.

eta:
If you want to give the java/eclipse/maven/jetty/tomcat silo a go, try the following site:

https://wicket.apache.org/learn/examples/
Admiral Blue
The Scope
Gallente Federation
#3 - 2016-07-12 08:01:09 UTC
As mentioned above pretty much any language will work just fine. If you're working with the XML API than a language which has a good XML library is really important. CREST is JSON and it tends to be easier to work with.

With all of that being said most languages have really good libraries already for working with the XML API and I would highly suggest looking into one of them for your chosen language.
Hel O'Ween
Men On A Mission
#4 - 2016-07-12 16:25:40 UTC  |  Edited by: Hel O'Ween
The important bits have been covered already, so let me add an additional suggestion for picking a language. Although you specifically mention that you want to build a website, you might - one day - be intersted to also code a desktop application. With that in mind, you might want to pick a language/framework that would you allow to do both. While most languages let you do both, most of them are also specialized in one, making the other - although not impossible, a real PITA. For example PHP is a language that excels at web development, but lacks for traditional application development. C++ is the opposite.

Two popular languages (or better: frameworks) come to mind which cover both euqally well: Java and .NET (and although I'm a BASIC guy, I'd suggest to go with C# there).

EVEWalletAware - an offline wallet manager.

Salgare
Violence is the Answer
Wormhole Society
#5 - 2016-07-13 05:53:30 UTC  |  Edited by: Salgare
Hel O'Ween wrote:
The important bits have been covered already, so let me add an additional suggestion for picking a language. Although you specifically mention that you want to build a website, you might - one day - be intersted to also code a desktop application. With that in mind, you might want to pick a language/framework that would you allow to do both. While most languages let you do both, most of them are also specialized in one, making the other - although not impossible, a real PITA. For example PHP is a language that excels at web development, but lacks for traditional application development. C++ is the opposite.

Two popular languages (or better: frameworks) come to mind which cover both euqally well: Java and .NET (and although I'm a BASIC guy, I'd suggest to go with C# there).


Hel O'Ween brings out a good point, in the day, we referred to them as "thick" or "thin" clients. I good thick client (desktop only) supports hot-keys, accelerators and mnemonics. Thin clients (browser web apps) were basically considered thin because of their lack of support for those previously mentioned three. In Java, AWT/Swing was the original means to a thick client.

Now there is one other dimension that you want to consider as you pick your silo. Much like Hel O'Ween's question of thick or thin, be ready to do both, there is the question of what platforms will it run on (i.e. android, ios, windows, linux, mac) .

Note: java is free, linux is free, linux is the defacto preferred middle-tier os. java will run on all those platforms but ios. Have you ever coded to ios -- hehe

Now, hands down, if you are thick client centric C# (which is java, well long story) is by far the prettiest gui's

Otherwise, java is your friend.

eta:

I hinted to your best choice in my first post if you are just playing around and not into any long term programming etc interests. I was hoping someone that knew about it would chime in for you.

I assume it's fair to say that the majority of EVE 3rd party api's, tools and applications are written in Python.
Dragonaire
Here there be Dragons
#6 - 2016-07-14 06:39:48 UTC
Quote:
I assume it's fair to say that the majority of EVE 3rd party api's, tools and applications are written in Python.

I wouldn't really say that myself since there are a lot of third party web site applications and they do tend to be done with PHP or a mix of PHP and something else.

I always seem to be the odd person out because I see PHP as a great general language while many people just see it as something for web pages but that's okay Blink

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Salgare
Violence is the Answer
Wormhole Society
#7 - 2016-07-14 14:35:02 UTC  |  Edited by: Salgare
Dragonaire wrote:
Quote:
I assume it's fair to say that the majority of EVE 3rd party api's, tools and applications are written in Python.

I wouldn't really say that myself since there are a lot of third party web site applications and they do tend to be done with PHP or a mix of PHP and something else.

I always seem to be the odd person out because I see PHP as a great general language while many people just see it as something for web pages but that's okay Blink


Seems we long scared off our friend. I really should expand my horizons and learn some other languages. I've noted the Dragonaire's posts and that you know what the heck is going on in these realms, much respect.

Python has it's jpython, is there some equivalent of jphp? Possibility of message queue interfacing (rabbit)? Any real reason for other scripting languages like php and python to utilize something like the java caching framework I'm working on?

Perhaps I've made a bad assumption that scripting languages will excel, with ease of learning/coding for the view/web tier side of things and let java do what it does best ... middle/business/db tier control and model.
Dragonaire
Here there be Dragons
#8 - 2016-07-15 18:53:07 UTC
The thing is all these things - middle/business/db tier control and model - are the things PHP has been doing on it own well for years. LAMP - Linux Apache MySQL PHP there's a reason PHP is in there because it's very good at doing DB as well as all the web page stuff that tie everything together.

There might be something like jpython for PHP but not that I know of. I think the reason being that most extensions for PHP use the c libs that are usually developed first for stuff and use them directly without any need of any special interfacing or extra middle-ware.

I'd really encourage you to try PHP especially version 7.0 I think you'll find it a lot more pleasant to work with. I seen and changed what was 20 lines of thick hard to understand Java code into one or two line or easy to read PHP. Programming just doesn't need to be as hard as they have made it with newer versions of Java. There was a time when Java was fairly new that I thought Java was great but they have just kept adding more and more died weight to it until it's become painful. As I always say Java hasn't meant an exception it didn't fall in love with Blink

A language I just started look at myself to maybe learn is rust. It's the first language I've seen that I can foresee replacing C in systems programming since it can do the low level hardware driver work while still having the type and thread safety you usually only find in higher level languages. I haven't decided if I'm going to try really learning it right now since I probably don't have a project where I need it but if I ever do I will be keeping it in mind for sure.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Salgare
Violence is the Answer
Wormhole Society
#9 - 2016-07-16 02:00:21 UTC  |  Edited by: Salgare
Dragonaire,

I need to check it out, but I assume my focus is different. It is also possibly total overkill for any eve applications. I've been professionally coding java since 1995, and coded c from 1981 until then. Typically other teams prototyped demonstration applications in scripting languages for early adoption and then it was turned over to us for implementation.

I can not image an automatic script mapping to some of the DB's we have done, most of which end up with moving the prepared statements to stored procedures for not only speed but security as the better db's provide another level of access control over these custom db api's.

Maybe they do it, but I can't see scripting languages providing the functionality of the likes of the Concurrent Collections I'm using for priority queues in combination with Executor thread pooling for asynchronous clients, event driven callbacks etc. I would also assume that scripting languages will have limited scalability?

For example the cache I'm putting together utilizing a thread pool provides multi-threaded input of endpoint requests into a PriorityQueue. The PriorityQueue orders the Request's by nextCacheTime, which is 0 for the first time call.

Another thread pool supplied thread pulls the requests from the queue which are >= nextCacheTime, creates an HttpClient (waits if there are already 20 of them currently working), throttles output on the client to 150 per second for crest, 30 for xml-api. Which if I understand the client/rate restrictions will allow me 3000 requests per second on crest (600 on xml-api).

These httpclient.get's are once again fired up in their own thread, from the threadpool thus being nonblocking calls to queue pulling thread. The returned values are pushed to the cache, the object is updated with the dynamically obtained nextCacheTime and pushed back on the PriorityQueue.

Anything in the framework can also register callback listeners on this new GetTask so when it returns with data another thread from the pool is used to call them back (ObjectRefreshEvent, ObjectChangedValueEvent). All of this threading gives a maximum possible throughput of the system (clamped to rate limits) and also isolates the individual subsystems from bringing the whole system down if any given on throws and exception.

I just coded up my access rights in the db this last week, finishing up with a SharedRights table today, where capsuleers will be able to share Read, Write or ReadWrite rights for other capsuleers to their EveData objects. The handling of the Api's Public and User (requires scope or not) along with this sharing of data across multiple access_grants, based on rights is enforced on the public side of the cache's SPI, with a single RightsViolationException being thrown on lack there off (easy pickup for clean error dialog on view).

Along with this I have event listeners that can be registered for - crest client up/down, xml-api client up/down, Database up/down which a gui can then reflect the health of the system as well.

I have no idea of how much of the above can actually be done with a scripting language? Perhaps all of it much easier? This is a complex object oriented cache to code in java that I have outlined here. Concurrent multi-threaded programming is tough stuff!

The cache proper is industry grade business tier.

Thoughts anyone?