Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Java Fx - Server API: Which technologies should i use ?

I am wondering how can I do a Java API in the server side. Should I use Java Spark or other tool? What advice would you give me? Sorry if my english is not good. I am from Argentina :)

Thank you!

I researched this answer and found one on community.oracle.com. Not sure if this is what you're looking for:

A cleaner solution is to use a bidirectional client server communication with sockets. So the server can send data to the client without a prior request. However if proxy support is needed sockets are out of the question.

So what you need is a gui in javafx and a thread to handle client-server communication for synchronous and asynchronous events. It is a bit harder to code, but it provides better communication than polling.

1 Answer

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Hola Ariel Kohan ! ΒΏComo andΓ‘s che!?

Have you seen my Build a REST API in Spark workshop?

I'm working on something very similar in Spring at the moment. It will be using Spring Data REST.

Let me know if that works!

Mi castellano no funciona por nada. ;)

Hola Craig Dennis !!

I'm going to see the workshop this weekend and see if I can use it. I will tell you my decision!

Thank you very much! / Muchas gracias! :)