World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Graham 15-Feb-2009 [11435] | I still like the cleaner separation of gui from function |
Anton 15-Feb-2009 [11436x3] | Well, I think it can pretty easily be done for your own forms, by making a function that accepts an action specification, as above. Apply it to your forms and that's that. Eg. if you could say: window: layout [ ...text-list ... ] set-behaviours window [ text-list [...] ] view window Wouldn't that be almost as good (if not better) than any built-in inline action specification ? |
(such as we explored above.) | |
You just need to write the set-behaviours function :) | |
Graham 15-Feb-2009 [11439] | :) |
Anton 15-Feb-2009 [11440] | Must go - exercise time. |
Pekr 15-Feb-2009 [11441x4] | I think that your talk here is a little bit late for VID3, as it seems to me (according to docs), that those things were already decided ... |
As for actions (actors, reactors), having them separate from style structure? I can find it confusing ... | |
There is not just general 'do, like in R2, there is now many reactors. In order to better understand new architecture, here's some docs - http://www.rebol.net/wiki/R3_GUI... | |
Actions separation is done in stylize level ... | |
Graham 15-Feb-2009 [11445] | I don't think it's too late ... noting is set in stone yet. |
Pekr 15-Feb-2009 [11446] | Hmm, I don't understand advantage to what you propose anyway ... |
Janko 15-Feb-2009 [11447x2] | I am sorry for my extreme oppinion on this subject but I think "unobtrusive javascript" was invented when web2.0 got hip and cool and when web designers started coding. To me as a user it meant that basecamp blocked my whole browser (even the mouse pointer didn't move) on every page reload for 1-2 seconds (while js was attaching events to all the nodes). |
gmail / google calendar were the apps that pushed the edge of what client with js+html can do and look how unobtrusive are they | |
Chris 15-Feb-2009 [11449x3] | J: I'm not sure that's fair - UJS addresses many problems faced confronting a very complex development environment to perform even elementary manipulation (see also Progressive Enhancement/Graceful Degradation). At that, the three sites you cite are neither examples of UJS or PE/GD, nor typical examples of usage. |
Not usage, need. | |
For another place, perhaps, but designers need to know how to code (web 2.0 or no). If they leave all coding to programmers, design gets messed up. | |
Janko 15-Feb-2009 [11452x2] | No problem , I said I have a little exptreme oppinion on this, and extreme opninons are usually not correct ;) . But I think "unobtrusive javascript" is an extreme option too, I believe that eingeeners have to find fastest, cheapest, most robust and mainainable solutions that *work the best* for their problem. But something like UJS is a label or an ideal that you can hold to in your work and more you hold to it better you are from this ideal's viewpoint, but I like to be more flexible. I will adhere to it or only so far as I think it get the best coctail from the 5 points I mentioned above. |
basically no problem if we have different view of this, I just wanted to note my vote that not every web-developer thinks UJS is such an awesome idea by itself. That doesn't mean I want to do "big grey ball of goo" programming either. | |
Chris 15-Feb-2009 [11454x3] | I think the web is a special case though. I don't think there is any other environment where language interpretation varies so widely, and where binding the language can have harmful effects. Yes, heady concepts are not always pragmatic, but the short road to pragmatism on the web is fraught with pitfalls. |
big grey ball of goo - is that Perl? | |
G&A: I'd like separation too - in the long run, it makes for code that is easier to adapt and maintain, and allows you to refine language around the individual components | |
Gregg 15-Feb-2009 [11457x2] | First, I think JS is not something we should look at for models. It's new enought that it is just going to reinvent what's been done before, unless they come up with something truly revolutionary, and my gut feeling says that's not going to happen. It also depends on what kind of apps you're writing, and what you want the language to hide from you. What's been done before that works, or not? MVC has seen a resurgence with RoR and other frameworks being built on it. Now look at a low level approach, where you handle the main event loop yourself. Anyone remember writing C programs for Windows early on? Maybe some still do. You had a huge switch statement to dispatch. On the downside, that was hideous to read and maintain. A benefit, though, was that you could hook into it very easily, because it wasn't spread throughout the app. Then there's the whole VB/event-driven model. R2+VID is wonderful for very simple things, because you don't have much to do, actions are right there with their faces, etc. It starts getting in the way when you build larger apps that need to track relationships between faces and such. And it is not well-suited to large apps, just like REBOL itself. It doesn't provide the organization, tools, and features needed. Of course, we can build all that ourselves, if we have the inclination. RebGUI is the best example of that. |
I like the idea of apps based on FSMs and message dispatch. That means simple apps aren't nearly as simple anymore, but it gives you the tools to build bigger things. It's also a different way of thinking, which can be hard to get people to accept. Anyway, rather than asking if UJS is the right model, we first need to ask what our goals are. | |
BrianH 15-Feb-2009 [11459x3] | Unobtrusive Javascript is based on the principle that the behaviors attached to the structure need to be optional, because Javascript might not work or be turned off. This will *never* be the case for R3 GUI behaviors, so the principle doesn't apply here. |
The "separation of form and function" principle has already been implemented with the separate style system. | |
But that is not the "Unobtrusive Javascript" metaphor, it is more like the separation of HTML and CSS. | |
Graham 15-Feb-2009 [11462x2] | If you have a one screen application, it doesn't matter how you write it. If you have over 300 screens as I do, then you look at ways it might be more easily maintained. |
Gregg, JS is a few years older than REBOL. | |
BrianH 15-Feb-2009 [11464] | We have. That is why we have the current design. |
Graham 15-Feb-2009 [11465] | BrianH, how does R3 styles work? I didn't notice it on the R3_Gui page |
BrianH 15-Feb-2009 [11466x2] | Remember, the layout won't have style code in it. |
(sorry, your message hadn't come through yet) | |
Graham 15-Feb-2009 [11468] | R3 styles? |
BrianH 15-Feb-2009 [11469] | (sorry, I was busy). Imagine if you took the structure/appearance separation of HTML/CSS to the extreme, and had *no* appearance code in your layouts, just behavior and structure. Put all appearance code in the styles. That's the R3 GUI. Oh, and the styles will be themable too. |
Graham 15-Feb-2009 [11470x2] | got an example? |
the one I took from the wiki has the behavior code attached to the structural elements | |
BrianH 15-Feb-2009 [11472x2] | Not really, ask Henrik. I'm a Core guy. |
Behavior and structure are together in the layout, yes, but in a way that is easily seperable. And that doesn't matter because the layout won't have appearance code in it. | |
Graham 15-Feb-2009 [11474x2] | Can we style behaviours as we can structure? |
( I keep switching between UK and US spellings ... ) | |
BrianH 15-Feb-2009 [11476x4] | I don't get the question. You can seperate the actual implementation of behavior from the layout easily. You can't style structure. |
You style styles (what other GUI systems call controls). | |
The panel system let's you swap in different pages if you have more complex apps - see the demo code. | |
It will be much easier to build 300-screen apps. :) | |
Henrik 15-Feb-2009 [11480x2] | I can provide an example: view [ panel [ error-text "Something went bad" ] group [ok-button cancel-button] ] There's no appearance code in this layout. |
You can do the same in VID for R2. | |
BrianH 15-Feb-2009 [11482] | But it's *much* harder :( |
Henrik 15-Feb-2009 [11483] | Well, I've done that in my own VID extension kit (which I'm still contemplating whether I will release some day): Provide more styles with very specific purposes. This strongly reduces the need to be specific many times all over a layout and the layout becomes much smaller and cleaner. Also avoiding stylize inside the layout helps. |
Graham 15-Feb-2009 [11484] | we have close buttons, and ok buttons etc. Can we define them on the fly for the scope of the window? |
older newer | first last |