Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6185
| From | Kristian Rink <kr@zimmer428.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Support for both Web and Desktop front-ends [Architecture] |
| Date | 2011-07-14 13:06 +0200 |
| Organization | //kaum// |
| Message-ID | <20110714130618.40b1b538@n428> (permalink) |
| References | <ivj45r$hvl$1@speranza.aioe.org> |
Hi there; some quick thoughts on that: Am Wed, 13 Jul 2011 11:41:40 +0800 schrieb Warren Tang <nospam@tangcs.com>: > I'm about to develop an application which needs to support both Web > client and desktop client. Is there any existing tools/practices I can > use? Or any suggestions? Well. Honestly speaking: My first suggestion would be to carefully consider whether (and what for) you really do need a standalone desktop application, or if a powerful browser client might be a better choice for both groups of users. Anyhow, maybe Eclipse RCP/RAP is an interesting approach for you. The idea is to do "single sourcing" by providing two frameworks (RCP for desktop, RAP for web) and allowing for reusing as much code as somewhat possible. See [1] for a good set of slides on that topic. Some sources claim they could re-use 95 . 99% of their code and run their applications for the browser (RAP) and the desktop (web) without notable changes. Personally, I distrust these numbers. Conceptually, single sourcing stops right where there are substantial differences between a desktop app and a browser app, in example as soon as file transfer (browser: up/download) has to be dealt with. And, all along with this, Eclipse RAP (so far) is not really friendly concerning export and deployment of runnable binaries, though things have somewhat improved the last couple of months. Maybe worth checking out. > Recently I've done a project with Google Web Toolkit(GWT) + myBatis. > Newly shifted from .NET Framework to Java, my current knowledge set is > limited to core java, no Java EE or Spring experience (though I have > plans to learn them).So lightweight is preferred. Personally, I'd go for Java EE instead of Spring as, as others already pointed out, Spring these days is anything but lightweight and because Java EE at least ideally leaves you with the choice of picking one of many different Java EE implementations where there is "just one" Spring framework. But that's another story. Basically, this decision IMO doesn't matter much in your situation, as this is likely to be the server sided logic. > Maybe I can use GWT + Spring + myBatis? For the desktop front-end I > should use Swing + Spring + MyBatis? The Spring MVC can handle the two > front-ends and make sharing business logic easier? Yes, you can, but in general most of these questions are way too much implementation-detail already. I'd go more or less down this road in your situation: * You should slice up your applications into a three-tier architecture. This is a good decision in most cases, and in my opinion, it definitely is a good starting point. * You should eventually pick up a Java EE server where to place the persistence and business tier. In your case, starting out with these technologies, I recommend Glassfish all along with NetBeans IDE and the Java EE learning trail in the NetBeans knowledge base [2] - though this won't suffice if you are about to write real-world applications, it will give you a good overall understanding or at least pointers where to find more in-depth documentation. * You should think about an interface to connect your user interface to your business logic. This interface, of course, will have to meet your business use case needs. But it also will have to meet certain technical needs in your situation: A web user interface application is pretty simple as communication between your "user interface" and your "backend" always happen inside your own network, and, at best, on the same application server / host / VM. If you need to attach a desktop client running outside of your local network, in example on a customer desktop, your interface at least (a) will have to be secure to prevent people from abusing your service and messing with data they aren't supposed to have access to, (b) will have to be performant and easy in terms of set-up so an end user will be able to connect your desktop client to your service across network boundaries and firewalls (which will make you end up with some sort of SOAP, REST, ... across HTTP in most cases) and (c) will have to be stable and/or versioned (you don't want the desktop client of a dozen of customers break because you need to change something in your service interface, do you?). Cheers and good luck, Kristian [1]http://www.slideshare.net/caniszczyk/single-sourcing-rcp-and-rap [2]http://netbeans.org/kb/trails/java-ee.html
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Support for both Web and Desktop front-ends [Architecture] Warren Tang <nospam@tangcs.com> - 2011-07-13 11:41 +0800
Re: Support for both Web and Desktop front-ends [Architecture] markspace <-@.> - 2011-07-12 21:21 -0700
Re: Support for both Web and Desktop front-ends [Architecture] Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 18:53 -0400
separated by a common language "Richard Maher" <maher_rj@hotspamnotmail.com> - 2011-07-24 08:13 +0800
Re: separated by a common language Arne Vajhøj <arne@vajhoej.dk> - 2011-07-23 21:37 -0400
Re: Support for both Web and Desktop front-ends [Architecture] Tom <tom400f@gmail.com> - 2011-07-13 10:34 +0000
Re: Support for both Web and Desktop front-ends [Architecture] Tom <tom400f@gmail.com> - 2011-07-13 12:28 +0000
Re: Support for both Web and Desktop front-ends [Architecture] Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-07-13 07:36 -0300
Re: Support for both Web and Desktop front-ends [Architecture] jebblue <n@n.nnn> - 2011-07-13 22:17 -0500
Re: Support for both Web and Desktop front-ends [Architecture] Roedy Green <see_website@mindprod.com.invalid> - 2011-07-13 21:22 -0700
Re: Support for both Web and Desktop front-ends [Architecture] Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 18:45 -0400
Re: Support for both Web and Desktop front-ends [Architecture] Kristian Rink <kr@zimmer428.net> - 2011-07-14 13:06 +0200
Re: Support for both Web and Desktop front-ends [Architecture] Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 18:33 -0400
csiph-web