(Disclaimer: this is an honest question out of curiosity. I don't mean to imply that an embedded DSL is the right way, or that it's better -- but I do believe there's a tradeoff here and am interested in how that tradeoff factored in to the decision to implement this as a separate language.)
A minimal, UI-focused programming language for web designers
31–40 of 48 posts
Re: A minimal, UI-focused programming language for web designers
#32However, I'd think that support for more than just click events will be needed to make this worthwhile. 'hover', 'tap' and 'drag'/'drop' seem pretty logical.
Re: A minimal, UI-focused programming language for web designers
#33This seems to be implemented as an external DSL, with a brand new syntax and semantics. So my question is, why do that instead of implement it as an embedded DSL? (Disclaimer: this is an honest question out of curiosity. I don't mean to imply that an embedded DSL is the right way, or that it's better -- but I do believe there's a tradeoff here and am interested in how that tradeoff factored in to the decision to impl…
Re: A minimal, UI-focused programming language for web designers
#34I used to work with a brilliant designer (seriously great - he could realise the most terrible and tangled client ideas in the most stunningly creative and beautiful ways), but code was just gibberish to him. He'd managed to muddle his way through doing simple interactions in ActionScript 2 with the help of several developer friends, but the move to ActionScript 3 had completely defeated him.
I gave him a set of little snippets ("This is how you make something clickable: I don't think having to learn a precisely structured invocation in English (with particular CSS selectors in it) would really be any better for him than just copying in `$("#foo").on("click", function() { $("#bar").addClass("hide"); });` as long as someone had told him "#foo" was what you were clicking on and "#bar" was what you were hiding. I actually think the other problem with this idea is that the CSS is probably harder to understand than the JavaScript, and the number of people who can write `transform: translateY(80%) scale(.8); transition-timing-function: cubic-bezier(.3, 0, 0, 1.3);` but can't write just a couple of lines of jQuery must be vanishingly small. The designers I know, at least, either know no CSS and JavaScript at all, or minimal amounts of CSS and JavaScript, or a lot of CSS and the basics of JavaScript - I don't really know any in 2014 who are experts at CSS but have no JavaScript (but I'm happy to be proven wrong on that).") and once he had that, he was off. He never properly understood things like for loops, but it didn't really matter to him too much since he was perfectly happy copying and pasting since the end result looked no different.
Re: A minimal, UI-focused programming language for web designers
#35Re: A minimal, UI-focused programming language for web designers
#36This seems to be implemented as an external DSL, with a brand new syntax and semantics. So my question is, why do that instead of implement it as an embedded DSL? (Disclaimer: this is an honest question out of curiosity. I don't mean to imply that an embedded DSL is the right way, or that it's better -- but I do believe there's a tradeoff here and am interested in how that tradeoff factored in to the decision to impl…
I don't understand what you mean. Can you elaborate?
IMHO, the OP is presenting a DSL (DSL = domain specific language), and there are at least two common ways to implement DSLs, embedded and external (i.e. not embedded):
from http://en.wikipedia.org/wiki/Domain-specific_language:
embedded (or internal) domain-specific languages, implemented as libraries
which exploit the syntax of their host general purpose language or a subset
thereof, while adding domain-specific language elements (data types, routines,
methods, macros etc.)
An example would be with parsers. Parser combinators are usually an embedded DSL. Tools like Lex and YACC are not embedded DSLs (as far as I know).-----
Disclaimer: both have pros and cons, etc. etc. Interested in the author's motivations, not in debating which way is better, etc. etc.
Re: A minimal, UI-focused programming language for web designers
#37Re: A minimal, UI-focused programming language for web designers
#38Earlier quoted context omitted.
I was thinking the same. From the few examples given, it seems to be only useful to toggling classes from click events. Would like to see some more use cases.
"Does uilang support other events? No, uilang lets you only react to clicks. Hover effects can usually be achieved in CSS and other events are simply out of the scope of this language." I guess if you only need support for adding/removing/toggling classes, and you have no plans of using jQuery, this could be useful. It's 1kb of Javascript, compared to jQuery, which is over 80kb minified. Now, everyone and their dog l…
Re: A minimal, UI-focused programming language for web designers
#39Re: A minimal, UI-focused programming language for web designers
#40Kind of a cool way to let designers dive into interactive layouts, if only for just prototyping. I could see it being fleshed out into something that could make a big splash, but it seems really limited at the moment to simple CSS toggles..
Where is the Github project?