Discussions

News: Swingweb released

  1. Swingweb released (24 messages)

    Swingweb is a Web application framework that enables AWT/Swing applications to operate inside a Web container and be presented as a Web application to the browser purely in HTML/CSS/javascript. The swing application renders and behaves in the Web container the same as it would as a desktop application. Swingweb allows the developer to specify the Web application in terms of UI components and their interactions. The functionality of the application is more formally defined, as opposed to a page-centric model where functionality is composed by gluing the Web pages loosely together. In addition, the component, once written, is reusable. Swingweb allows rapid development through existing GUI editors. Also, given the right architecture, desktop and Web application development can be merged into a single process, reducing development cost. The release includes multiple concurrent application sessions, transparent URL manipulation and session management inside Swingweb, a new mechanism for clean-up operations, and more complete documentation. The focus of the next release will be on Ajax support. What do you think of Swingweb?

    Threaded Messages (24)

  2. Issue on jdk15[ Go to top ]

    Someone mentioned to me that the demo has issue running on jdk15. I mainly tested up to jdk1.5_3 so if you later jdk, it is better to run the tomcat demo on jdk1.4. The fix is minor and will be in on next bugfix release. Thanks for you attention.
  3. Re: Swingweb released[ Go to top ]

    What are differences from Web Cream, WebOnSwing, and Wings http://www.creamtec.com/webcream/ http://java-source.net/open-source/web-frameworks/webonswing http://wings.mercatis.de/tiki-index.php Please explain, preferable with using my template: http://kgionline.com/annoying/openSrc.jsp
  4. Re: Swingweb released[ Go to top ]

    The "traditional" way for Swing applications is either: Swing - RMI/IIOP - EJB Swing - HTTP - "Procedural" JSP/Servlet In that way, Swing works fine without limitation. What is the advantages of using "AWT/Swing applications to operate inside a Web container"?
  5. The purpose[ Go to top ]

    The answer is in the line, "be presented as a Web application to the browser purely in HTML/CSS/javascript". The purpose of swingweb is to allow component-centric framework for web application development (like echo, wicket etc), using our favourite component model. :)
    The "traditional" way for Swing applications is either:
    Swing - RMI/IIOP - EJB
    Swing - HTTP - "Procedural" JSP/Servlet
    In that way, Swing works fine without limitation.

    What is the advantages of using "AWT/Swing applications to operate inside a Web container"?
  6. Re: Swingweb released[ Go to top ]

    Hi, What's the difference between webonswing and swingweb? I also got some StackOverflowError errors running the tomcat-demo, the demo2,demo3,demo4.
  7. StackOverflow exception[ Go to top ]

    Please use jdk1.5_3 or earlier, or jdk1.4 if you can. The StackOverflow is due to a (anonymous)classname change in later jdk.
    I also got some StackOverflowError
    errors running the tomcat-demo, the demo2,demo3,demo4.
  8. Re: StackOverflow exception[ Go to top ]

    Please use jdk1.5_3 or earlier, or jdk1.4 if you can.
    Suggestions like this make me feel that framework is very fragile. Is it bug in JDK? please reference it explicitly then.
  9. Re: StackOverflow exception[ Go to top ]

    Well, to cut the story short, swingweb replaces the very core of the awt implementation (toolkit, eventqueue implemtnation etc) and it is kind of sensitive to what changes they have made to the component model in each release. It is not a bug in jdk, but a mistmatch between how the component evolves and how swingweb toolkit is implementated. This issue is real minor (string match issue, as described in the forum).
    Please use jdk1.5_3 or earlier, or jdk1.4 if you can.

    Suggestions like this make me feel that framework is very fragile.
    Is it bug in JDK? please reference it explicitly then.
  10. Another Problem Found[ Go to top ]

    I tried the demos with jdk 1.5 update 3 and it really works fine with me. But when I just tried to change the empty project class (MyAppClass) with a new implementation. An exception is thrown saying "java.lang.Exception: Cannot start application class MyAppClass at org.onemind.swingweb.util.SwingWebUtils.startApp" when I replace the old class in the demos jar under the empty project folder (swingweb-demo-1.0.0.jar) with my new swing class. Its Code is as follows: import java.awt.Rectangle; import java.awt.event.*; import javax.swing.*; public class MyAppClass extends JFrame { JButton btnSayHello = new JButton("Say Hello"); public MyAppClass() { this.setLayout(null); btnSayHello.setBounds(50, 50, 100, 100); getContentPane().add(btnSayHello); setBounds(100, 100, 200, 200); setTitle("My First Test"); setVisible(true); btnSayHello.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent action) { JOptionPane.showMessageDialog(MyAppClass.this, "Hello World From Swing Framework"); } }); } public static void main(String[] args) { setDefaultLookAndFeelDecorated(true); new MyAppClass(); } } Did I made something wrong ? Thanks very much
  11. Re: Another Problem Found[ Go to top ]

    Seems like emptyproject.war need the swingweb-demo.jar which has the MyAppClass. Anyway, in your app, you need to do pack(), and show() on the JFrame. It should work fine.
    I tried the demos with jdk 1.5 update 3 and it really works fine with me. But when I just tried to change the empty project class (MyAppClass) with a new implementation. An exception is thrown saying "java.lang.Exception: Cannot start application class MyAppClass at org.onemind.swingweb.util.SwingWebUtils.startApp" when I replace the old class in the demos jar under the empty project folder (swingweb-demo-1.0.0.jar) with my new swing class.

    Its Code is as follows:

    import java.awt.Rectangle;
    import java.awt.event.*;
    import javax.swing.*;

    public class MyAppClass extends JFrame {
    JButton btnSayHello = new JButton("Say Hello");
    public MyAppClass() {
    this.setLayout(null);
    btnSayHello.setBounds(50, 50, 100, 100);
    getContentPane().add(btnSayHello);
    setBounds(100, 100, 200, 200);
    setTitle("My First Test");
    setVisible(true);
    btnSayHello.addActionListener( new ActionListener() {
    public void actionPerformed(ActionEvent action) {
    JOptionPane.showMessageDialog(MyAppClass.this, "Hello World From Swing Framework");
    }
    });
    }
    public static void main(String[] args) {
    setDefaultLookAndFeelDecorated(true);
    new MyAppClass();
    }
    }

    Did I made something wrong ?
    Thanks very much
  12. Re: Another Problem Found[ Go to top ]

    Ok i tried it in my IDE it seems like you need to do this.getContextPane().setLayout(null) instead of this.setLayout(null) which cause an Error. It will show fine then without any other changes.
  13. The Problem still exists[ Go to top ]

    I used show() and pack() and getContentPane().setLayout(null) and it doesn't also work as well. I tried that simple swing program using the rules you told me about and it also gives me the same exception : //That is the code public class MyAppClass extends JFrame { public MyAppClass() { JButton btnSayHello = new JButton("Swing Test"); getContentPane().add(btnSayHello); btnSayHello.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent action) { JOptionPane.showMessageDialog(MyAppClass.this, "Hello World From Swing Framework"); } }); } public static void main(String[] strings) { MyAppClass myappclass = new MyAppClass(); myappclass.setTitle("Swing WebFramework Test"); myappclass.pack(); myappclass.show(); } } //############################################### //The only case that works fine is import javax.swing.JButton; import javax.swing.JFrame; public class MyAppClass extends JFrame { public MyAppClass() { getContentPane().add(new JButton("Swing Test")); } public static void main(String[] strings) { MyAppClass myappclass = new MyAppClass(); myappclass.setTitle("Swing WebFramework Test"); myappclass.pack(); myappclass.show(); } } //##################################################### So what is the problem is there some set of constraints I have to consider in my code. Iam really very interested about that framework but I don't know why it works fine sometimes and other times it crashes. //##################################################### Thanks very much for your help. It is really so much kind from you.
  14. Re: The Problem still exists[ Go to top ]

    I tried your exact code and it worked fine for me on jdk1.5_3. Make sure you have packaged the jar correctly. Most problem you reported here are programmer mistake that u can troubleshoot :) (e.g. the first source code you post would not run properly as native swing). Make sure you look at console or tomcat log too to make sure there's additional info. You can post stacktraces to me on the forum at http://onemindsoft.org cause i check there more often. Another note is that modal dialog (JOptionPanes) will not work. This is one of the only 7 things that anyone need to know using swingweb. BTW, I have tried numerous applications developed by others (jdictionary, rssview, to name a few) and they are shows up fine. So it is pretty stable IMHO. Nevertheless, try it out and let me know what you think. Thanks
  15. Re: Swingweb released[ Go to top ]

    Why would I uses this and other similar frameworks (WebOnSwing, WingSet, WebCream, etc.) over something like JSF? Do they allow for any flexibility in terms or the servers that they run on?
  16. Re: Swingweb released[ Go to top ]

    Why would I uses this and other similar frameworks (WebOnSwing, WingSet, WebCream, etc.) over something like JSF?

    Do they allow for any flexibility in terms or the servers that they run on?
    In my opinion, I think that these swing frameworks are made for migrating easily desktop applications into the web without much effort and rework. And I really think that this objective is great although I feel that these frameworks consume memory much more than standard known MVC web framework like Struts or JSF.
  17. Re: Swingweb released[ Go to top ]

    While migrating desktop is one use of these framework, the real benifit IMHO, is (from swingweb documentation)
    to allow the developer to specify the web-application in terms of UI components and their interactions. The functionality of the web-application is more formally defined as opposed to page-centric model where functionality is composed by gluing the webpages loosely together. Furthermore, the application functionality is more predictable and guaranteed to work as long as all UI components are unit-tested. There will be no more page-management, html/javascript and http session-state manipulation hassle. Once written, the component, either fine-grain like a text-box, or coarse-grain like calendar, will be reusable and save development costs over time
    This generally apply to all these frameworks.
    Why would I uses this and other similar frameworks (WebOnSwing, WingSet, WebCream, etc.) over something like JSF?

    Do they allow for any flexibility in terms or the servers that they run on?

    In my opinion, I think that these swing frameworks are made for migrating easily desktop applications into the web without much effort and rework. And I really think that this objective is great although I feel that these frameworks consume memory much more than standard known MVC web framework like Struts or JSF.
  18. Frameworks merge[ Go to top ]

    Hi, one thing I can't understand is why everyday a new framework appears saying it's the best one when several other exists already with a high degree of development. I'm talking about Echo2, GWT, Laszlo, etc, etc. Why Sun, IBM or any other company doesn't start a real good thing, i.e a standard? Recently I've experienced a quest to choose a framework for a web environment. After look at fantastic frameworks like Echo2 I choosed HTML+Struts+Ajax+Hibernate arch because it was the one that gave me more certainties and I could not be risky! When I look at Swingweb I only see a new framework starting what others already do, and I'm full with this kind of new frameworks that really aren't new!
  19. Re: Frameworks merge[ Go to top ]

    Hi, one thing I can't understand is why everyday a new framework appears saying it's the best one when several other exists already with a high degree of development. I'm talking about Echo2, GWT, Laszlo, etc, etc.

    Why Sun, IBM or any other company doesn't start a real good thing,
    Dear Sergio; Innovation, ideas are nobody's monopoly. I totally disagree with your opinion... Let people innovate, come up with newer ideas, and itz up to the techie to evaluate and find out which is the best framework according to the scenario;) J
  20. Key words: new ideas![ Go to top ]

    Exactly John, like you said "Let people innovate, come up with newer idea...", but most of the time what I see (like in this case) is a "new" framework doing things already done by others. Why re-invent the wheel? Why not make it rounder :P?
  21. Re: Key words: new ideas![ Go to top ]

    Well, in swingweb's defense: - For echo, wings etc, they don't use swing component directly, but mimic(read: rewrite) swing-like component models. The approach imposed learning curve, and doesn't provide possibility for migration to desktop client when ocasion arises. - framework that uses swing: webonswing is commercial instead of opensource so i won't compare. WebOnSwing has steeper learning curve than swingweb, e.g. compare webonswing documentation to "7 things" (link above) to know in swingweb. While all the frameworks might look similar, I believe the authors must have done some evaluation before they start something, not to mention in opensource case, for nothing but the pure excitement of expression ;)
    Exactly John, like you said "Let people innovate, come up with newer idea...", but most of the time what I see (like in this case) is a "new" framework doing things already done by others. Why re-invent the wheel? Why not make it rounder :P?
  22. Re: Key words: new ideas![ Go to top ]

    opps i meant to say webcream is commercial above.
  23. Re: Swingweb released[ Go to top ]

    A bugfix release (Swingweb 1.0.1) is out to resolve problem on newer jdk15 (tested on update 7).
  24. Re: Swingweb[ Go to top ]

    What is the different between JSF and Swingweb??
  25. Re: Swingweb[ Go to top ]

    Some comparison between swingweb and jsf: Pro: developing application is easier using swingweb, simply use your favourite (swing) GUI designer to develop and test the application, deployed in the webcontainer to make sure functionality and look and feel, move to production. No more dealing with html,tag,pages,scripting like in jsf. Con: Swingweb has higher memory footprint. jsf is more developed standard and has more community support.