• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GWT to access Serial or USB port using Java Communications API (javax.comm) or RXTX

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Federico Kereki.

I need to migrate a Java Swing/Desktop to a Java GWT web application but my concern is about how to access Serial and USB port using GWT.

It's is possible to use a GWT Java application to access Java Communications API (javax.comm) or RXTX directly ?

Do you think that GWT direct access to Serial ports it's a good approach or instead of I should use service server class (like Servlet/Proxy IO) to do this job ?

Thanks,

Paulo.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paulo

You can use any java API's in server side code,Better create a library project and add it as dependency to the server side code.

But you can ONLY communicate to the server machine.
 
Paulo Cesar Dias Lima
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Subin, thanks for your answer.

I plan to deploy each desktop client machine a servlet embedded server like Tomcat, Jetty, or other.

So each machine will be a lightweight Embeddable Servlet Engine running both Client GWT and Server API to access Serial and USB APIs.

My concern is about if this approach will give more flexible and robust result than Java Swing application.

I plan to go ahead with GWT just for practice and also have a comparation experience to apply.

Also I did some homework regarding this comparation

http://creamtec.com/products/ajaxswing/solutions/swing_to_GWT_and_AJAX.html
http://www.mia-software.com/en/solutions/modernization/migration-to-gwt/


Thanks,

Paulo.

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IMHO, you are simply killing the advantages of web applications by installing a container on each machine.
I even suggest that you make your application a JNLP enabled application (assuming it has access to serials and USBs).
 
Subin Sugunan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>> I plan to deploy each desktop client machine a servlet embedded server like Tomcat, Jetty, or other.

This is not recommended .

Not sure why you choose GWT. If you just want to replace Swings and wanna give a rich user experience go for Adobe AIR
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am confused. Each client machine has an embedded server? What is the purpose for the servers? Do these servers communicate with each other to synch up data or something? Or are you going the server route just because you need a web application?
If you are concerned about updates and that is causing you to switch to a web application, you might want to consider Java Web Start With a properly signed jar and proper permissions in the jnlp file, you can communicate with the ports from the client itself.
 
Paulo Cesar Dias Lima
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Subin, my goal is to implement a RIA and improve GUI with WEB 2.0 including GWT and others visual controls that provides better user experience that Swing. I don't know Adobe Flex, my skill is 100% Java and C/C++ actually.

Maneesh, each client machine will have an embedded server to facilities communication with a Central server and access JNDI, JMS, and other container server.

Nowadays I use Socket and RMI instead of Java EE integration support. I konow that It's not a refactory, It's a brand new project.

Thanks,

Paulo.
 
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you think that GWT provides a better user experience than Swing?
 
Paulo Cesar Dias Lima
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hauke, some users feel more confortable with webapp since most of them uses WEB 2.0 sites and services like emails, search engines, Internet bank, and so on. Some users request WEB 2.0 interfaces and GWT is a strong reference to some then.

Also some components that are free and available to Web/GWT for Swing requires comercial desktop components library.

And as I said regarding Server integration and uses Java EE services I guess that GWT is ready to it since conception.

I like Java Swing to Desktop and Client/Server solutions, also developed some projects builded with J2SE/Swing and only standard Java API (Java IO, RMI, Swing) and several long nights of Java Coding!

Just to focus and go back to topic, I guess that GWT it's not the best choice to my project but for some specific users requirements (like Web experience) could an option and can be done.

All, just to clarify my project is a POS Desktop system coded in Java Swing and integrated with Java Server Side application that mannager stock, sales, taxes, and reports. Both implemented with J2SE. I plan to implement a new version do GWT on client and Java EE on server.

I'm know that Java EE isn't the panacea (a remedy that would cure all diseases) but not the worst.

Regards,

Paulo.
 
Ranch Hand
Posts: 222
Google Web Toolkit Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What about other desktop GUI frameworks? I am personally recently into SWT
 
Hauke Ingmar Schmidt
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well... if "web experience" is a specific requirement then GWT looks like a decent choice. But while I like GWT I don't think it delivers the same feature set or user experience as a desktop gui toolkit. Let it be (native) Look&Feel, Drag&Drop, top-level windows, efficient coupling between layers (you need polling server roundtrips, even on localhost), security issues... as simple as opening a file browser.
 
author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paulo Cesar Dias Lima wrote:Hi Federico Kereki.

I need to migrate a Java Swing/Desktop to a Java GWT web application but my concern is about how to access Serial and USB port using GWT.

It's is possible to use a GWT Java application to access Java Communications API (javax.comm) or RXTX directly ?

Do you think that GWT direct access to Serial ports it's a good approach or instead of I should use service server class (like Servlet/Proxy IO) to do this job ?

Thanks,

Paulo.



Sorry, but you won't be able to access client-side devices with any GWT application, since it runs in a (limited, sandboxed) browser.

You can, however, access it server-side.

Hope this helps!
 
Subin Sugunan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paulo Cesar Dias Lima wrote:Subin, my goal is to implement a RIA and improve GUI with WEB 2.0 including GWT and others visual controls that provides better user experience that Swing. I don't know Adobe Flex, my skill is 100% Java and C/C++ actually.




Paulo

If you know Java .. learning Flex/AIR isn't that difficult since ActionScript and Java has lot of similarities.

Also Its very easy to integrate AIR applications with server side technologies like Java.
 
reply
    Bookmark Topic Watch Topic
  • New Topic