On Friday, July 24, 2015 at 2:00:28 AM UTC-5, Gary Verhaegen wrote: > On Thursday, 23 July 2015, Gary Schiltz <[email protected]> wrote: > If I were writing it in Swing for the desktop, I'd create a top level frame, > populate it with a bunch of nested panels to group widgets like buttons, text > fields, text areas, etc, use some layout managers to make it display nicely > when resized, and attach event listeners to the interactive widgets. I could > use seesaw (https://github.com/daveray/seesaw) to write in Clojure instead of > Java to interact with Swing. Is there an equivalent ClojureScript library > that similarly interacts with some JavaScript widget library? > > React/Om works mostly like that, except that you use CSS as your layout > manager. I'm > not too sure about accessing files directly from a webpage, though. There may > be security > restrictions there. > > If you want to do anything with web technologies, you really have to spend > some time learning > HTML and CSS, even if you don't intend to write them yourself. Maybe in the > future there will > be rich enough sets of premade widgets, but my feeling is that at this point > you have to > understand your compilation target.
Of course, you're right about the value of knowing web tech when the browser is the target. I wasn't trying to be lazy (well, maybe a little :-), and I'm not completely ignorant of HTML and CSS, just a lot more experienced with desktop development for the client side. I am genuinely interested in what people in the industry use to target complex single page apps, delivered in the browser. And by complex, I am mainly referring to dynamic visual layout, and interaction semantics (i.e. creation, deletion, and modification of widgets to reflect app state). I know that HTML and CSS is the lingua franca of web designers, so when there is a significant involvement by web designers in a project, it makes no sense to try to bypass HTML and CSS. However, just as JavaScript can be thought of as an assembly language for ClojureScript (or CoffeeScript, etc), HTML and CSS can be thought of as assembly languages for hiccup, crate, garden, etc. Anyway, I'm not looking for a philosophical discussion about HTML/CSS/XML vs S-expressions, I was just wondering what folks consider to be the current state of the art for creating complex single page apps (and in my case, client-only apps). My impression is that a lot of what would would be implemented as JPanels in Swing would be div elements in HTML, and Fluxbox (HTML5) or a polyfill for it (HTML 4.1) are used for layout of the div elements and their contents. In the case of very simple widgets, perhaps form elements such as <input type=checkbox> are enough, but in anything more complex, folks use widget sets like JQueryUI, Sencha, etc. What is interesting to me is that where Java on the desktop pretty quickly settled on AWT and Swing (and SWT to an extent) back in the 1990s, there doesn't yet seem to be that much of a consensus on how to do single page apps. Is this also others' perception? Gary S -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
