Discussions

General J2EE: Web Client or Swing Client for J2EE Apps

  1. Web Client or Swing Client for J2EE Apps (5 messages)

    Hello,

        I would like to know. When to use a normal Desktop Application for J2EE or when to use a WebClient... Web application.

        In which situation should I choose one or another.

        - When is best a Desktop App.
        - When is best a Web App.

        Pro/Cons

    Saludos,
       <Rory/>
  2. Web clients scale better, and are easier to maintain (because they are only installed on the server), but have a less rich user interface.

    Swing clients have more functionality, but they can be more difficult to maintain, because a change in the client means you need to redistribute the code to every client machine. Tools like Java WebStart can improve this.

    Also, in my experience, Swing clients are harder to write, because so much time and energy has been spent in the last 8 years on web client development. Of course, this is my personal bias, because I write web applications. A GUI developer would feel differently.
  3. Paul,

       I write Web Clients too and I preffer them... I have been a PHP developer now I am switching to Java/J2EE.

       1.- How do you Report Printing and Formatting??? on Web Applications?. Formating in HTML and printing that from IE is not a good idea!. What do you do when you need a fancy report etc?? Reporting on Pre-Printed forms... etc?.

       2.- Is there any framework out there for writting Swing Applications in an easy way like formatting code in HTML???


    Saludos,
       <Rory/>
  4. 1.- How do you Report Printing and Formatting??? on Web Applications?. Formating in HTML and printing that from IE is not a good idea!. What do you do when you need a fancy report etc?? Reporting on Pre-Printed forms... etc?.
    If you want to create nice, printable output, you can generate PDF files using tools like XSL-FO or iText. PDF can be downloaded to the browser and prints very nicely.
    2.- Is there any framework out there for writting Swing Applications in an easy way like formatting code in HTML???
    This is not my area of expertise. There are a number of projects that try to address this issue, but none of them seem to be particular successful. You might try to look at the various XUL related projects.
  5. There is a good article on Swing development at O'Reilly that explains why Swing went out of focus and its not only because J2EE arised

    http://www.onjava.com/lpt/a/4527

    Personally I think that the need for Swing application will increase, especially when companies that today build applications with 4GL client-server technologies adopt Java for this. This then shifts back focus a bit to Swing based development.

    Simplifying Swing development is a must for all tools vendors and Oracle, that's the company I am with, offers ADF JClient withing Oracle JDeveloper for declarative development of databound Swing applications.

    You find similar Swing development approaches in other vendors IDEs too, like JBuilder, Eclipse and IntelliJ. The difference between Swing and J2EE is that to me its seems that there is more agreement on what's the right approach to take in J2EE than in J2SE. Hopefully this will change with JSR 227, which defines a common way for databinding. If for example the various ways of binding Swing applications to data sources can be made consistent, one layer of complexity would go away and all tools would do the same thing.

    But all the above doesn't yet solve the basic Swing problem, which is that an application developer must know to much about it before he can effectively start building applications. The learning curve still is steep.

    Building J2EE applications seems to be easy - at least the front end part of it - because all that you need to know for building applications is how you build table layouts. It also seems more easy, compared to Swing, to add images and styles to it. This is where I agree with one of the earlier responses to this thread, XML in Swing helps.

    http://www.javadesktop.org/articles/synth/index.html

    There are already some XML formats available for Swing (http://www.swixml.org/), but without visual editor support it's still the same hassle.

    J2EE development is in the hype, no doubt about it, and Swing follows in its shadow. However, there will always be a requirement for real client-server applications, which means Swing for Java.

    Discussions may be different when JSF is out, because then J2EE has something that is comparable to Swing in its functionality and complexity.

    At best we see Swing and JSF development becoming similar easy so that the discussion of which technology to use just becomes a question of what the business requires.

    Frank
  6. There are no do-it-or-be-damned rules to make such a choice. J2EE means Java2 ENTERPRISE Edition, and enterprise applications are designed following user requirements. So, it all comes down to the user...
    If you work as a programmer, you shouldn't worry about this: I assume your enterprise has a very capable analysis team to make the choice ;)
    If you are an analyst, then you must consider a number of factors:
    - what kind of application you are developing
    - what the user expects
    - physical location of the users
    - available hardware
    - available software
    - project's budget

    The list is not endless, but quite close.
    On the other hand, I agree with one of the replies to this post: a LOT of effort has been made around web interfaces in the last few years, and technology is definitely going that way... if not alredy there.

    Regards,

    Martin