I would have to strongly disagree that QT is a good idea for clojure
development.  I have posted about this several times before but I find
that QT isn't ready for heavy java dev just yet, at least on the mac.

1.  QT jambi will not run on the mac unless you are using java 1.5.
This is because QT is using the carbon API below to implement its
interfaces and the mac version of java 1.6 doesn't support the carbon
API, it is 64 bit which means you are going 100% cocoa.  So no java
1.6 for you.

2.  QT's event handing is very sensitive to threading issues.  This
boils down to when you are developing from the repl you will most
likely get hangs.  You have to use odd options on the java invocation
or your process will hang permanently.

3.  Forget about openGL with QT, at least on the mac.  Running any
JOGL (or lwjgl) code starts an initialization system that fires up
some swing threads.  If you are running from the repl, you can bet
this will hang your machine due to #2 above.  I am not certain what
other situations will hang but I assure you it is irrecoverable when
it does.

I believe you can create very good looking applications with swing,
builder or otherwise as many people have done so (not that it is
easy).  I do believe a builder is a giant step forward but only if you
have a design team that you would like to separate from your coding
team.  If it is just you, then a builder really doesn't add that much.

Both systems allow separation between view and model or any event
system you would like.  So that is a non-issue.  The points I have
stated above very much are issues you will have to take care of.

One thing I think would be useful for clojure would be
clojure.contrib.swing that has functions that create various callback
listeners just from a function (wrap the proxy generation) and such,
as well as various macros I have written for dealing with
GridBagLayout etc.  If you decide to go this way you should let me
know as I would like to show some of them to you and perhaps we could
start the process of formalizing them into clojure.contrib.

Chris

On Feb 16, 12:36 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Thanks,
>
> --
> Laurent
>
> 2009/2/16 Dan <redalas...@gmail.com>
>
>
>
> > Hello,
>
> >> Do you know of a good pointer that goes beyond the "don't use it"
> >> argument, and really makes a thorough comparison of pros and cons of the 2
> >> frameworks ?
>
> > I'm not saying don't use Swing, I'm saying prefer Jambi.
>
> > My memory of Swing is dated so I'd have trouble making a thorough
> > comparison but I can provide an outline.
>
> > In favour of Swing:
>
> > - No extra dependencies
> > - No license restriction (Qt 4.4 requires you to buy a commercial license
> > if you don't want to opensource your app, won't be true anymore with Qt 4.5)
> > - De facto standard
> > - Instantly cross-platform (Jambi requires you to package a different jar
> > for each platform)
>
> > In favour of Qt:
>
> > - Great GUI builder (optional of course but you should give it a try, it's
> > powerful and doesn't get in your way)
> > - Cross-language (you can easily use the same GUI in C++, Python, Java,
> > Ruby, Perl, and a few others with minimal porting efforts
> > - Signals and slots, great way to manage events, objects emits signal which
> > you connect to slots. Often you just have to connect them together with no
> > extra code. If I want to implement a backbutton to work with a QWebview, I
> > just have to connect the clicked signal from the button to the back slot
> > from the web view (one liner).
> > - Encourages separation of your GUI and logic (very easy to change your GUI
> > without impeding the rest of your program)
> > - Better layout (this is subjective but I was fighting all the time with
> > Swing's and not Qt's)
> > - Better organisation (subjective again but I find it much easier to find
> > my way around Qt)
>
> > That's all I can think of at the moment. Overall, I don't think Swing is
> > terrible toolkit but Qt definitly feels a lot better to me.
>
> > You can check this blog post to have an overview on how to use it in
> > clojure:
>
> >http://briancarper.net/2008/10/31/qt4-in-lisp/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to