How to deploy Java Web Start under Apache Karaf? - swing

One of our enterprise application is running over Apache Karaf , this application is accessed through web client.
We have another standalone desktop Java Swing based application. We want to invoke this application from browser.
So , we decided to deploy this application as Java Web Start and allow clients to invoke this application.
We have lot of examples how to deploy Java Web Start with tomcat like web servers.
But we want to deploy this in Apache Karaf . Anyone is having tutorial or notes for this?

I would strongly advise against Java Web Start.
If you don't want to rewrite the app, have a look at webswing. I have never used it but they claim they can convert Swing Apps to Web Apps instantly. I also have no idea how that would work with OSGi. Depends on what they actually do it may be easy or impossible.
If you are OK with some changes you can try JavaFX or Vaadin. Both are quite similar to Swing in terms of development style so it should be relatively easy to convert your app. Both can run inside OSGi container with some minor limitations and after some adjustments.

Related

Can I deploy an HTML5 application using the WebAppRT executable?

I see that the lastest versions of Firefox come with a webapprt.exe and webapprt-stub.exe executable. I think that they are for the Open Web Apps system but I would like to know if it's possible to use the WebAppRT container with external made applications. I mean that I could distribute the WebAppRT executable, the shared libs required and my HTML files and deploy it offline without having Firefox installed.
Why?
What do you mean by "external made applications"?
Why don't you just create a web app as explained in Building Web apps - App Center | MDN ?
It will take care of the details and allow your app to reach more platform than doing it manually. For a glance see Platform-specific details of app installation - App Center | MDN
You don't have to do anything special to install apps on different platforms. All the information you need to provide, such as the app name, is contained in the app manifest. Here are some platform-specific details about how apps are installed on each platform. These details assume that Firefox has been installed on the platform.
To make that path easier, you can follow tutorials or clone an existing open-source web app that has something in common to see how it's done.
What did you mean?
If you mean to just manually locally install a some app that you write, the simplest thing to do would be to install any app, look at what's been done and replicate the steps with your app. But what's the point?
My guess is: it will work only if the local OS has a platform to actually execute the app. Then that platform will also be able to install the app properly. So, it will be simpler to you to just make a regular web app and have it installed through standard means.
Or were you thinking of something else?

debugging actionscript/flex app options

I'm not sure of the proper term to describe what I wan to do.
I'm working on a Flex app. It depends on a php based web service running in the same web server.
Right now, I'm using the free version of FDT. It will not let my app access the php web service while running in the SWF (FDT's built in Flex app viewer).
I'd really like to be able to step thru my Flex app in a debugger. So I need an IDE that will let me run a Flex app that accesses an outside web service.
A co-worker told me that IntelliJ supports this. I'd like to know if there are any options - Eclipse, NetBeans anything else.
Mark
i ultimately settled on FDT. i lost stepwise debugging but Firefox + web console and I've been able to do everything I need to.

connecting an ios app to send information to a mysql database

Im doing my final project which is a taxi booking service. i intend to make an ios app for the customer so that they can book a taxi. the request will then be sent to the mysql database (held at the taxi base). i want to no how can i send the information from the app to the datatbase; and the datatbase to send a confirmation message back to the app confirming the taxi has been booked!>>>>>
i have read a lot about web servers but am very confused. can i use an web server e.g. windows home server 2008? any help would be appreciated.
I am not familiar with Windows home server 2008, but I'm pretty much sure that you can use it for your project.
If you want to keep things simple,
Just install XAMPP server which comes with all the components you need to work on this project including PHP and MySQL. It is one of the easiest servers to work with and most of all, its free and open source. http://www.apachefriends.org/en/xampp-windows.html
Then write the business logics inside your Web App using whatever the programming language you want to (for this one PHP would be enough, or choose Java if you want to have a more complex scalable solution). Writing data to a MySQL database using PHP is very easy and you can find ton of tutorials and sample source codes in the internet.
Now your web app is all set, the next step is to expose these services using REST where an iPhone can communicate with your services. Use JSON for interacting with your Web server from iPhone. Again, there are tones of tutorials on how to write a JSON RESTful service using PHP.
Finally in your iPhone app, you can access the service exposed from the server for saving data as well as to retrieve anything from it through JSON. For making this, use a good Objective-C framework such as AFNetworking. It comes with the JSON parser as well. Ref. http://afnetworking.com
Good luck with your project !
RESTful web services are going to be your best friend here.
Create a server side program in django or python or whstever. Connect it to a database (mysql).
You can host it on Amazon Web Services. I think they have windows 2008 instances. I would personally use the amazon linux ami.
Use afnetworking to invoke a get or a post on the server app and you are off to the races.
take a look at this open source taxi project
its work with RESTful web services but its better to forget about Microsoft Windows its better to use Linux hosting for your web service.

PhoneGap app to act as a server

I am trying to develop an HTML5 app to be ported to native via PhoneGap. Is it possible for the app to be able to act as a server on a mobile device, with the same app on another mobile device acting as a client and connecting to the former? This is all within a local network.
I am new to PhoneGap and I understand that most server implementations are on platforms such as node.js or PHP and that PhoneGap only supports HTML, CSS and JavaScript. I think I might be partially wrong here as there are various plugins that could help ease the abstraction between PhoneGap and the native developer.
Other alternative suggestions are very welcome :)
What exactly are you trying do by having a client/server app? I think your best bet would be to have one app that posts and gets info to your own webserver (not an app). Therefore, that one app can act as a server by "publishing" information to the server and the other can act as a client by only reading from the server.

Integrating a Swing App With Tomcat

I recently created a web application with GWT. Then re-used most of the code to create a Swing version of the application that accesses a local database in offline mode. I am now implementing the 'online' mode of the application and want to access the same data as my GWT application.
Any ideas? Considered connecting directly to the MySQL server via SSL, but that's not working and doesn't seem as scalable. Should I use REST?
Any suggestions would be helpful.
To solve this problem in the past, we've used Jersey to create REST Web services which returns protocol buffers. The Swing app would then interact with the protocol buffers. The GWT app would ask for content type 'json' and receive protostuff objects in return. It worked quite well. That way, both apps can communicate with the server in the exact way.
Edit:
To allow your swing app to communicate with GWT-RPC, look at this blog article.