[...]
> For example, trying to use
> a SessionVar before the session has been created shouldn't just refuse to be set. It
> would be nice to have an exception reporting the problem.
I think your points are valid to a certain degree, but for this
specific problem there's a solution in LiftRules:
/**
* Should an exception be thrown on out of scope Session and RequestVar
* access. By default, no.
*/
@volatile var throwOnOutOfScopeVarAccess: Boolean = false
/Jeppe
If i could have something to make lift better it would like be a lot more widgets with a lot of ootb functionality. Tables, charts, maps, trees, etc. That know how to sort, filter, hide/show, animate, scale, etc.
:-)
Byron
> I think everybody in here knows why Lift an awesome choice for a web framework. (fast, concise, jvm-based, flexible, scalable)
> In my eyes, I truly do see Lift/Scala being way ahead of its time and revolutionary..
>
> I don't think Lift has too many pitfalls or negatives, but I still would like to know them.
> I am interested in knowing if there are any "cracks" in Lift when developing super highly scalable/dynamic/interactive webapps similar to facebook, youtube,.
>
> The only negatives that I can think of is that Scala needs more adoption.
>
> Thanks
>
>
>
Thanks for the pointer, but I don't think it's working. After messing around with it
in my own project, I did the following:
1. downloaded the examples from https://github.com/lift/lift_23_sbt.git
2. Compiled and ran fine using sbt
3. Added
// Find out if we access SessionVars or RequestVars inappropriately.
LiftRules.throwOnOutOfScopeVarAccess = true
as the last line in Boot.boot
4. Ran again and it threw an exception:
[info] == jetty-run ==
[success] Successful.
[info]
[info] Total time: 2 s, completed Jun 30, 2011 11:48:02 AM
> 11:48:04.848 [1193485506@qtp-1743791445-0] ERROR net.liftweb.http.LiftRules$$anon$1 - Exception being returned to browser when processing /: Message: java.lang.IllegalAccessException: Access to SessionVar outside a request or comet actor scope
net.liftweb.http.SessionVar.findFunc(Vars.scala:71)
net.liftweb.util.AnyVarTrait$$anonfun$is$1.apply(AnyVar.scala:137)
net.liftweb.http.SessionVar.doSync(Vars.scala:125)
net.liftweb.util.AnyVarTrait$class.is(AnyVar.scala:136)
net.liftweb.util.AnyVar.is(AnyVar.scala:89)
net.liftweb.util.AnyVarTrait$class.get(AnyVar.scala:161)
net.liftweb.util.AnyVar.get(AnyVar.scala:89)
net.liftweb.util.StackableMaker$class.find(Maker.scala:150)
net.liftweb.http.Factory$FactoryMaker.find(Factory.scala:37)
net.liftweb.http.Factory$FactoryMaker$$anonfun$make$1.apply(Factory.scala:87)
net.liftweb.http.Factory$FactoryMaker$$anonfun$make$1.apply(Factory.scala:87)
net.liftweb.common.EmptyBox.or(Box.scala:563)
net.liftweb.http.Factory$FactoryMaker.make(Factory.scala:87)
net.liftweb.http.Factory$FactoryMaker.vend(Factory.scala:82)
net.liftweb.http.S$class.statelessInit(S.scala:1186)
net.liftweb.http.LiftServlet.doService(LiftServlet.scala:244)
net.liftweb.http.LiftServlet$$anonfun$doIt$1$1.apply(LiftServlet.scala:122)
net.liftweb.http.LiftServlet$$anonfun$doIt$1$1.apply(LiftServlet.scala:121)
(lots omitted)
--
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.
- All the configuration in Boot.scala (even if it's calls out to other methods) is not optimal... have some more "declarative" or "by convention" configuration would be better. This typically manifests itself in larger projects.
- Lift apps are not modular enough... the Boot.scala issue is one place where this manifests itself, but also in the flat snippet resolution stuff (although the latter is being rectified).
- Lift apps are not composable enough. Snippets are great for allowing the composition of a page, but Screen, Wizard, Comet, and some other parts of Lift lead to monolithic structures.
--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.
- Lift is different than other web frameworks and the learning curve is quite nasty in some cases (the unlearning other paradigm cases.)
On Thu, Jun 30, 2011 at 3:46 PM, Naftoli Gugenheim <nafto...@gmail.com> wrote:
On Thu, Jun 30, 2011 at 12:54 PM, David Pollak <feeder.of...@gmail.com> wrote:
- All the configuration in Boot.scala (even if it's calls out to other methods) is not optimal... have some more "declarative" or "by convention" configuration would be better. This typically manifests itself in larger projects.
- Lift apps are not modular enough... the Boot.scala issue is one place where this manifests itself, but also in the flat snippet resolution stuff (although the latter is being rectified).
- Lift apps are not composable enough. Snippets are great for allowing the composition of a page, but Screen, Wizard, Comet, and some other parts of Lift lead to monolithic structures.
Interested in illustrations of these playing out, and any thoughts on how things could have been done differently and/or can be improved.
Lift could slurp through the classpath and do stuff by convention... I personally despise that kind of solution as it means that if someone includes a JAR in the classpath that contains "stuff" that "stuff" will be part of the app.
In terms of composability... looking at WebSharper and some of the FRP stuff... I think there's a lot to learn (although you've clearly learned some of it with Reactive Web.)
[...]
>> In terms of composability... looking at WebSharper and some of the FRP
>> stuff... I think there's a lot to learn (although you've clearly learned
>> some of it with Reactive Web.)
>>
>
> Looking at http://www.websharper.com/docs/WorkingWithFormlets.aspx, it
> doesn't seem like formlets are about any kind of rocket science (or scalaz
> hierogyphics). I haven't used Screen or Wizard really, so I can't talk much,
> but it seems like it wouldn't be a huge change to make Screen and Wizard
> support what capabilities formlets bring to the table.
I think the Websharper formlets are rather deep. I saw a presentation at
the London Functional Exchange which was rather impressive wrt
composability. A complex form for editing values of type T was easily
composed (without changing the original form) into a form for editing
values of type List[T], complete with Ajax add/delete item, validations
etc.
This could of course be done in Lift as well, but I think? it requires
som redesign of the basic ways of generating forms.
/Jeppe
On Thu, Jun 30, 2011 at 7:04 PM, David Pollak <feeder.of...@gmail.com> wrote:
On Thu, Jun 30, 2011 at 3:46 PM, Naftoli Gugenheim <nafto...@gmail.com> wrote:
On Thu, Jun 30, 2011 at 12:54 PM, David Pollak <feeder.of...@gmail.com> wrote:
- All the configuration in Boot.scala (even if it's calls out to other methods) is not optimal... have some more "declarative" or "by convention" configuration would be better. This typically manifests itself in larger projects.
- Lift apps are not modular enough... the Boot.scala issue is one place where this manifests itself, but also in the flat snippet resolution stuff (although the latter is being rectified).
- Lift apps are not composable enough. Snippets are great for allowing the composition of a page, but Screen, Wizard, Comet, and some other parts of Lift lead to monolithic structures.
Interested in illustrations of these playing out, and any thoughts on how things could have been done differently and/or can be improved.
Lift could slurp through the classpath and do stuff by convention... I personally despise that kind of solution as it means that if someone includes a JAR in the classpath that contains "stuff" that "stuff" will be part of the app.
I don't have such a clear picture of the intention of "by convention" in this context. I was under the impression that frameworks that advertise "convention over configuration" mean, that rather than having to specify every setting, defaults are assumed, and whenever the framework's assumptions aren't what you want, only then do you have to specify them manually. For instance, rather than an ORM requiring annotations on every property indicating how to serialize it, the ORM can figure things out based on its name and type, etc. But in the case of Lift, I think it is already that way --- for instance, all the LiftRules members are set to defaults that are presumed the common usage.
In terms of composability... looking at WebSharper and some of the FRP stuff... I think there's a lot to learn (although you've clearly learned some of it with Reactive Web.)Looking at http://www.websharper.com/docs/WorkingWithFormlets.aspx, it doesn't seem like formlets are about any kind of rocket science (or scalaz hierogyphics). I haven't used Screen or Wizard really, so I can't talk much, but it seems like it wouldn't be a huge change to make Screen and Wizard support what capabilities formlets bring to the table.Since we're on the topic, I may as well give expression to what bothers me about a few things in Lift. It seems that some things have a more closed kind of design, like fixed ADTs, rather than a more extensible approach typical in OOP*. My assumption was that they were done this way for optimization purposes, though I wouldn't know if it was just due to assumed usage. An illustration could be LocParams
and QueryParams --- there's no way to define your own, because the logic is not in the *Param, it's in one central place that pattern matches over them. Like I said, I haven't used Screen or Wizard so I don't know, so I don't know if this applies to them.Not necessarily that big of a deal, just figured I might as well mention it in this thread...
/Jeppe
--
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.
On Thu, Jun 30, 2011 at 10:54 AM, David Pollak <feeder.of...@gmail.com> wrote:
- Lift is different than other web frameworks and the learning curve is quite nasty in some cases (the unlearning other paradigm cases.)
This is not a flaw, to make progress you must be different. In fact this is why I chose Lift for my current project - wanting to avoid MVC, or at least MVC the way it is usually done.
I think the most dangerous Scala feature is overuse of implicit conversions, because of the negative effects on type checking.
Although they don't technically weaken the type system, in practice they do because type checking doesn't just mean that your function call can work on the data type you are passing. Type checking also enforces that the type you were passing was actually the type you thought you were passing, which is equally if not more important. I had an X, but the function wanted a Y, but since the compiler knew how to change an X into a Y it did without me necessarily meaning to do that. (Anyone who has ever had Java code throw a NullPointerException on a line of code that appears to only handle primitives knows what I mean - autoboxing, which is really just a weak form of implicits, applies the conversion transparently, allowing you to forget you're actually dealing with an object reference). In Scala you're less likely to stumble over a null, but you have a much wider variety of types that "almost but not quite" match.
--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.