Re: Support for both Web and Desktop front-ends [Architecture]

Discussion in 'Java' started by Warren Tang, Jul 14, 2011.

  1. Warren Tang

    Warren Tang Guest

    Thanks Arved for your detailed explanation. It really make things much clearer for me.

    As I don't want to learn so much new things at a time, I should keep it as simple as possible. If Java SE can get the job done, I won't go for Java EEor Spring this time.

    My current understanding is that I can really do it with Java SE only. Thatis GWT for the web and Swing for the desktop, with no Spring or Java EE involved. If I can properly divide the code into the 4-tiers as you described, I believe I can get pretty good results.

    For me it's like the ".NET" way which I am familiar with. As my knowledge on Java grows, I may go for other possibilities.
    Warren Tang, Jul 14, 2011
    #1
    1. Advertising

  2. On 11-07-13 11:05 PM, Warren Tang wrote:
    > Thanks Arved for your detailed explanation. It really make things much clearer for me.
    >
    > As I don't want to learn so much new things at a time, I should keep it as simple as possible. If Java SE can get the job done, I won't go for Java EE or Spring this time.
    >
    > My current understanding is that I can really do it with Java SE only. That is GWT for the web and Swing for the desktop, with no Spring or Java EE involved. If I can properly divide the code into the 4-tiers as you described, I believe I can get pretty good results.
    >
    > For me it's like the ".NET" way which I am familiar with. As my knowledge on Java grows, I may go for other possibilities.


    Regardless of one's personal feelings about Spring, it's a non-essential
    framework. You don't _need_ it, no.

    I'm not a GWT expert, but even a GWT app that produces HTML and
    Javascript is still a web app that needs a web server, so by definition
    it's Java EE territory. For example, even a basic GWT application will
    be packaged according to Servlet API guidelines.

    "Java EE" is not a label to be fearful of :)-)), and there's a lot of
    Java EE APIs that you will not be using for a basic GWT application, so
    you can start off relatively easy. Your actual GWT web tier coding will
    look like Java SE and in that sense you're correct. I do know that GWT
    resources (official docs and 3rd party stuff) are thorough and
    plentiful, so I would not anticipate major problems.

    With reference to the 4 conceptual tiers I described, you'll have
    grasped that these _are_ conceptual, with no reference to project
    packaging or physical deployment. It's possible to have all 4 of them
    living inside a single web application. Having said that, you'll
    probably end up having code on the server (it won't just be GWT
    compiler-generated HTML and JS on the browser); I recommend perusing
    http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html.
    GWT RPC, for example, is based on servlets.

    GWT is an interesting choice. It's certainly true that creative and
    ubiquitous use of AJAX can actually let you code up a web UI that
    behaves similarly to a desktop UI, in terms of workflow. There is
    nothing inherently wrong with this, but remember that a GWT app is still
    a web app, so now you're dealing with HTTP and sessions and different
    kinds of security issues. An AJAX call is still an HTTP request. Again,
    GWT has lots of good documentation regarding all this.

    To briefly return to Spring, there is no shortage of articles and
    semi-official documentation that talks about integrating GWT and Spring.
    A word to the wise: Spring boosters would have it that nothing else out
    there is comparable in terms of supporting "efficient, lightweight,
    POJO-based" server-side development. Of course, nothing is further from
    the truth - standard Java EE APIs already do the trick. So my
    recommendation stands: possibly learn up on some Spring down the road to
    add to your professional toolkit, because lots of shops do use Spring,
    but don't consider the framework as being necessary. It may be a
    necessary evil depending on who you work with, but it's not necessary.

    HTH,
    AHS
    Arved Sandstrom, Jul 14, 2011
    #2
    1. Advertising

  3. Warren Tang

    Arne Vajhøj Guest

    On 7/14/2011 6:02 AM, Arved Sandstrom wrote:
    > On 11-07-13 11:05 PM, Warren Tang wrote:
    >> Thanks Arved for your detailed explanation. It really make things much clearer for me.
    >>
    >> As I don't want to learn so much new things at a time, I should keep it as simple as possible. If Java SE can get the job done, I won't go for Java EE or Spring this time.
    >>
    >> My current understanding is that I can really do it with Java SE only. That is GWT for the web and Swing for the desktop, with no Spring or Java EE involved. If I can properly divide the code into the 4-tiers as you described, I believe I can get pretty good results.
    >>
    >> For me it's like the ".NET" way which I am familiar with. As my knowledge on Java grows, I may go for other possibilities.

    >
    > Regardless of one's personal feelings about Spring, it's a non-essential
    > framework. You don't _need_ it, no.
    >
    > I'm not a GWT expert, but even a GWT app that produces HTML and
    > Javascript is still a web app that needs a web server, so by definition
    > it's Java EE territory. For example, even a basic GWT application will
    > be packaged according to Servlet API guidelines.


    GWT is traditionally compared with Java EE we frameworks.

    And if it is using the GWT server side stuff then it has to be used
    with a servlet container.

    But it is actually possible to only use the client side stuff and have
    Apache httpd or IIS serve up the generated HTML and JavaScript without
    having any Java EE server in the production environment.

    Arne
    Arne Vajhøj, Jul 21, 2011
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Madhusudan Singh

    Chopping off spaces at both ends

    Madhusudan Singh, Aug 7, 2005, in forum: Python
    Replies:
    3
    Views:
    270
    Tim Roberts
    Aug 9, 2005
  2. pmbcan
    Replies:
    7
    Views:
    470
    pmbcan
    Oct 5, 2007
  3. Michael
    Replies:
    0
    Views:
    295
    Michael
    Sep 22, 2009
  4. Warren Tang
    Replies:
    12
    Views:
    1,046
    Arne Vajhøj
    Jul 24, 2011
  5. Karen Sundquist
    Replies:
    1
    Views:
    141
    Saurabh Nandu
    Dec 1, 2003
Loading...

Share This Page