Options other than Applet - java

I am using the XMPP to build the Chat Application.
For building chat client I am using the Applet to communicate with the XMPP Server using their APIs in Applet.
So my question is: Is there anything other than Applet that I can use to communicate with Server and also with use of the XMPP Client API (i.e. options other than applet)?
I looking into GWT and JavaFX, will those two be helpful in this context?

You can use Java-WebStart or Flex or just write a small webpage using servlets.

Definitely check out Java Web Start. It can launch a JFrame from a link, and offers many deployment advantages.

If you want a browser-based client then use Flash. There are several XMPP browser clients and libraries available.

There are a couple of JavaScript libraries listed on the XMPP website. So no need to rely on browser plug-ins, just do a native web application.
You can easily use GWT for your web application. A quick search on Google revealed some GWT specific third party libraries or XMPP (Emite, gwt-strophe) and even a samples app (Emite Chat).

Related

Chat Application Web Client

I am currently working on a Client - Server Chat Application written in Kotlin. The Communication is over Sockets. Now i want to code a Web Application for the Client. Right now I am not sure where to start and what Programming Language to use or which frameworks. I've tested a few frameworks like vaadin and jsf but i can't figure out what to use. And the Application should have a Login screen and a Main Page like the Whatsapp web client. I have decent Experience in Java/Kotlin and JavaFX/TornadoFX.
Try ConnectyCube. They provide server backend and have Kotlin SDK, should fit your needs. Its possible to create free account for small apps.

Java Desktop Application Client-Server all in one

I'm thinking about what might be the best solution to create a standalone client-server application in java with these features:
Server: it must provide APIs (probably rest?)
Client: javafx webview with angularjs to make requests to webserver.
Loader; it starts the server and the client;
The user can then manage the application directly from the webview or from the browser (to the server port)
This would also be able to create in the future a "cloud" version of the application, the client instead to query the localhost will perform to a remote server.
A solution of this type is correct?
What might be useful tools for its realization and how could it be structured?
I would like in particular a solution which does not require the use of a large Java Application Server, but something more simple that it can be included as a library.
I thought same architecture which you think because it's easy. localhost binding, angularjs, bootstrap in java Webview. one of solutions is Spring MVC Rest API with embedded tomcat. it may be not lightweight.

Build Sip Client using Sip Servlet as signalling

I am using mobicent sip servlet and I have deployed it in JBOSS as7 successfully. But I saw testing is from the sip softphones.
I have google search alot about building our own sip client but I cannot find the proper guide.
What I have to do is using Sip Servlet as a signalling and I have to create Android client(using JAIN-SIP) and also I have to create UAC from browser.
I am confuse about how can I use my Sip Servlet application that is running on server? How I send requests(Register,Invite and so on) from client to sip servlet?
For Example this tutorial But How I create my client? :)
A little guide or small tutorial about create UAC or how to use sip servlet can help
Android has built in very simple SIP client and APIs here http://developer.android.com/reference/android/net/sip/package-summary.html. You only need your own JAIN-SIP in android if you are using some more advanced features. There are plenty of examples here https://svn.java.net/svn/jsip~svn/trunk/src/examples
I would recommend starting studying this example https://github.com/Mobicents/sip-servlets/tree/master/sip-servlets-examples/websocket-b2bua
This is the Sip Servlets application behind the bundled WebRTC demo that comes with Mobicents SIP Servlets : https://github.com/Mobicents/sip-servlets/wiki/HTML5WebRTCVideoApplication
This demo connects 2 WebRTC browsers together to have a video or audio call.
In your case, you'll need to replace one of the browsers with an Android based Client. I would recommend looking at an Android SDK that supports WebRTC. We started building one at https://github.com/Mobicents/restcomm-android-sdk which is based on JAIN-SIP but the media side doesn't fully support WebRTC yet. (Any contributions are welcome though) Altough you can use it for chat/messaging to start with and show it works.

Host a web-service from within a Swing application

I have to set up a desktop Java client that will communicate with a .NET desktop application. The .NET application exposes its services through a webserver of its own. Rather than have my Java app frequently poll it for data changes, it was suggested that the .NET app contact my Java desktop app via a webservice or similar technique. I am not familiar with web services, but as I understand you would need some sort of web app container such as Tomcat to host it.
Is there a way to set up a listening socket in my app as a webservice end point without effectively rewriting a webserver from scratch?
Alternately, are there other or better ways for a .NET desktop application to talk to a Java Swing desktop application?
If you are using JRE 6 then you can use the Endpoint.publish() method to create an in-app server and expose a service.
Refer the simple tutorial in the link to see an example of the same.
How the Endpoint.publish() works is it internally creates a light weight server and makes the SOAP service available on that location.

XMPP web client for commercial web application

I have the task of choosing an XMPP server/client solution for an internal web application. The goal is for employees to be able to utilize it via desktop client or the web application. The web client is mandatory.
The web application is written in PHP, but I don't necessarily need a PHP solution. Flash or Java are acceptable (Flash would be preferable since that's already required for another component of the application).
The web application requires javascript be enabled (and makes use of jQuery), so AJAX isn't out of the question either.
There are only two requirements that must be met:
The client must use a secure connection (HTTPS for AJAX, TLS for Flash/Java).
The client license must be commercial friendly. Free would be nice, but is not a requirement.
So far, I've found SparkWeb, which is LGPL licensed (hooray), but I have not been impressed by its live demo. I was unable to create an account on their server or connect to another XMPP server that I run, so I haven't even been able to see it in action.
I've also found Strophe, which looks good.
Another option is one of Tigase's client options. I'm not sure if the GPLv3 will like our usage though (I'll need to read it more carefully).
Any advice (or a shove in the right direction) would be appreciated.
About the licence :
GPL mandates you provide source code with the application.
So GPLv3 can fit.
Choosing a library, I see two possible options:
if you want a custom and great integration with your website code, building a webclient with StropheJS is possibly the best choice. But you'll need to code the client GUI. (more work)
If you want a good client but with limited interaction with the rest of the website, I'd recommande Tigase Messeger. It's written in GWT and has good support — especially if Tigase is the server you use.
Both of these libraries are pure javascript and use BOSH for communicating with the XMPP server.

Categories

Resources