Need suggestions on supporting both Web and Desktop front-end.

Visto 129 veces
Saltar al primer mensaje no leído

Warren Tang

no leída,
11 jul 2011, 23:37:2211/7/11
a google-we...@googlegroups.com
I need to build an application which has both a web font-end and a desktop front-end. There is a relational database. Lightweight frameworks are preferred.
My previous project was done with SmartGWT + GWT + MyBatis. And it is the only java project I've done.
Currently my thought is GWT + Spring + MyBatis. I also heard about SpringRoo. But the idea is quite vague for me. So could someone kindly make it clear for me? How can I use GWT + Swing/SwingRoo to support both the web and the desktop client, and reuse the business code? What else do I need? What's their roles?

Juan Pablo Gardella

no leída,
12 jul 2011, 11:02:0612/7/11
a google-we...@googlegroups.com
gwt4air perhaps help. 

2011/7/12 Warren Tang <warren...@gmail.com>
I need to build an application which has both a web font-end and a desktop front-end. There is a relational database. Lightweight frameworks are preferred.
My previous project was done with SmartGWT + GWT + MyBatis. And it is the only java project I've done.
Currently my thought is GWT + Spring + MyBatis. I also heard about SpringRoo. But the idea is quite vague for me. So could someone kindly make it clear for me? How can I use GWT + Swing/SwingRoo to support both the web and the desktop client, and reuse the business code? What else do I need? What's their roles?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/HF43CGyLvqQJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Alain Ekambi

no leída,
12 jul 2011, 17:15:2112/7/11
a google-we...@googlegroups.com
If you  want to turn you GWT applicattion into a desktop application Adobe AIR is a good option.
Appcelerator Titanium is also a solid but i personally prefer AIR.

2011/7/12 Juan Pablo Gardella <gardella...@gmail.com>



--


Magno Machado

no leída,
12 jul 2011, 17:54:3012/7/11
a google-we...@googlegroups.com
I never used it before, but afaik requestfactory can be used from non gwt clients

You could write your backend in java exposing services through requestfactory and consume them from the gwt and swing frontend

Anyway, can't the desktop users simply use the gwt app?

Alain Ekambi

no leída,
12 jul 2011, 18:10:5012/7/11
a google-we...@googlegroups.com
Honestly i dont know if  you can use Requestfactory with non GWT client (never tried). Maybe somebody else can answer that.
The advantage of using appcelerator or AIR is that  you wont need to rewrite the UI code. You can just take the same code you used for the webclient and it will work  inside AIR for example. That have saved us a lot of work :)

2011/7/12 Magno Machado <mag...@gmail.com>

Thomas Broyer

no leída,
12 jul 2011, 18:58:5212/7/11
a google-we...@googlegroups.com

On Wednesday, July 13, 2011 12:10:50 AM UTC+2, Alain Ekambi wrote:
Honestly i dont know if  you can use Requestfactory with non GWT client (never tried). Maybe somebody else can answer that.

Yes you can. GWT 2.4 should come with requestfactory-client.jar that can be used in any Java app (including Android).

I wrote unit tests for RequestFactory services in "pure Java" (i.e. without the need for GWTTestCase, contrary to GWT-RPC for instance) and GWT's own RequestFactory unit-tests are run in both "in VM" and "in browser" modes.
BobV recently added (probably won't be in 2.4) a UrlRequestTransport using java.net.HttpURLConnection http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/vm/testing/UrlRequestTransport.java (you'd probably prefer using Apache HttpClient though outside testing) 

Magno Machado

no leída,
12 jul 2011, 20:03:4312/7/11
a google-we...@googlegroups.com
"The advantage of using appcelerator or AIR is that you wont need to
rewrite the UI code. You can just take the same code you used for the
webclient and it will work inside AIR for example. That have saved us
a lot of work :)"
If it's the very same code, same ui, same app, why don't have only the
gwt frontend?

> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/google-web-toolkit/-/akoAfM9CQscJ.

Alain Ekambi

no leída,
12 jul 2011, 20:15:4812/7/11
a google-we...@googlegroups.com
Well the front end is GWT(actually Ext-GWT).
The  application has a web AND a desktop client. 
For the desktop client instead  of rewriting everything let s say in C++ , we reuse the GWT code of the web client and run it inside AIR.
So you basically have  2 applications (web + desktop) sharing the same code base.


2011/7/13 Magno Machado <mag...@gmail.com>



--
Se ha eliminado el mensaje

Warren Tang

no leída,
13 jul 2011, 0:24:4513/7/11
a google-we...@googlegroups.com
The desktop application works offline (do all the job locally without ever connecting to a server). And the business code can work with or without a database. So AIR may not be the choice as I'm not so confident to compile the business code into Javascript (AIR).

>>You could write your backend in java exposing services through requestfactory and consume them from the gwt and swing frontend

Does your suggestion still applies? The desktop application should be easy to install and do not need to configure any servers locally. I'm relative now to Java, so I'd be really grateful if you could elaborate.


>>Anyway, can't the desktop users simply use the gwt app?

What limitations does it have?

Alain Ekambi

no leída,
13 jul 2011, 4:28:5513/7/11
a google-we...@googlegroups.com
If you (or your customer) can afford  writing 2 different client for the same application, then a native desktop client(be it Java, C#, or C++) is good choice. 
As for having  your businnes code on the client(desktop). No matter which language you choose the businnes code will be on the client. So if someone really really want to crack it he will.
If it s supposed to be the same application  running on 2 different platforms why not simply reuse code instaed of duplicating it ? 


2011/7/13 Warren Tang <warren...@gmail.com>

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Magno Machado

no leída,
13 jul 2011, 7:33:3313/7/11
a google-we...@googlegroups.com
>>You could write your backend in java exposing services through requestfactory and consume them from the gwt and swing frontend

>Does your suggestion still applies? The desktop application should be easy to install and do not need to configure any servers locally. I'm relative >now to Java, so I'd be really grateful if you could elaborate.
As a said before, I never done that before (using RF from non-gwt clients), but Thomas confirmed that it's possible.
Your app will carry the requestfactory-client.jar, I don't think you need any server localy. You will need, of course, configure the app to tell it where the RF server is located

>>Anyway, can't the desktop users simply use the gwt app?

>What limitations does it have?
Well, desktop apps are desktop apps. It's far easier to do things like access filesystem, external devices, etc. If you don't depend on such things, then I think your users will be ok with only the gwt frontend

David Chandler

no leída,
13 jul 2011, 8:27:5013/7/11
a google-we...@googlegroups.com
Don't forget that HTML5 brings with it a lot of support for offline apps: app cache, local storage, and the filesystem API (http://www.html5rocks.com/en/tutorials/file/filesystem/). GWT will auto-generate an app cache manifest for you via an app cache linker (see Chris Ramsdale's presentation on mobile apps with GWT from I/O this year), and GWT 2.3 offers the Local Storage API (also discussed in the same presentation).

/dmc
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/

Warren Tang

no leída,
13 jul 2011, 22:54:2213/7/11
a google-we...@googlegroups.com
I'll definitely check the Google IO videos. But I assume the new HTML5 features won't work in legacy browsers like IE6? Anyway I don't think it can help me. The desktop application is offline (for a single user), but it should be able to execute *real* java code (not only javascript). I got the idea of embedding a local web server and the running my GWT application inside it from IRC.

Should I just go Swing as apposed to an offline GWT application (meaning "locally online" with an embedded web server in JRE)? Swing should do but the later could be much easier. I just don't know the difficulties of deploying such a GWT application running on an embedded web server. The end users is unskilled so the installation process should be as easy as possible. Are there any guides or should I try it out myself?
--
Regards,
Warren Tang
blog.tangcs.com

Craig Mitchell

no leída,
13 jul 2011, 23:56:5413/7/11
a google-we...@googlegroups.com
I have done this.  I embedded GWT inside a Jetty server and ran it on the users PC.  It all launches from a JNLP file.

You can check it out if you like http://simplevnc.appspot.com/  (still very much in beta, but shows you downloading and running a GWT web server).

BTW:  Most companies I know of are trying to get away from using Swing.

Alain Ekambi

no leída,
14 jul 2011, 1:45:1114/7/11
a google-we...@googlegroups.com
What do you mean with  "run real java code ? "

2011/7/14 Craig Mitchell <crai...@gmail.com>
I have done this.  I embedded GWT inside a Jetty server and ran it on the users PC.  It all launches from a JNLP file.

You can check it out if you like http://simplevnc.appspot.com/  (still very much in beta, but shows you downloading and running a GWT web server).

BTW:  Most companies I know of are trying to get away from using Swing.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Warren Tang

no leída,
15 jul 2011, 7:00:5915/7/11
a google-we...@googlegroups.com
The info is quite valuable. Thanks.

BTW. The application shows blank page in IE9 but works fine in the latest Firefox and Chrome.

To Alain: By "run real java code" I mean the java code (business logic) should not be compiled to javascript (with the GWT compiler). Instead it should run natively on a JVM.

Craig Mitchell

no leída,
19 jul 2011, 4:35:4619/7/11
a google-we...@googlegroups.com
Thanks for the heads up on IE9.  Switched from GWT 2.1, to GWT 2.3.  http://simplevnc.appspot.com/ now runs great in IE9.  Thank you GWT people!  :-)
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos