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
> --
> 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.
>
>
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
Cheers, Tim
-------------------------------------
thanks,
- Jon
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...
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
Your proposed solution sounds good though - I agree JsArtifacts is certainly under explored; like a lot of parts of Lift.
Cheers, Tim