LiftRules.jQueryVersion ... :(

7 views
Skip to first unread message

Marius

unread,
Feb 23, 2010, 3:11:38 AM2/23/10
to Lift
Guys,

This has been added not so long ago, and I am aware that I should
express my perspective on this back then as now it might be too late.
IMHO LiftRules or other Lift parts except the JsArtifacts and maybe
ResourceServer should not even be aware of the underlying JS framework
thus the JQuery name in LiftRules is very unsound to me.


Here is other proposal of keeping things decoupled:

.
We currently have JQueryArtifacts which holds the JQuery
implementation.

We add in the JsArtifacts this:

trait JsArtifacts {
...
def version
}

then

case class JQueryArtifacts1_3_2 extends JQueryArtifacts {
def version = "1.3.2-min"
}

case class JQueryArtifacts1_4_1 extends JQueryArtifacts {
def version = "1.4.1-min"
}

Then to select one or another we use the existent mechanism:

LiftRules.jsArtifacts = JQueryArtifacts1_3_2 // by default and people
can change this easily


then in ResourceServer we can easily make the version selection.


In this way LiftRules has no idea about JQuery, YUI etc .... and it
doesn't need to. it is only about feeding different implementations of
JsArtifact.

Thoughts?

Br's,
Marius

Jeppe Nejsum Madsen

unread,
Feb 23, 2010, 3:18:30 AM2/23/10
to lif...@googlegroups.com
+1 (and we might as well add 1.4.2 as well/instead :-)

> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>

Marius

unread,
Feb 23, 2010, 3:25:31 AM2/23/10
to Lift
(yeah forgive me :) ...)

Marius

unread,
Feb 23, 2010, 6:00:22 AM2/23/10
to Lift
I opened this ticket: http://www.assembla.com/spaces/liftweb/tickets/363-liftrules-jqueryversion-should-not-be-there-

I realize that this would bring a slight breaking change but I believe
it is worth it.

Folks please speak up if you think otherwise.

Br's,
Marius

Timothy Perrett

unread,
Feb 23, 2010, 6:15:16 AM2/23/10
to lif...@googlegroups.com
No, sounds good Marius... go for it.

Cheers, Tim

Naftoli Gugenheim

unread,
Feb 23, 2010, 10:08:49 AM2/23/10
to lif...@googlegroups.com
You probably mean case object...
Also, personally I prefer the version without the underscores.

-------------------------------------

Jonathan Hoffman

unread,
Feb 23, 2010, 2:48:50 PM2/23/10
to lif...@googlegroups.com
I originally added LiftRules.jQueryVersion, but I agree that this is a much better solution.

thanks,

- Jon

Timothy Perrett

unread,
Feb 23, 2010, 3:04:42 PM2/23/10
to Lift
Jon, did it go through a discussion on the mailing list? I dont
remember seeing it? (and I cant find it in the archives if it was)

Anything like this really needs discussion on the mailing list as its
fundamental to the Lift story and we need to maintain a consistent
API.

Cheers, Tim

On Feb 23, 7:48 pm, Jonathan Hoffman <jonhoff...@gmail.com> wrote:
> I originally added LiftRules.jQueryVersion, but I agree that this is a much better solution.
>
> thanks,
>
> - Jon
> On Feb 23, 2010, at 6:00 AM, Marius wrote:
>
>
>

> > I opened this ticket:http://www.assembla.com/spaces/liftweb/tickets/363-liftrules-jqueryve...

Marius

unread,
Feb 23, 2010, 4:21:14 PM2/23/10
to Lift
Personally I think Jon followed the correct process. I do remember
discussions on this list and on review board. JsArtifacts is somehow
under-explored ... I carry a good part of the "blame" as I should have
pointed the perspective towards JsArtifacts.

Anyways the proposed fix for #363 is on the review board now.
Essentially the JsArtifacts implementation owns the path rewriting
rules now for its own domain.

Br's,
Marius

Timothy Perrett

unread,
Feb 23, 2010, 4:33:53 PM2/23/10
to lif...@googlegroups.com
Fair enough Marius - I just didn't remember seeing it is all and wanted to check we were following the process for all the changes made to Lift. You know im a stickler for process ;-)

Your proposed solution sounds good though - I agree JsArtifacts is certainly under explored; like a lot of parts of Lift.

Cheers, Tim

Reply all
Reply to author
Forward
0 new messages