[Lift] Re: Lift deal breakers

2009-09-18 Thread dres
I agree with Chas but unfortunately it sounds like a lot of work to change. I would be happy if Lift used JQuery for this but then it would be tied to a specific library. I wouldn't mind but I can see why Lift folks would. On Sep 13, 6:00 pm, Charles F. Munat c...@munat.com wrote: marius d.

[Lift] Re: Lift deal breakers

2009-09-14 Thread valotas
On Sep 14, 3:43 am, marius d. marius.dan...@gmail.com wrote: I kinda used the term js file a bit too loosely. It is true that each page would likely have different functions there and even the same page on subsequent load would have different content so the file can not really be cached.

[Lift] Re: Lift deal breakers

2009-09-14 Thread Indrajit Raychaudhuri
On Sep 14, 7:35 am, Charles F. Munat c...@munat.com wrote: But we've got a desideratum, anyway. Maybe down the road someone will have time to look at it. Thanks for the clarification! And also enable somebody (myself) take a pause and (re-)learn/ understand many important concepts in the

[Lift] Re: Lift deal breakers

2009-09-14 Thread David Pollak
On Sat, Sep 12, 2009 at 11:48 AM, Charles F. Munat c...@munat.com wrote: I, too, would like to be able to move the liftAjax script call to the bottom of the page. Open a ticket and I'll see what I can do... it shouldn't be too hard Chas. Dustin Whitney wrote: Hey, I like Lift so in

[Lift] Re: Lift deal breakers

2009-09-14 Thread David Pollak
On Sat, Sep 12, 2009 at 7:21 AM, Indrajit Raychaudhuri indraj...@gmail.comwrote: On Sep 12, 7:02 pm, marius d. marius.dan...@gmail.com wrote: On Sep 12, 8:34 am, Indrajit Raychaudhuri indraj...@gmail.com wrote: Even if we assumed that Lift managed to do all the hard work, we still

[Lift] Re: Lift deal breakers

2009-09-14 Thread David Pollak
On Mon, Sep 14, 2009 at 12:51 AM, valotas valo...@gmail.com wrote: On Sep 14, 3:43 am, marius d. marius.dan...@gmail.com wrote: I kinda used the term js file a bit too loosely. It is true that each page would likely have different functions there and even the same page on subsequent

[Lift] Re: Lift deal breakers

2009-09-14 Thread David Pollak
Nothing in Lift the way it exists today would preclude such a setup. Just as I was able to integrate with Cappuccino (which is all JS-generated view), it's dead simple to integrate with any other non-markup framework. The thing that triggered this thread was Lift's insertion of JavaScript into

[Lift] Re: Lift deal breakers

2009-09-14 Thread Timothy Perrett
Just wading into the fray here... Looking at people who have responded to this thread, they are mainly people i've not seen on the list before (sorry if your regulars perhaps i should pay more attention!) and that indicates to me that general users dont want *any* js in page (either in the head,

[Lift] Re: Lift deal breakers

2009-09-14 Thread Viktor Klang
On Mon, Sep 14, 2009 at 8:20 PM, Timothy Perrett timo...@getintheloop.euwrote: Just wading into the fray here... Looking at people who have responded to this thread, they are mainly people i've not seen on the list before (sorry if your regulars perhaps i should pay more attention!) and

[Lift] Re: Lift deal breakers

2009-09-14 Thread Charles F. Munat
Done David Pollak wrote: On Sat, Sep 12, 2009 at 11:48 AM, Charles F. Munat c...@munat.com mailto:c...@munat.com wrote: I, too, would like to be able to move the liftAjax script call to the bottom of the page. Open a ticket and I'll see what I can do... it shouldn't be

[Lift] Re: Lift deal breakers

2009-09-14 Thread Viktor Klang
On Mon, Sep 14, 2009 at 9:29 PM, Charles F. Munat c...@munat.com wrote: When you say that direct JS callbacks (i.e. onclick=foo()) outperforms _any_ other approach what is the source for your assertion? And what do you mean by outperforms? What are the criteria? Are you talking about speed?

[Lift] Re: Lift deal breakers

2009-09-14 Thread Charles F. Munat
My sites are low traffic mostly, so a fraction of a second isn't that important to me, but I can see how it might be to you. (Which is not to say that I don't try to minimize hits to the database, combine files, minify, etc., all of which are fractional-second improvements, usually.) I don't

[Lift] Re: Lift deal breakers

2009-09-13 Thread valotas
I also think that javascript should go just before the boby's closing tag. The main reason: Yahoo's YSlow and Google's Page speed both telling you that is better to have as less scripts as possible and all of them placed at the end of the page. The optimal would be one javascript at the end of

[Lift] Re: Lift deal breakers

2009-09-13 Thread marius d.
On Sep 13, 11:33 am, valotas valo...@gmail.com wrote: I also think that javascript should go just before the boby's closing tag. The main reason: Yahoo's YSlow and Google's Page speed both telling you that is better to have as less scripts as possible and all of them placed at the end of

[Lift] Re: Lift deal breakers

2009-09-13 Thread Timothy Perrett
A synthetic file sounds good to me and would probably be preferable. Cheers, Tim On 13 Sep 2009, at 20:31, marius d. wrote: That looks a little cleaner but we'll have to look more into it if we'd want to go on this path. Perhaps accumulate those function into synthetic js file .. we'll see

[Lift] Re: Lift deal breakers

2009-09-13 Thread marius d.
I think so too. Does anyone have an opinion against this? I'll probably have some time this week or next weekend to work on it. Br's, Marius On Sep 13, 2:59 pm, Timothy Perrett timo...@getintheloop.eu wrote: A synthetic file sounds good to me and would probably be preferable. Cheers, Tim

[Lift] Re: Lift deal breakers

2009-09-13 Thread Charles F. Munat
+1 I would much prefer it if all JS were in external files (synthetic as necessary) and simply attached to the DOM via ids or classes. I have been building my sites this way for years, and I find it the best practice for reasons already put forth in this discussion. Chas. Timothy Perrett

[Lift] Re: Lift deal breakers

2009-09-13 Thread Xavi Ramirez
If I understand everything correctly, the proposal is to dynamically create a js file for each page request to add event handlers? If this is true, then I'm against the proposal for the following two reasons: 1. Every page will load slower Since the js file is dynamically create on each

[Lift] Re: Lift deal breakers

2009-09-13 Thread Naftoli Gugenheim
You mean cached by the browser? Isn't that a matter of setting headers, since it won't change in the session--or will it? Can one app switch dynamically from JQuery to YUI? - Xavi Ramirezxavi@gmail.com wrote: If I understand everything correctly, the

[Lift] Re: Lift deal breakers

2009-09-13 Thread marius d.
I kinda used the term js file a bit too loosely. It is true that each page would likely have different functions there and even the same page on subsequent load would have different content so the file can not really be cached. I'm thinking that instead of: button

[Lift] Re: Lift deal breakers

2009-09-13 Thread Charles F. Munat
I'm afraid I have to disagree. As a website developer, I've been putting all my JS into an external file (per page when necessary) for many years without any problems. Every good JS programmer I know does the same. It is considered *more* not less robust to put the JS in an external file and

[Lift] Re: Lift deal breakers

2009-09-13 Thread Naftoli Gugenheim
Is the DOM approach ruled out? I.e., generate a short script tag that is generated from the events needed to be listened for, which are delegated to a javascript generator that depends on the library. The actual JS files would be static. Maybe I missed where this option was eliminated? Also,

[Lift] Re: Lift deal breakers

2009-09-13 Thread Charles F. Munat
marius d. wrote: I'm thinking that instead of: button onclick=liftAjax.lift_ajaxHandler ('F1029758482780OTA=true',null, null, null); return false;Press me/ button We could have: button onclick=liftAjax('F1029758482780OTA')Press me/button This is not what I had in mind at all. You

[Lift] Re: Lift deal breakers

2009-09-13 Thread Josh Suereth
This is how we do JavaScript/ExtJS development at my work place, except with a twist. We actually have a javascript-only project for a our javascript library. We use the maven-javascript-tools plugins to create a javascript project that relies on others (in our case, things like Simile Timeline

[Lift] Re: Lift deal breakers

2009-09-13 Thread Xavi Ramirez
Hi Marius, Ahh yes I see. That's very different from what I originally understood. Your implementation makes sense. Thanks, Xavi On Sun, Sep 13, 2009 at 8:43 PM, marius d. marius.dan...@gmail.com wrote: I kinda used the term js file a bit too loosely. It is true that each page would

[Lift] Re: Lift deal breakers

2009-09-13 Thread marius d.
On Sep 13, 8:00 pm, Charles F. Munat c...@munat.com wrote: marius d. wrote: I'm thinking that instead of: button onclick=liftAjax.lift_ajaxHandler ('F1029758482780OTA=true',null, null, null); return false;Press me/ button We could have: button

[Lift] Re: Lift deal breakers

2009-09-13 Thread Charles F. Munat
Well, conciseness is always good. I haven't looked at (and don't have time to look at) the code that inserts this stuff, so I'll take your word for it that it's a big undertaking. Lord knows, I don't have time, so I'm certainly not complaining. But we've got a desideratum, anyway. Maybe down

[Lift] Re: Lift deal breakers

2009-09-13 Thread Charles F. Munat
This is pretty close to what I'm doing. I have a REST backend (in Lift) that serves the data, and a separate Ext JS front end (one single page with a lot of Ext JS) running in a separate Lift app. It's still in progress and I haven't worked out all the details yet, but I'm very happy with it

[Lift] Re: Lift deal breakers

2009-09-12 Thread Bjarte Stien Karlsen
Hey, If I understand Dustin correctly here he wants unobtrusive javascript. That is no javascript in the elements but javascript code that hooks into the dom and attaches events as needed. I am not familiar enough with the internals of lift's js wrapping to know how easy it would be to do it

[Lift] Re: Lift deal breakers

2009-09-12 Thread Derek Williams
I am not a fan of buttons in the html that don't do anything if javascript is disabled. To stop them from coming up in a text based browser or something similar, I've always had the rule for myself that any forms or buttons dependent on javascript must be inserted by javascript, and everything

[Lift] Re: Lift deal breakers

2009-09-12 Thread marius d.
On Sep 12, 8:34 am, Indrajit Raychaudhuri indraj...@gmail.com wrote: Even if we assumed that Lift managed to do all the hard work, we still have a contradictory situation: the body/ being completely devoid of scripts but still have 'JS loaded at the end of the page'. It still has to be

[Lift] Re: Lift deal breakers

2009-09-12 Thread Charles F. Munat
I, too, would like to be able to move the liftAjax script call to the bottom of the page. Chas. Dustin Whitney wrote: Hey, I like Lift so in an effort to improve it I am submitting some criticism. Obtrusive javascript: when I create an ajaxButton I get this html: button

[Lift] Re: Lift deal breakers

2009-09-12 Thread Dustin Whitney
One nice thing about jquery's events, if done wisely, is they are applied after the DOM is loaded. With an onclick a button can be clicked and some ajax call is fired that returns and tries to modify a part of the DOM that hasn't been loaded. This is especially true if you have lots of

[Lift] Re: Lift deal breakers

2009-09-12 Thread Kevin Wright
Moving the script import shouldn't be too difficult, we have the lift:tail element and tail merge (which acts exactly the same as head merge) for just this sort of problem. On Sat, Sep 12, 2009 at 8:07 PM, Dustin Whitney dustin.whit...@gmail.comwrote: One nice thing about jquery's events, if

[Lift] Re: Lift deal breakers

2009-09-12 Thread Naftoli Gugenheim
Maybe adding javascript event handlers could be delegated to something that depends on which library is being used? - Kevin Wrightkev.lee.wri...@googlemail.com wrote: Moving the script import shouldn't be too difficult, we have the lift:tail element and tail

[Lift] Re: Lift deal breakers

2009-09-12 Thread marius d.
Technically it could (as I implied above) but this can be lucrative and IMHO the benefits are simply not that big. I'm not saying that things are nailed down but I'd love to see a list of practical benefits for Lift to not add event handlers such as on click to the elements but rather

[Lift] Re: Lift deal breakers

2009-09-11 Thread Andrew Scherpbier
Dustin Whitney wrote: Hey, I like Lift so in an effort to improve it I am submitting some criticism. Obtrusive _javascript_: when I create an ajaxButton I get this html: button onclick="liftAjax.lift_ajaxHandler(quot;F1029758482780OTA=truequot;, null, null, null); return false;"Press