--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/Ut-HkNTqRUo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
Wow, there is a lot to deal with :), so let me throw out some ideas:- have you considered building a web-app instead of a desktop app? If so, have a look at one of the react based languages (om or reagent would be my choice). Alternatively take a look at other http://en.wikipedia.org/wiki/Functional_reactive_programming libraries.It is a different way of working, but its programming model restricts you in a way that removes many problems (if you see what I mean).Also, I would be reaching for an in-memory database (assuming a server isn't involved) about now, datatomic would be the obvious choice.
--
On the other hand, while the web app route may feel a bit overwhelming, it really is worth learning. Once you program web, you can deliver to any platform. It's ubiquitous. And once you get the hang of it, the paradigm isn't really all that challenging. But up to you obviously.
{:type :border-pane :center {:type :group :children [{:type :circle :radius (planet-sizes size) :centerY (/ (planet-sizes size) 2) :centerX 0}]} :bottom {:type :stack-pane :maxHeight 110 :prefHeight 110 :children [{:type :pie-chart :data (map (fn [{percent :planet.biome/percentage type :planet.biome/type}] (slide/build-item {:type :pie-chart-data :name (str type) :value percent})) (:planet/biomes planet))}]}} Notice how you don't have to muck with all the junk found in the browser, you just describe an panel, say what you want to put where (center, bottom, etc). and the layout engine takes care of the rest. And this entire thing is GPU accelerated so drawing of the GUI is pretty fast. The web side of things has a place, but it's also mired in decades of legacy, that's stuff you don't find in modern UI toolkits like JavaFX, QT and WPF.
Timothy
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Anyway, given what I know today If I had to write a desktop GUI, my first instinct would be Clojurescript+node-webkit
My evolution of Java UI was swing>JSP>struts>JSF>velocity then onto
JavaScript/ExtJS. My instinct now when I hear the words "Java" and
"UI" is to run a mile :).
IntelliJ is swing! Well, knock me other with a feather :). Still wouldn't want to go anywhere near building a Swing app though :).
I have been working on a desktop App for the last few months and I have not got many problems with the architecture and isolation of the views.
In my young blog, I have few posts of how to set up and launch the JavaFX App.
I also have a MVVM and the conventions of how to compose each layer.
In regard to the events, I have also written an Pub-Sub event bus inspired by Timothy Baldridge using core.async.
There is a wrapper called clojurefx by Zilti that helps you binding properties of the visual components to atoms. He is refactoring this library in his Bitbucket repo. I am using the one in GitHub.
You can also use the add-watch for listening to changes in the state or inferior layers, as you would do with an "addListener".
In regard to the cache or client database, I have a lack of knowledge on that. At the moment I have a very cheap bespoke solution using steveskeys, which use a couple of random access files to read and dump the nippy serialized objects from memory to disk and viceversa.
If you have a good solution for your client cache/database I would like to hear about it.
The idea of that cache, is giving some relief to the server on calls that you have previously done and have an offline capabilities to visualize an aggregated snapshot of your data. But when missing the cache, would just mean, doing few more REST calls to the server.
If you want more details about the MVVM desktop app, I can help you with that. I have 2500 lines plus the CSS. Ping me on twitter.
http://www.efrainbergillos.com/clojure/clojure-publishers-subscribers-and-mvvm/
Regards, Efrain