I've been using Swing. But, one thing to consider is that many (most?)
big applications use extension libraries such as JIDE (https://jide-
oss.dev.java.net/), SwingX (https://swingx.dev.java.net/) or Flamingo
(https://flamingo.dev.java.net/). They contain extra widgets that have
their own extra APIs of course. So while abstracting "the JDK
Swing" (or any other toolkit) away would be a huge thing, it would be
somewhat lacking regardless.

Do you think the DSL you described would be easily extensible to work
with that kind of extension libraries? If not, maybe that could be one
reason to use a some other toolkit (more complete than basic Swing) as
a base for the DSL.

Best Regards,
Joonas

On May 27, 6:18 pm, Luke VanderHart <luke.vanderh...@gmail.com> wrote:
> My side project is a fairly complex GUI application written in
> Clojure. Recently, I've become irritated with using Java interop for
> everything. It's not that Clojure doesn't have nice java interop - it
> does. It's just that when interacting with a GUI framework, which is a
> large part of my app, I have to be back in mutable object-oriented
> land, worrying about class hierarchies, mutable state, locks, etc.
> Yucky.
>
> So, with a perhaps dangerous lack of sanity and without any guarantee
> of success, I've decided to try my hand at writing an idiomatic
> Clojure GUI library. If I have success (which I doubt) I will of
> course make it available as open source.
>
> I intend for it to be mostly declarative, with a nice DSL for defining
> GUI elements. Each component will also implement map, and use one of
> Clojure's reference types as an interface for inspecting / updating
> its state. I may also implement some aspects of Functional Reactive
> Programming wherever it's convenient to do so.
>
> What you all must help me decide is what GUI framework to use as the
> underpinnings of it. It's genuinely hard to decide. I have at least
> some experience with all of them, so I have no strong preference, but
> I'd like to get your input. I did consider trying to make it abstract
> enough that you could plug in *any* of them under the hood, but
> there's enough differences between the frameworks that that would get
> very ugly very fast.
>
> Possibilities are:
>
> AWT
> Pros: native widgets, bundled with Java, low-level
> Cons: few widgets, considered somewhat obselete
>
> Swing
> Pros: bundled with Java, good widget selection
> Cons: non-native widgets
>
> SWT
> Pros: native widgets, widely used
> Cons: requires platform-specific libs
>
> QT Jambi
> Pros: native widgets, huge widget selection, highly-regarded framework
> Cons: requires platform-specific libs, writing custom widgets is
> hairy, momentum and support seem to be lagging since Nokia dropped
> official support.
>
> Remember, the actual API won't matter - that will be completely
> abstracted away. So try to focus on the framework's look and feel.
> Also let me know if I've missed any of the framework's key
> characteristics.
>
> Thanks!
>
> -Luke

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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