JavaFX2 client and a Server - java

I am planning on writing an application for a hospital. I am planning to use Javafx to build user interfaces. I want help in choosing the way I write the server and client communication.
I want the client(which knows the server's address) to call the server functionality just like it would call in a standalone application.
How do I achieve this?
Note: I don't want to write a web based application

Web services (SOAP, REST) or RMI calls are all for you.

Related

Architecture Decison: Replacing Fat Java Client with Web Client

I have a Client Server Application which is Java based with Spring for the server.
Now I have to replace the Java client with a web client.
I have three different achitectur concepts for implementing the webserver and linking it to the appliation server. But I'm not sure which I should use. I'm not really firm with web applications, but I think this is not a pure decision by the web client.
Can someone please give me some pros and cons for the different concepts or please tell me if my concepts have mistakes.
These are the concepts:
Useage of an embedded web server in my application server.
Pro: I must not implement any session handling between the web server and the application server. The webserver can use the data storages of the application server for requests. Cons: The customer must decide if an application server is allowed to start their own web server. And I'm not sure if it is a good style to mix the web ui logic with the business logic of the application server
Embedd the business logic with the web ui in a war for a stand alone web server.
Pro: Basic Security stuf like https handling will be done by the web server. Maybe more accepteable for the customer regarding the deployment. I must not implement any session handling between the web server and the application server. The webserver can use the data storages of the application server for requests.
Cons: The application server has a lot of memory and cpu useage. The is maybe a problem for the web server.
Embedd the web ui in a web server and link it to the application server via socket connection. Pro: strict separation between ui and business logic. The application server must not be changed, because the socket connection between web server and application server can use the existing socket connection for the fat client. Cons: The handling of user sessions must be handled two time. First the web session and second the session to the application server. Furthermore the web server must set up his own storeages for data and must keep them in sync with the storeages in the application server.
My first thougt was to take the first concept because I have every thing in one application.
But my second thougt to use the third concept because of the strict separation and the benefits of a real web server. But here my problem is the handling of two sessions for each user. Or are there better concepts?
Thank you for giving me input!
Your 3rd approach is better. Keeping application server separate will better serve different clients like Java clients, web clients etc.
It will separate 2 different concerns. If there is a UI related issue , then you can bring down the UI server and fix it. But your other Java clients will work fine. Moreover it will be better from development perspective as well.

Java app for 3rd party server

Im newbie in java.
I want make a web application (like a remote controller) for 3rd party server(via xml api).
I think to make a java applet for user gui and a service for parcing xml to (and from) 3rd party server. Whole app will run on separate server with apache.
Is it correct way in general or i need change my concept?
And I need advice how to make communication between web user gui (applet) and service, that parcing xml, on same host? Through or make it in one application with different threads?
Applet? So 1998.
Web UIs in browser speak HTTP to web services now. Applets are NOT the way to go.
IF you deploy on a Java EE app server or, better yet, Spring Boot, all that threading stuff will be taken care of for you.
It's not for newbies. By all means attempt if you want to learn; get some help if this is real.

Communication between JSP/Servlet and PHP pages?

I am working on a web based Java application(on localhost) and I want to send email using a PHP script which is hosted on a free web hosting site and also return to my java app.
Like this ->
Java(localhost)---->PHP(send mail)---->Java(localhost)
Few questions regarding this?
How to do this?
What about the session stored by the java app? Will the PHP script
read or interpret java's session?
My suggestion is Implement an web service (in REST or SOAP Architecture) with php
then in java code call your web service and Implement an acknowledgement response for
successful or failure mail sending operation in your php!
SOA (Service Oriented Architecture) could be one of best approach for communication between
different platforms.
if you use php only because of ease of sending mail it would be fine to know that java also
have JavaMail API that can be used for mailing application very easily
I hope it be beneficial
Regards

Implement server and client

I need to implement a server that downloads a webpage and sends it to a client that saves it as a file.
On the server side I need to process socket.
So I was thinking about making a web service in java (with netbeans) but I don't know how to start the web service (I use osx lion).
How can I start the web service?
Is there another way to solve my problem?
Thanks
I'd strongly consider just using an HTTP-based RESTful client/server, using any of a million server-side frameworks. The server-side option may influence the client side implementation.
For example, you could use something like Jersey, which can also create the client-side library needed to consume your service.
On the server side I'd use something like HttpClient to retrieve the websites that will be returned to the client app.

3-tier database application web client in ASP.Net and the business logic in java

I am new in this area and I want to know how could I develop such an application. I already have a developed application in java (the business logic) and I would want to link this with a
web application in ASP.Net (application client). I know that I must use a web service but which type should I use a java web service or a .Net web service.
I dont know how to make this connection between the .net and java, could anyone help me please? Is this possible through the web service? Any action of the user would then be transmitted to the java application...and if this is the case how it is done? Any example or tutorial might be hepfull....
Thank you in advance
If you write a SOAP web service, it doesn't matter whether you use Java or .NET. The client is exchanging SOAP XML messages over HTTP; the language that the service is written in does not come into play.
Same would be true of REST if you did it properly.

Categories