[Lift] Trouble with MappedTextarea maximum length validation

2009-08-23 Thread Drew Wilder-Goodwin

Hi,

I've created a MappedTextarea field with a maximum length as follows:

class Item extends LongKeyedMapper[WorkUnit] with IdPK {
object description extends MappedTextarea(this,300)
}

MappedTextarea extends MappedString. MappedString puts a maxlength=N
onto the corresponding form text field. MappedTextarea does (for good
reasons), but appears to make no other provision to enforce the max
length.

Furthermore, submitting a form with a value greater in length than the
specified maxLen results in an error (shown at the end of the post).
The problem can also be observed in the lift example on
http://demo.liftweb.net/simple/add if using more than 2048 characters
in the personal essay field.

I'm new to lift, and the only way I could reason to fix the problem is
to override the valMaxLen method:

class Item extends LongKeyedMapper[WorkUnit] with IdPK {
object description extends MappedTextarea(this,300) {
valMaxLen(300, Description must be  300 characters)
_ :: super.validations
}
}

Is this fix actually the proper way to do it? It seems a bit against
DRY to need to explicitly override the valMaxLen method in addition to
specifying the maxLen when defining the field, and ungraceful to cause
an error if the developer does not do this. Is there a better way to
fix the problem? Is this something that should be fixed in the core?

Any advice is appreciated!

Best Regards,
Drew Wilder-Goodwin


Error message when putting more than maxLen characters in a
MappedTextarea field:

Exception occured while processing /
Message: java.sql.SQLException: A truncation error was encountered
trying to shrink VARCHAR 'asdf asdfasdf asdfasdf asdfasdf asdfasdf
asdfasdf asdfasdf a' to length 300.
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException
(Unknown Source)
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException
(Unknown Source)
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException
(Unknown Source)
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement
(Unknown Source)
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate
(Unknown Source)
net.liftweb.mapper.MetaMapper$$anonfun$12.prepStat$1(MetaMapper.scala:
642)
net.liftweb.mapper.MetaMapper$$anonfun$12$$anonfun$19.apply
(MetaMapper.scala:659)
net.liftweb.mapper.MetaMapper$$anonfun$12$$anonfun$19.apply
(MetaMapper.scala:659)
net.liftweb.mapper.DB$$anonfun$prepareStatement$2.apply(DB.scala:292)
net.liftweb.mapper.DB$$anonfun$prepareStatement$2.apply(DB.scala:288)
net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:241)
net.liftweb.util.Helpers$.calcTime(Helpers.scala:29)
net.liftweb.mapper.DB$.prepareStatement(DB.scala:288)
net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:658)
net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:578)
net.liftweb.mapper.DB$.use(DB.scala:305)
net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:577)
com.agileite.app.model.Item$.save(Item.scala:22)
net.liftweb.mapper.Mapper$$anonfun$save$1.apply(Mapper.scala:84)
net.liftweb.mapper.Mapper$$anonfun$save$1.apply(Mapper.scala:84)
net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65)
net.liftweb.mapper.Safe$.runSafe(Safe.scala:44)
net.liftweb.mapper.Mapper$class.runSafe(Mapper.scala:50)
com.agileite.app.model.Item.runSafe(Item.scala:9)
net.liftweb.mapper.Mapper$class.save(Mapper.scala:83)
com.agileite.app.model.Item.save(Item.scala:9)
com.agileite.app.snippet.Item.checkAndSave$1(Item.scala:24)
com.agileite.app.snippet.Item$$anonfun$doBind$1$1.apply(Item.scala:
31)
com.agileite.app.snippet.Item$$anonfun$doBind$1$1.apply(Item.scala:
31)
net.liftweb.http.S$NFuncHolder$$anonfun$apply$46.apply(S.scala:941)
net.liftweb.http.S$NFuncHolder$$anonfun$apply$46.apply(S.scala:941)
scala.List.map(List.scala:805)
net.liftweb.http.S$NFuncHolder.apply(S.scala:941)
net.liftweb.http.LiftSession$$anonfun$buildFunc$1$2.apply
(LiftSession.scala:307)
net.liftweb.http.LiftSession$$anonfun$5$$anonfun$apply$19.apply
(LiftSession.scala:322)
net.liftweb.http.LiftSession$$anonfun$5$$anonfun$apply$19.apply
(LiftSession.scala:322)
scala.List.map(List.scala:805)
net.liftweb.http.LiftSession$$anonfun$5.apply(LiftSession.scala:322)
net.liftweb.http.LiftSession$$anonfun$5.apply(LiftSession.scala:311)
scala.List.flatMap(List.scala:1125)
  

[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread marius d.

Changed the thread subject ...

Marius

On Aug 22, 6:17 pm, marius d. marius.dan...@gmail.com wrote:
 Great thing Dave.

 Roughly having a bound function f that user provided say in an
 ajaxButton call.The function f may hold references to other functions,
 session/request-vars,  references to the snippets instances etc. One
 condition is that every object in the graph should be serializable and
 that is beyond our control (but more on the programmer's control). Of
 course for the function f to be correctly applied on any node, the
 whole object graph should be replicated among cluster nodes).

 Now assuming that we can serialize any function/object on the wire
 there is still one thing to solve.  As you know LiftSession and
 HTTPSession are not the same things. a LiftSession is linked to a
 HTTPSession so we'd probably need to replicate both? Systems like stax
 have their own way to make a HTTPSession available to any cluster node
 AFAIK by saving it into a database. Into such environments I'm not
 such if we know the actual machines identity andif we would have built
 our own replication system in a clustered env. that would probably not
 work ... so a node to node replication system may not be possible in
 stax like environments but would certainly work on other models. Still
 persisting a LiftSession in DB shoud and sounds like it is more
 environment agnostic.

 In a glance node-to-node session replication sounds to be a little
 more efficient  that DB session store we should probably keep an eye
 on both models. Other model that could be to lazily replicate sessions
 across cluster nodes such as:

 1. Upon a request Node A advertises to other nodes that it hods the
 last state for session X
 2. Upon a subsequent call that hits node B it won;t have the session
 but it would know where the session exist a fetch the state from that
 node
 3. Node Node B advertises that it has the last state for session X

 ... Such model is not very fail over proof as at a given point in time
 different versions of the session state which may or may not enough.

 The most consistent model seems to be to store the session context
 into a centralized session store ... but that would induce a single
 point of failure unless the session store itself is redundant.

 Last but not the least Java serialization is sub-optimal but I'm not
 sure how many alternatives we'd have in order to make sure that we
 have a consistent reference graph that can be represented on the
 wire..

 Br's,
 Marius

 On Aug 22, 5:25 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:

  On Sat, Aug 22, 2009 at 2:31 AM, marius d. marius.dan...@gmail.com wrote:

   Greg/Viktor,

   We could meet and discuss using whatever means (skype, chat, mail
   etc.) and brainstorm what can we do about this. Even though I like a
   lot sticky sessions idiom it is not enough and I think we do have a
   consensus here :) ... of course any committer is more then welcome to
   participate.

  On the substance point (I've moved this to the Lift list), we may want to
  use some aspecty thing to analyze the potential serializability of functions
  that are added to the LiftSession.  I'm betting there's no actual barrier to
  serializing stuff in the normal case except when things refer to the
  HttpServletRequest (which refers to input/output streams).  If we could get
  an actual analysis, we could develop a better serialization/session moving
  strategy.

   Br's,
   Marius

   On Aug 22, 12:15 am, Viktor Klang wrote:
On Fri, Aug 21, 2009 at 11:12 PM, Meredith Gregory

 wrote:
 Marius,

    i really do want to go over lift's ability to
 work in vendor supplied clustering solutions.

We could do a Skype conf when you're feeling better, Greg.

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Problem building my app in Windows

2009-08-23 Thread Timothy Perrett

Have you tried using the windows installer?

Cheers, Tim

On Aug 23, 6:08 am, DFectuoso santiago1...@gmail.com wrote:
 Hi, i have been working in linux and mac and having a wonderful time
 with mvn and everything lift's got to offer =). Sadly i want to teach
 lift to a person who uses Windows as he's only OS, so i am trying to
 configure hes computer, neither him or me are experts on this OS.

 I installed java 1.6 and ran into some problems, so i downloaded
 1.5_20 and now i have java and maven working, but while trying to
 compile a very simple file i get the an error(posted at the end of
 this post); and i'm wondering if theres anything i need to know, seems
 like it could be some permisions or something like that.

 Any ideas? People running on windows how did you configure you box?

 Thanks,

 The error:

 [INFO] Trace
 org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get
 dependency
  information: Unable to read the metadata file for artifact
 'net.liftweb:lift-co
 re:jar': Error getting POM for 'net.liftweb:lift-core' from the
 repository: Unab
 le to store local copy of metadata: Error updating group repository
 metadata
   net.liftweb:lift-core:pom:1.1-SNAPSHOT

  for project net.liftweb:lift-core
   net.liftweb:lift-core:jar:1.1-SNAPSHOT

 from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   scala-tools.org (http://scala-tools.org/repo-releases),
   scala-tools.org.snapshots (http://scala-tools.org/repo-snapshots),
  http://www.lag.net/repo/(http://www.lag.net/repo/)
 Path to dependency:
         1) net.twitknow:4Disc:war:0.1

         at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
 ultLifecycleExecutor.java:575)
         at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
 fecycle(DefaultLifecycleExecutor.java:499)
         at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
 ltLifecycleExecutor.java:478)
         at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
 dleFailures(DefaultLifecycleExecutor.java:330)
         at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
 ts(DefaultLifecycleExecutor.java:291)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
 (DefaultLi
 fecycleExecutor.java:142)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
 336)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
 129)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.
 java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAcces
 sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:592)
         at org.codehaus.classworlds.Launcher.launchEnhanced
 (Launcher.java:315)
         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
         at org.codehaus.classworlds.Launcher.mainWithExitCode
 (Launcher.java:430)

         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by:
 org.apache.maven.artifact.resolver.ArtifactResolutionException: Unabl
 e to get dependency information: Unable to read the metadata file for
 artifact '
 net.liftweb:lift-core:jar': Error getting POM for 'net.liftweb:lift-
 core' from t
 he repository: Unable to store local copy of metadata: Error updating
 group repo
 sitory metadata
   net.liftweb:lift-core:pom:1.1-SNAPSHOT

  for project net.liftweb:lift-core
   net.liftweb:lift-core:jar:1.1-SNAPSHOT

 from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   scala-tools.org (http://scala-tools.org/repo-releases),
   scala-tools.org.snapshots (http://scala-tools.org/repo-snapshots),
  http://www.lag.net/repo/(http://www.lag.net/repo/)
 Path to dependency:
         1) net.twitknow:4Disc:war:0.1

         at
 org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
 efaultArtifactCollector.java:403)
         at
 org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(D
 efaultArtifactCollector.java:76)
         at
 org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
 nsitively(DefaultArtifactResolver.java:300)
         at
 org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
 nsitively(DefaultArtifactResolver.java:288)
         at
 org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDepende
 ncies(DefaultPluginManager.java:1415)
         at org.apache.maven.plugin.DefaultPluginManager.executeMojo
 (DefaultPlugi
 nManager.java:405)
         at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
 ultLifecycleExecutor.java:558)
         ... 16 more
 Caused by:
 org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
 : Unable to read the metadata file for artifact 'net.liftweb:lift-
 

[Lift] Re: alternate webroot using Boot?

2009-08-23 Thread Timothy Perrett

Personally id do something a little more complex than have a sink url
like /content/  :-)

Cant you just write a regex to match various types of static content
so its transparently served by NGINX irrespective of resource path? Of
course, there are a few exceptions like liftAjax.js, but for the most
part it seems like it would be fairly trivial to configure

Cheers, Tim

On Aug 23, 5:29 am, Grant Wood smackt...@gmail.com wrote:
 Thanks David,

  I think your best bet is to serve your static content via a front-end web
  server (I use Nginx) and route all the app-related requests to your
  container.

 I was trying to avoid that for this project. Back to using /content/
 for everything static.  Nginx is a great suggestion for this, thanks!

 -Grant

 On Aug 22, 8:48 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:



  On Sat, Aug 22, 2009 at 4:51 PM, Grant Wood smackt...@gmail.com wrote:

   How can I tell a Lift app to use an alternate webroot (holding all my
   html, static templates, images, etc)?  Essentially, I want my
   application to look in a folder of my choosing for content, rather
   than in the webapp directory as it does by default.

   I can't be the only person who has to manage/deploy content in a
   separate process and system than the application,

  I think you're the first person that has asked for this.

   so there is likely a
   simple LiftRule I can override in Boot.scala to use content in a
   location other than the war.

  I think this might be impossible (or at least very, very difficult.)
   Mapping from resources contained in the WAR file into the application space
  is not defined by any spec that I know of and varies on a container by
  container basis.

  I think your best bet is to serve your static content via a front-end web
  server (I use Nginx) and route all the app-related requests to your
  container.

   However, digging through the
   documentation, discussions, and code (LiftServlet, LiftRules, etc.) I
   don't see an obvious entry point.

   Thank you for your help!

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Structuring Web Application

2009-08-23 Thread Timothy Perrett

Can you please be more specific about your app tier that you wish to
access - im unfortunately not seeing what hurdle stops you from
accessing it just as you would from Java?

Cheers, Tim

On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:
 Hello Lift Community,

 I want to implement a new Project in Scala with Lift. I am new to
 Scala/Lift.
 Scala looks great and it expanded my horizon. FP is a new concept to
 me.

 My background is Java and a little bit of Spring. I read three Scala
 books
 and a lot on blogs. But there is a missing part for me on how to
 combine
 my classes. I read the Scalable Components Paper and I dont get it
 100%.
 I need a little bit more input on structuring a web app and I hope to
 get the 100%
 with you guys.
 With Spring you let the container manage the classes. ok.
 I think my problem is, I dont know how you structured a web app in
 days
 without Spring.

 I would like to have Lift access my domain logic over an application
 layer (Domain
 Driven Design).
 In Wicket I would have my SpringBean annotation.

 So I hope to understand, how
 - can I access my app layer?
 - how could I organize my domain logic. I want to use DDD. I know I
 have to use
 object and class in a bigger sense...?

 I hope you guys can give me some hints.

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



[Lift] Re: Include build # in LiftVersion?

2009-08-23 Thread Timothy Perrett

Indrajit,

We actually discussed this a while back for the installers, and the
long term plan is still that we do something like this to speed the
getting started process if you know of any generation plugins that
could potentially serve as a starting point that would be great!

This stuff is certainly on the radar, but as always its a case of time
and resources :-)

Cheers, Tim

On Aug 22, 2:48 pm, Indrajit Raychaudhuri indraj...@gmail.com wrote:
 Indeed, looking out in the maven land for a way out would be useful.
 Meanwhile, there is an issue request for buildnumber plugin to support
 GIT:http://jira.codehaus.org/browse/MOJO-1199.

 However, Maven plugin for lift activities (creating boilerplate codes
 - like model, snippet etc.) could be interesting.

 /Indrajit

 On Aug 21, 11:51 pm, Timothy Perrett timo...@getintheloop.eu wrote:



  Perhaps its worth going to market (as it were) to check that there is either
  no single solution, nor a number of other solutions (mojos) that we could
  string together to get what we want? Im not sure that the effort involved in
  making our own is warranted given the output...

  Perhaps someone in the wider java/maven land has some existing effort in a
  repo someplace...

  Cheers, Tim

  On 21/08/2009 17:53, David Pollak feeder.of.the.be...@gmail.com wrote:

   Gaacckkk... that's the first thought that comes to mind... ;-)

   Looks like our choices are:
   - Write our own Maven plugin and/or update the BuildNumber plugin
   - Avoid the feature

   We actually have the build time already in the manifest.  I'd love to get 
   the
   repo and the fingerprint in there as well.
    
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread Kevin Wright
I'm wondering if we can't leverage JavaSpaces to handle a lot of this stuff.
 From my experience with the technology it seems to be a pretty good fit for
the problem.


On Sun, Aug 23, 2009 at 11:06 AM, marius d. marius.dan...@gmail.com wrote:


 Changed the thread subject ...

 Marius

 On Aug 22, 6:17 pm, marius d. marius.dan...@gmail.com wrote:
  Great thing Dave.
 
  Roughly having a bound function f that user provided say in an
  ajaxButton call.The function f may hold references to other functions,
  session/request-vars,  references to the snippets instances etc. One
  condition is that every object in the graph should be serializable and
  that is beyond our control (but more on the programmer's control). Of
  course for the function f to be correctly applied on any node, the
  whole object graph should be replicated among cluster nodes).
 
  Now assuming that we can serialize any function/object on the wire
  there is still one thing to solve.  As you know LiftSession and
  HTTPSession are not the same things. a LiftSession is linked to a
  HTTPSession so we'd probably need to replicate both? Systems like stax
  have their own way to make a HTTPSession available to any cluster node
  AFAIK by saving it into a database. Into such environments I'm not
  such if we know the actual machines identity andif we would have built
  our own replication system in a clustered env. that would probably not
  work ... so a node to node replication system may not be possible in
  stax like environments but would certainly work on other models. Still
  persisting a LiftSession in DB shoud and sounds like it is more
  environment agnostic.
 
  In a glance node-to-node session replication sounds to be a little
  more efficient  that DB session store we should probably keep an eye
  on both models. Other model that could be to lazily replicate sessions
  across cluster nodes such as:
 
  1. Upon a request Node A advertises to other nodes that it hods the
  last state for session X
  2. Upon a subsequent call that hits node B it won;t have the session
  but it would know where the session exist a fetch the state from that
  node
  3. Node Node B advertises that it has the last state for session X
 
  ... Such model is not very fail over proof as at a given point in time
  different versions of the session state which may or may not enough.
 
  The most consistent model seems to be to store the session context
  into a centralized session store ... but that would induce a single
  point of failure unless the session store itself is redundant.
 
  Last but not the least Java serialization is sub-optimal but I'm not
  sure how many alternatives we'd have in order to make sure that we
  have a consistent reference graph that can be represented on the
  wire..
 
  Br's,
  Marius
 
  On Aug 22, 5:25 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
 
   On Sat, Aug 22, 2009 at 2:31 AM, marius d. marius.dan...@gmail.com
 wrote:
 
Greg/Viktor,
 
We could meet and discuss using whatever means (skype, chat, mail
etc.) and brainstorm what can we do about this. Even though I like a
lot sticky sessions idiom it is not enough and I think we do have a
consensus here :) ... of course any committer is more then welcome to
participate.
 
   On the substance point (I've moved this to the Lift list), we may want
 to
   use some aspecty thing to analyze the potential serializability of
 functions
   that are added to the LiftSession.  I'm betting there's no actual
 barrier to
   serializing stuff in the normal case except when things refer to the
   HttpServletRequest (which refers to input/output streams).  If we could
 get
   an actual analysis, we could develop a better serialization/session
 moving
   strategy.
 
Br's,
Marius
 
On Aug 22, 12:15 am, Viktor Klang wrote:
 On Fri, Aug 21, 2009 at 11:12 PM, Meredith Gregory
 
  wrote:
  Marius,
 
 i really do want to go over lift's ability to
  work in vendor supplied clustering solutions.
 
 We could do a Skype conf when you're feeling better, Greg.
 
   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Git some:http://github.com/dpp
 


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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread marius d.

I've been playing with JINI a few years ago a liked it a lot (not a
simple programming model, but JavaSpace reduces a lot of such
complexity) but I'm not sure how fitful it really is in stax like
environments where broadcast UDP may not be supported so discovery
service would be more difficult.

Br's,
Marius

On Aug 23, 2:50 pm, Kevin Wright kev.lee.wri...@googlemail.com
wrote:
 I'm wondering if we can't leverage JavaSpaces to handle a lot of this stuff.
  From my experience with the technology it seems to be a pretty good fit for
 the problem.

 On Sun, Aug 23, 2009 at 11:06 AM, marius d. marius.dan...@gmail.com wrote:

  Changed the thread subject ...

  Marius

  On Aug 22, 6:17 pm, marius d. marius.dan...@gmail.com wrote:
   Great thing Dave.

   Roughly having a bound function f that user provided say in an
   ajaxButton call.The function f may hold references to other functions,
   session/request-vars,  references to the snippets instances etc. One
   condition is that every object in the graph should be serializable and
   that is beyond our control (but more on the programmer's control). Of
   course for the function f to be correctly applied on any node, the
   whole object graph should be replicated among cluster nodes).

   Now assuming that we can serialize any function/object on the wire
   there is still one thing to solve.  As you know LiftSession and
   HTTPSession are not the same things. a LiftSession is linked to a
   HTTPSession so we'd probably need to replicate both? Systems like stax
   have their own way to make a HTTPSession available to any cluster node
   AFAIK by saving it into a database. Into such environments I'm not
   such if we know the actual machines identity andif we would have built
   our own replication system in a clustered env. that would probably not
   work ... so a node to node replication system may not be possible in
   stax like environments but would certainly work on other models. Still
   persisting a LiftSession in DB shoud and sounds like it is more
   environment agnostic.

   In a glance node-to-node session replication sounds to be a little
   more efficient  that DB session store we should probably keep an eye
   on both models. Other model that could be to lazily replicate sessions
   across cluster nodes such as:

   1. Upon a request Node A advertises to other nodes that it hods the
   last state for session X
   2. Upon a subsequent call that hits node B it won;t have the session
   but it would know where the session exist a fetch the state from that
   node
   3. Node Node B advertises that it has the last state for session X

   ... Such model is not very fail over proof as at a given point in time
   different versions of the session state which may or may not enough.

   The most consistent model seems to be to store the session context
   into a centralized session store ... but that would induce a single
   point of failure unless the session store itself is redundant.

   Last but not the least Java serialization is sub-optimal but I'm not
   sure how many alternatives we'd have in order to make sure that we
   have a consistent reference graph that can be represented on the
   wire..

   Br's,
   Marius

   On Aug 22, 5:25 pm, David Pollak feeder.of.the.be...@gmail.com
   wrote:

On Sat, Aug 22, 2009 at 2:31 AM, marius d. marius.dan...@gmail.com
  wrote:

 Greg/Viktor,

 We could meet and discuss using whatever means (skype, chat, mail
 etc.) and brainstorm what can we do about this. Even though I like a
 lot sticky sessions idiom it is not enough and I think we do have a
 consensus here :) ... of course any committer is more then welcome to
 participate.

On the substance point (I've moved this to the Lift list), we may want
  to
use some aspecty thing to analyze the potential serializability of
  functions
that are added to the LiftSession.  I'm betting there's no actual
  barrier to
serializing stuff in the normal case except when things refer to the
HttpServletRequest (which refers to input/output streams).  If we could
  get
an actual analysis, we could develop a better serialization/session
  moving
strategy.

 Br's,
 Marius

 On Aug 22, 12:15 am, Viktor Klang wrote:
  On Fri, Aug 21, 2009 at 11:12 PM, Meredith Gregory

   wrote:
   Marius,

  i really do want to go over lift's ability to
   work in vendor supplied clustering solutions.

  We could do a Skype conf when you're feeling better, Greg.

--
Lift, the simply functional web frameworkhttp://liftweb.net
Beginning Scalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send 

[Lift] Re: Structuring Web Application

2009-08-23 Thread greekscala

Hello Timothy,

thank you.
I know that I do not need Spring for Scala.
I dont expressed it well. How do I glue my app parts
together. And how do I glue the lift part with a facade or
application service of my domain layer.

Thanks for your help


On 23 Aug., 13:12, Timothy Perrett timo...@getintheloop.eu wrote:
 Can you please be more specific about your app tier that you wish to
 access - im unfortunately not seeing what hurdle stops you from
 accessing it just as you would from Java?

 Cheers, Tim

 On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:

  Hello Lift Community,

  I want to implement a new Project in Scala with Lift. I am new to
  Scala/Lift.
  Scala looks great and it expanded my horizon. FP is a new concept to
  me.

  My background is Java and a little bit of Spring. I read three Scala
  books
  and a lot on blogs. But there is a missing part for me on how to
  combine
  my classes. I read the Scalable Components Paper and I dont get it
  100%.
  I need a little bit more input on structuring a web app and I hope to
  get the 100%
  with you guys.
  With Spring you let the container manage the classes. ok.
  I think my problem is, I dont know how you structured a web app in
  days
  without Spring.

  I would like to have Lift access my domain logic over an application
  layer (Domain
  Driven Design).
  In Wicket I would have my SpringBean annotation.

  So I hope to understand, how
  - can I access my app layer?
  - how could I organize my domain logic. I want to use DDD. I know I
  have to use
  object and class in a bigger sense...?

  I hope you guys can give me some hints.

  Thanks a lot

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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread Kevin Wright
I guess JGroups is another alternative here, it's a bit lower level, but
does let you set up nodes manually - so it's not an issue that you need UDP
broadcast (although it helps...)

On Sun, Aug 23, 2009 at 1:09 PM, marius d. marius.dan...@gmail.com wrote:


 I've been playing with JINI a few years ago a liked it a lot (not a
 simple programming model, but JavaSpace reduces a lot of such
 complexity) but I'm not sure how fitful it really is in stax like
 environments where broadcast UDP may not be supported so discovery
 service would be more difficult.

 Br's,
 Marius

 On Aug 23, 2:50 pm, Kevin Wright kev.lee.wri...@googlemail.com
 wrote:
  I'm wondering if we can't leverage JavaSpaces to handle a lot of this
 stuff.
   From my experience with the technology it seems to be a pretty good fit
 for
  the problem.
 
  On Sun, Aug 23, 2009 at 11:06 AM, marius d. marius.dan...@gmail.com
 wrote:
 
   Changed the thread subject ...
 
   Marius
 
   On Aug 22, 6:17 pm, marius d. marius.dan...@gmail.com wrote:
Great thing Dave.
 
Roughly having a bound function f that user provided say in an
ajaxButton call.The function f may hold references to other
 functions,
session/request-vars,  references to the snippets instances etc. One
condition is that every object in the graph should be serializable
 and
that is beyond our control (but more on the programmer's control). Of
course for the function f to be correctly applied on any node, the
whole object graph should be replicated among cluster nodes).
 
Now assuming that we can serialize any function/object on the wire
there is still one thing to solve.  As you know LiftSession and
HTTPSession are not the same things. a LiftSession is linked to a
HTTPSession so we'd probably need to replicate both? Systems like
 stax
have their own way to make a HTTPSession available to any cluster
 node
AFAIK by saving it into a database. Into such environments I'm not
such if we know the actual machines identity andif we would have
 built
our own replication system in a clustered env. that would probably
 not
work ... so a node to node replication system may not be possible in
stax like environments but would certainly work on other models.
 Still
persisting a LiftSession in DB shoud and sounds like it is more
environment agnostic.
 
In a glance node-to-node session replication sounds to be a little
more efficient  that DB session store we should probably keep an eye
on both models. Other model that could be to lazily replicate
 sessions
across cluster nodes such as:
 
1. Upon a request Node A advertises to other nodes that it hods the
last state for session X
2. Upon a subsequent call that hits node B it won;t have the session
but it would know where the session exist a fetch the state from that
node
3. Node Node B advertises that it has the last state for session X
 
... Such model is not very fail over proof as at a given point in
 time
different versions of the session state which may or may not enough.
 
The most consistent model seems to be to store the session context
into a centralized session store ... but that would induce a single
point of failure unless the session store itself is redundant.
 
Last but not the least Java serialization is sub-optimal but I'm not
sure how many alternatives we'd have in order to make sure that we
have a consistent reference graph that can be represented on the
wire..
 
Br's,
Marius
 
On Aug 22, 5:25 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 
 On Sat, Aug 22, 2009 at 2:31 AM, marius d. 
 marius.dan...@gmail.com
   wrote:
 
  Greg/Viktor,
 
  We could meet and discuss using whatever means (skype, chat, mail
  etc.) and brainstorm what can we do about this. Even though I
 like a
  lot sticky sessions idiom it is not enough and I think we do have
 a
  consensus here :) ... of course any committer is more then
 welcome to
  participate.
 
 On the substance point (I've moved this to the Lift list), we may
 want
   to
 use some aspecty thing to analyze the potential serializability of
   functions
 that are added to the LiftSession.  I'm betting there's no actual
   barrier to
 serializing stuff in the normal case except when things refer to
 the
 HttpServletRequest (which refers to input/output streams).  If we
 could
   get
 an actual analysis, we could develop a better serialization/session
   moving
 strategy.
 
  Br's,
  Marius
 
  On Aug 22, 12:15 am, Viktor Klang wrote:
   On Fri, Aug 21, 2009 at 11:12 PM, Meredith Gregory
 
wrote:
Marius,
 
   i really do want to go over lift's ability to
work in vendor supplied clustering solutions.
 
   We could do a Skype conf when you're feeling better, Greg.
 
 --
 Lift, the simply functional web 

[Lift] Re: lift:with-params deprecation alternatives

2009-08-23 Thread _rogerio_

I tried to find some info about the correct usage of template related
tags on wiki but I couldn't find the most recent information about it.
I'm starting with Lift and I couldn't find all information that I want
on wiki pages, is there any chance to update the wiki with some info
about these renamed tags?

On 20 ago, 14:18, inca incarn...@whiteants.net wrote:
 The neat thing about the insert is that it is consistent with other
 templating frameworks (Tiles [http://struts.apache.org/1.x/struts-
 tiles/tlddoc/tiles/insert.html], Facelets [http://www.roseindia.net/
 jsf/insert.shtml], etc.), so it would be easy for folks like me to
 migrate to Lift. I don't think that lift:bind-at is a good
 replacement: it looks very similar to lift:bind when browsing the
 code (I've just tested this, not very eye-catching difference).
 And if you really like minimal typing, call it lift:put at= (it is
 one letter smaller than lift:at name=) :) And yes, it's naming
 policy is still consistent with other tags (verbs as tag names and
 pronouns as attributes).

 About the built-in snippet aliases... I don't see anything wrong
 there. Just let them have custom xml prefixes, and it would be
 perfectly clear that it is an alias. I, personally, think that xml
 prefixes are great. Say I have a snippet like this:

 class HtmlUI {

   def wrapper(in:NodeSeq):NodeSeq =
     div class=w
     div class=e
     div class=c{in}
     /div
     /div
     /div

   def button(in:NodeSeq):NodeSeq =
     a class=button
        style={background:transparent url('/img/buttons/bkg- + S.attr
 (bkg).openOr(green) + .png') no-repeat}
        title={S.attr(title).openOr()}
        href={S.attr(href).openOr(#)}
       img src={/img/buttons/ + S.attr(icon).openOr() + .png}
 alt=/
       div class=gloss/
     /a

    ...etc...

 }

 So every time I need a wrapper or a glossy button I would write
 lift:HtmlUI.wrapper ... or lift:HtmlUI.button 
 Now if I had a chance to create xhtml prefix alias for this snippet
 (something like that:
   LiftRules.addSnippetMapping(ui - HtmlUI)
 ), than my xhtml templates would reduce a lot (ui:wrapper ... and
 ui:button ...) along with increased readability.

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



[Lift] Lift vs Rails

2009-08-23 Thread jack

I am doing a startup company that involves both a lot of processing on
the backend (in the code) and a decent amount of comet/ajax in the
frontend.It is very important that the code quickly  on the server.  I
have seen the light with respect to Scala and Lift looks terrific. My
only concern is how new it is and the availability of resources
(programmers, books etc).

I really do want to use Lift instead of Rails. Could somebody please
convince me? :)

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



[Lift] Re: lift:with-params deprecation alternatives

2009-08-23 Thread marius d.

Currently both with-param and bind-at are supported. I'll try to
update the wiki.

Br's,
Marius

On Aug 23, 5:28 pm, _rogerio_ rogerio.ara...@gmail.com wrote:
 I tried to find some info about the correct usage of template related
 tags on wiki but I couldn't find the most recent information about it.
 I'm starting with Lift and I couldn't find all information that I want
 on wiki pages, is there any chance to update the wiki with some info
 about these renamed tags?

 On 20 ago, 14:18, inca incarn...@whiteants.net wrote:

  The neat thing about the insert is that it is consistent with other
  templating frameworks (Tiles [http://struts.apache.org/1.x/struts-
  tiles/tlddoc/tiles/insert.html], Facelets [http://www.roseindia.net/
  jsf/insert.shtml], etc.), so it would be easy for folks like me to
  migrate to Lift. I don't think that lift:bind-at is a good
  replacement: it looks very similar to lift:bind when browsing the
  code (I've just tested this, not very eye-catching difference).
  And if you really like minimal typing, call it lift:put at= (it is
  one letter smaller than lift:at name=) :) And yes, it's naming
  policy is still consistent with other tags (verbs as tag names and
  pronouns as attributes).

  About the built-in snippet aliases... I don't see anything wrong
  there. Just let them have custom xml prefixes, and it would be
  perfectly clear that it is an alias. I, personally, think that xml
  prefixes are great. Say I have a snippet like this:

  class HtmlUI {

    def wrapper(in:NodeSeq):NodeSeq =
      div class=w
      div class=e
      div class=c{in}
      /div
      /div
      /div

    def button(in:NodeSeq):NodeSeq =
      a class=button
         style={background:transparent url('/img/buttons/bkg- + S.attr
  (bkg).openOr(green) + .png') no-repeat}
         title={S.attr(title).openOr()}
         href={S.attr(href).openOr(#)}
        img src={/img/buttons/ + S.attr(icon).openOr() + .png}
  alt=/
        div class=gloss/
      /a

     ...etc...

  }

  So every time I need a wrapper or a glossy button I would write
  lift:HtmlUI.wrapper ... or lift:HtmlUI.button 
  Now if I had a chance to create xhtml prefix alias for this snippet
  (something like that:
    LiftRules.addSnippetMapping(ui - HtmlUI)
  ), than my xhtml templates would reduce a lot (ui:wrapper ... and
  ui:button ...) along with increased readability.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift vs Rails

2009-08-23 Thread Derek Williams
On Sun, Aug 23, 2009 at 8:45 AM, jack jack.wid...@gmail.com wrote:

 I really do want to use Lift instead of Rails. Could somebody please
 convince me? :)


I used to struggle with Rails (and to a lesser extent Merb) because it was
difficult to do things that weren't the Rails Way. Lift does have a
recommended way of doing things as well but I haven't yet run into issues
where I had to fight the framework in order to do things my way. This aspect
along with the performance and ease of use makes it my preferred framework
by far.

If you are not doing the coding yourself, finding a programmer might be an
issue as experienced Scala developers (not to mention Lift developers) are
probably much harder to find then Ruby and Rails developers.

As far as existing libraries, being able to use any Java library is a big
plus. It can sometimes be hard to find a good (or maintained) ruby library
in order to use an existing binary (C/C++) library.

The only thing at the moment that I would like to be better is Text
Editor/IDE support. I don't find this to be too bad of a problem though as I
spent all of my Ruby development struggling with the same things. I ended up
using Vim for ruby development, and have now turned to Emacs for Scala
development. For learning Scala I used Eclipse as it did a good job of
giving me documentation for Classes/Methods. After a couple of months of
coding I only have to reference the scaladocs once in a while as I find the
language to be very natural. But these are issues that you will run into
with Ruby development too, as getting good IDE support for a dynamic
language can be even more difficult.

I'd recommend Lift for your project, especially considering you want to use
plenty of Ajax/Comet. I never even considered using Comet in a web project
of mine until I started using Lift. The only case where I might recommend
Rails is if you are not a decent coder yourself and you aren't able to find
a good Lift developer to work with.

Hope this helps

-- 
Derek Williams

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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread David Pollak
On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright kev.lee.wri...@googlemail.com
 wrote:

 I'm wondering if we can't leverage JavaSpaces to handle a lot of this
 stuff.  From my experience with the technology it seems to be a pretty good
 fit for the problem.


Two reasons:

- JavaSpaces is as far as I know, GPL and we will not mix any GPL into Lift
- It doesn't solve the issue with low-level session replication which relies
on serialization of the session data for transfer to another app server
instance.





 On Sun, Aug 23, 2009 at 11:06 AM, marius d. marius.dan...@gmail.comwrote:


 Changed the thread subject ...

 Marius

 On Aug 22, 6:17 pm, marius d. marius.dan...@gmail.com wrote:
  Great thing Dave.
 
  Roughly having a bound function f that user provided say in an
  ajaxButton call.The function f may hold references to other functions,
  session/request-vars,  references to the snippets instances etc. One
  condition is that every object in the graph should be serializable and
  that is beyond our control (but more on the programmer's control). Of
  course for the function f to be correctly applied on any node, the
  whole object graph should be replicated among cluster nodes).
 
  Now assuming that we can serialize any function/object on the wire
  there is still one thing to solve.  As you know LiftSession and
  HTTPSession are not the same things. a LiftSession is linked to a
  HTTPSession so we'd probably need to replicate both? Systems like stax
  have their own way to make a HTTPSession available to any cluster node
  AFAIK by saving it into a database. Into such environments I'm not
  such if we know the actual machines identity andif we would have built
  our own replication system in a clustered env. that would probably not
  work ... so a node to node replication system may not be possible in
  stax like environments but would certainly work on other models. Still
  persisting a LiftSession in DB shoud and sounds like it is more
  environment agnostic.
 
  In a glance node-to-node session replication sounds to be a little
  more efficient  that DB session store we should probably keep an eye
  on both models. Other model that could be to lazily replicate sessions
  across cluster nodes such as:
 
  1. Upon a request Node A advertises to other nodes that it hods the
  last state for session X
  2. Upon a subsequent call that hits node B it won;t have the session
  but it would know where the session exist a fetch the state from that
  node
  3. Node Node B advertises that it has the last state for session X
 
  ... Such model is not very fail over proof as at a given point in time
  different versions of the session state which may or may not enough.
 
  The most consistent model seems to be to store the session context
  into a centralized session store ... but that would induce a single
  point of failure unless the session store itself is redundant.
 
  Last but not the least Java serialization is sub-optimal but I'm not
  sure how many alternatives we'd have in order to make sure that we
  have a consistent reference graph that can be represented on the
  wire..
 
  Br's,
  Marius
 
  On Aug 22, 5:25 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
 
   On Sat, Aug 22, 2009 at 2:31 AM, marius d. marius.dan...@gmail.com
 wrote:
 
Greg/Viktor,
 
We could meet and discuss using whatever means (skype, chat, mail
etc.) and brainstorm what can we do about this. Even though I like a
lot sticky sessions idiom it is not enough and I think we do have a
consensus here :) ... of course any committer is more then welcome
 to
participate.
 
   On the substance point (I've moved this to the Lift list), we may want
 to
   use some aspecty thing to analyze the potential serializability of
 functions
   that are added to the LiftSession.  I'm betting there's no actual
 barrier to
   serializing stuff in the normal case except when things refer to the
   HttpServletRequest (which refers to input/output streams).  If we
 could get
   an actual analysis, we could develop a better serialization/session
 moving
   strategy.
 
Br's,
Marius
 
On Aug 22, 12:15 am, Viktor Klang wrote:
 On Fri, Aug 21, 2009 at 11:12 PM, Meredith Gregory
 
  wrote:
  Marius,
 
 i really do want to go over lift's ability to
  work in vendor supplied clustering solutions.
 
 We could do a Skype conf when you're feeling better, Greg.
 
   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Git some:http://github.com/dpp



 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To 

[Lift] Re: Lift vs Rails

2009-08-23 Thread marius d.

Looks like you don't need to be convinced :) ... Scala with its
features + Java compatibility + Lift's rich set of features  +
performance of Scala  Lift makes it a no brainer. Enumerating all the
pros of Scala and Lift would just take way to long.


The list of Scala books and the Lift book are enlisted here
http://www.scala-lang.org/node/959

Br's,
Marius

On Aug 23, 5:45 pm, jack jack.wid...@gmail.com wrote:
 I am doing a startup company that involves both a lot of processing on
 the backend (in the code) and a decent amount of comet/ajax in the
 frontend.It is very important that the code quickly  on the server.  I
 have seen the light with respect to Scala and Lift looks terrific. My
 only concern is how new it is and the availability of resources
 (programmers, books etc).

 I really do want to use Lift instead of Rails. Could somebody please
 convince me? :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread Arthur

On Sun, Aug 23, 2009 at 7:04 PM, David
Pollakfeeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
 kev.lee.wri...@googlemail.com wrote:

 I'm wondering if we can't leverage JavaSpaces to handle a lot of this
 stuff.  From my experience with the technology it seems to be a pretty good
 fit for the problem.

 Two reasons:
 - JavaSpaces is as far as I know, GPL and we will not mix any GPL into Lift

JavaSpaces is just the specification. There are two implementations I
know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
have hands on experience with either.

 - It doesn't solve the issue with low-level session replication which relies
 on serialization of the session data for transfer to another app server
 instance.

Arthur

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



[Lift] Re: Structuring Web Application

2009-08-23 Thread David Pollak
On Sun, Aug 23, 2009 at 5:15 AM, greekscala hellectro...@gmail.com wrote:


 Hello Timothy,

 thank you.
 I know that I do not need Spring for Scala.
 I dont expressed it well. How do I glue my app parts
 together. And how do I glue the lift part with a facade or
 application service of my domain layer.


Use traits to describe the pieces of your business logic rather than
classes.  Traits can be composed very easily.

Don't use new, but use object's as factories that make run-time decisions
about how to compose traits and vend them.




 Thanks for your help


 On 23 Aug., 13:12, Timothy Perrett timo...@getintheloop.eu wrote:
  Can you please be more specific about your app tier that you wish to
  access - im unfortunately not seeing what hurdle stops you from
  accessing it just as you would from Java?
 
  Cheers, Tim
 
  On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:
 
   Hello Lift Community,
 
   I want to implement a new Project in Scala with Lift. I am new to
   Scala/Lift.
   Scala looks great and it expanded my horizon. FP is a new concept to
   me.
 
   My background is Java and a little bit of Spring. I read three Scala
   books
   and a lot on blogs. But there is a missing part for me on how to
   combine
   my classes. I read the Scalable Components Paper and I dont get it
   100%.
   I need a little bit more input on structuring a web app and I hope to
   get the 100%
   with you guys.
   With Spring you let the container manage the classes. ok.
   I think my problem is, I dont know how you structured a web app in
   days
   without Spring.
 
   I would like to have Lift access my domain logic over an application
   layer (Domain
   Driven Design).
   In Wicket I would have my SpringBean annotation.
 
   So I hope to understand, how
   - can I access my app layer?
   - how could I organize my domain logic. I want to use DDD. I know I
   have to use
   object and class in a bigger sense...?
 
   I hope you guys can give me some hints.
 
   Thanks a lot

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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



[Lift] Re: Lift vs Rails

2009-08-23 Thread David Pollak
Jack,
I started doing Rails in 2004.  At the time, there was one Rails book and a
few Ruby books.  There had been a few RubyConf conferences and SD Forum had
the first Ruby  Rails conference in Silicon Valley.  Ruby was mid-pack in
the second set of the Tiobe index.

By those metrics, Lift and Scala are about 4-5 years behind Ruby and Rails.

From an operational standpoint, Scala and Lift are light-years ahead of
where Ruby/Rails was in 2004... in fact, managing moderate to high traffic
Scala/Lift sites is much easier than Ruby/Rails/Mongrel is today.  Because
Lift and Scala can take advantage of every Java library, there is similar
richness in the quantity and quality of external libraries.

Two year ago, Scala was virtually unknown.  At JavaOne this year, Scala and
Lift books were 3 of the top 10 best sellers at the JavaOne bookstore.  Most
Scala and Lift talks were standing room only.

As with every new technology, there are adoption risks, but I think Scala
crossed the chasm this year at JavaOne and is entering the early
mainstream phase.  Companies including Twitter, LinkedIn, SAP, OfficeDepot,
etc. all have Scala in production.

I can put you in touch with a dozen high quality Lift/Scala developers...
folks who are currently making their living with Java/Ruby/Obj-C, but would
rather do Scala and Lift coding.  If you've got funding, I can find you good
Scala  Lift developers.

Thanks,

David

On Sun, Aug 23, 2009 at 7:45 AM, jack jack.wid...@gmail.com wrote:


 I am doing a startup company that involves both a lot of processing on
 the backend (in the code) and a decent amount of comet/ajax in the
 frontend.It is very important that the code quickly  on the server.  I
 have seen the light with respect to Scala and Lift looks terrific. My
 only concern is how new it is and the availability of resources
 (programmers, books etc).

 I really do want to use Lift instead of Rails. Could somebody please
 convince me? :)

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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



[Lift] Re: Problem building my app in Windows

2009-08-23 Thread David Pollak
Please make sure you are:
- Using Maven 2.0.9 or greater
- Running things from the Windows command prompt (not the Git shell or
Cygwin)

I regularly use Windows for Scala development.  I wrote *Beginning Scala* on
a Windows machine and my traveling laptop is a Windows machine.  I have not
experienced any problems with Lift, Scala, or Maven on Windows.

On Sat, Aug 22, 2009 at 10:08 PM, DFectuoso santiago1...@gmail.com wrote:


 Hi, i have been working in linux and mac and having a wonderful time
 with mvn and everything lift's got to offer =). Sadly i want to teach
 lift to a person who uses Windows as he's only OS, so i am trying to
 configure hes computer, neither him or me are experts on this OS.

 I installed java 1.6 and ran into some problems, so i downloaded
 1.5_20 and now i have java and maven working, but while trying to
 compile a very simple file i get the an error(posted at the end of
 this post); and i'm wondering if theres anything i need to know, seems
 like it could be some permisions or something like that.

 Any ideas? People running on windows how did you configure you box?

 Thanks,

 The error:

 [INFO] Trace
 org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get
 dependency
  information: Unable to read the metadata file for artifact
 'net.liftweb:lift-co
 re:jar': Error getting POM for 'net.liftweb:lift-core' from the
 repository: Unab
 le to store local copy of metadata: Error updating group repository
 metadata
  net.liftweb:lift-core:pom:1.1-SNAPSHOT

  for project net.liftweb:lift-core
  net.liftweb:lift-core:jar:1.1-SNAPSHOT

 from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  scala-tools.org (http://scala-tools.org/repo-releases),
  scala-tools.org.snapshots (http://scala-tools.org/repo-snapshots),
  http://www.lag.net/repo/ (http://www.lag.net/repo/)
 Path to dependency:
1) net.twitknow:4Disc:war:0.1


at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
 ultLifecycleExecutor.java:575)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
 fecycle(DefaultLifecycleExecutor.java:499)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
 ltLifecycleExecutor.java:478)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
 dleFailures(DefaultLifecycleExecutor.java:330)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
 ts(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
 (DefaultLi
 fecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
 336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
 129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.
 java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAcces
 sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.codehaus.classworlds.Launcher.launchEnhanced
 (Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode
 (Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by:
 org.apache.maven.artifact.resolver.ArtifactResolutionException: Unabl
 e to get dependency information: Unable to read the metadata file for
 artifact '
 net.liftweb:lift-core:jar': Error getting POM for 'net.liftweb:lift-
 core' from t
 he repository: Unable to store local copy of metadata: Error updating
 group repo
 sitory metadata
  net.liftweb:lift-core:pom:1.1-SNAPSHOT

  for project net.liftweb:lift-core
  net.liftweb:lift-core:jar:1.1-SNAPSHOT

 from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  scala-tools.org (http://scala-tools.org/repo-releases),
  scala-tools.org.snapshots (http://scala-tools.org/repo-snapshots),
  http://www.lag.net/repo/ (http://www.lag.net/repo/)
 Path to dependency:
1) net.twitknow:4Disc:war:0.1


at
 org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
 efaultArtifactCollector.java:403)
at
 org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(D
 efaultArtifactCollector.java:76)
at
 org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
 nsitively(DefaultArtifactResolver.java:300)
at
 org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
 nsitively(DefaultArtifactResolver.java:288)
at
 org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDepende
 ncies(DefaultPluginManager.java:1415)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
 (DefaultPlugi
 nManager.java:405)

[Lift] Re: Problem building my app in Windows

2009-08-23 Thread DFectuoso

Yea, my steps where install java 1.5_20, then ran the windows
installer i got from liftweb.com, then tried to run the application
and basicly got into this problem, seems like maven is trying to
download information from lift's repo and it get an error while trying
to store it on localhost, i'll keep messing with this.

David, yea im sure it works, there no doubt about it, and no religious
war was intented i just dont know if i was missing something obvious
and wanted to ask.(btw its vista and im running it on the command
prompt, with run as administrator selected).


On Aug 23, 12:20 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Please make sure you are:
 - Using Maven 2.0.9 or greater
 - Running things from the Windows command prompt (not the Git shell or
 Cygwin)

 I regularly use Windows for Scala development.  I wrote *Beginning Scala* on
 a Windows machine and my traveling laptop is a Windows machine.  I have not
 experienced any problems with Lift, Scala, or Maven on Windows.



 On Sat, Aug 22, 2009 at 10:08 PM, DFectuoso santiago1...@gmail.com wrote:

  Hi, i have been working in linux and mac and having a wonderful time
  with mvn and everything lift's got to offer =). Sadly i want to teach
  lift to a person who uses Windows as he's only OS, so i am trying to
  configure hes computer, neither him or me are experts on this OS.

  I installed java 1.6 and ran into some problems, so i downloaded
  1.5_20 and now i have java and maven working, but while trying to
  compile a very simple file i get the an error(posted at the end of
  this post); and i'm wondering if theres anything i need to know, seems
  like it could be some permisions or something like that.

  Any ideas? People running on windows how did you configure you box?

  Thanks,

  The error:

  [INFO] Trace
  org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get
  dependency
   information: Unable to read the metadata file for artifact
  'net.liftweb:lift-co
  re:jar': Error getting POM for 'net.liftweb:lift-core' from the
  repository: Unab
  le to store local copy of metadata: Error updating group repository
  metadata
   net.liftweb:lift-core:pom:1.1-SNAPSHOT

   for project net.liftweb:lift-core
   net.liftweb:lift-core:jar:1.1-SNAPSHOT

  from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   scala-tools.org (http://scala-tools.org/repo-releases),
   scala-tools.org.snapshots (http://scala-tools.org/repo-snapshots),
   http://www.lag.net/repo/(http://www.lag.net/repo/)
  Path to dependency:
         1) net.twitknow:4Disc:war:0.1

         at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
  ultLifecycleExecutor.java:575)
         at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
  fecycle(DefaultLifecycleExecutor.java:499)
         at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
  ltLifecycleExecutor.java:478)
         at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
  dleFailures(DefaultLifecycleExecutor.java:330)
         at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
  ts(DefaultLifecycleExecutor.java:291)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
  (DefaultLi
  fecycleExecutor.java:142)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
  336)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
  129)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.
  java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAcces
  sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:592)
         at org.codehaus.classworlds.Launcher.launchEnhanced
  (Launcher.java:315)
         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
         at org.codehaus.classworlds.Launcher.mainWithExitCode
  (Launcher.java:430)

         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  Caused by:
  org.apache.maven.artifact.resolver.ArtifactResolutionException: Unabl
  e to get dependency information: Unable to read the metadata file for
  artifact '
  net.liftweb:lift-core:jar': Error getting POM for 'net.liftweb:lift-
  core' from t
  he repository: Unable to store local copy of metadata: Error updating
  group repo
  sitory metadata
   net.liftweb:lift-core:pom:1.1-SNAPSHOT

   for project net.liftweb:lift-core
   net.liftweb:lift-core:jar:1.1-SNAPSHOT

  from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   scala-tools.org (http://scala-tools.org/repo-releases),
   scala-tools.org.snapshots (http://scala-tools.org/repo-snapshots),
   http://www.lag.net/repo/(http://www.lag.net/repo/)
  Path to dependency:
         1) 

[Lift] Re: Lift vs Rails

2009-08-23 Thread Meredith Gregory
Jack,

For my money Rails is somewhat more mature than lift, but lift is on a
trajectory to overtake Rails feature-wise and is certainly already there
performance-wise. The real issue, to me, is Scala vs Ruby. Quite apart from
being more slightly more performant and equally expressive, the real win of
Scala is its types allow you scale the code over time. What i mean by that
is that a type system like Scala's allows you to

   - navigate code
   - substitute and refactor code while preserving properties
   - design for abstraction

One of the biggest problems of Ruby code -- and seasoned Ruby devs will tell
you this -- is that in a code block of 10 lines -- that is part of say a
100K line project -- if i point to a line of code, you can't tell me what it
is doing. This is compounded by the fact that with monkey-patching, even if
you thought you knew, with the next check-in in some other part of the
codebase, you don't.

In the same situation in Scala any given expression has a type that the
compiler may infer. So, i don't need to know Joe Bloggs who wrote that
block. i reason about what it does through the types. This gives better
separation of *dev team*s -- not just code blocks. This is good if you want
to scale up your efforts organizationally -- either by spreading it out over
different groups working at approximately the same time, or by spreading
development out over time. i'm not saying this is a silver bullet. Software
is hard and there are always non-linear or cyclical dependencies, but types
really help with practical development. After a while, you get to the point
where you can design using types, and then cutting the code is like falling
off a log. At this point designing for highly leveraged abstractions that
significantly reduce the amount of code and increase the applicability of
code is within your grasp.

The guy who makes these points in a much less zealous and much more
reasoned, dispassionate way with lots of practical examples is Bill Venners.
His recent talk for JavaOne -- which is on video (i'll look for the link) --
is quite powerful in this regard. Heck, even Charles Nutter, in his own blog
acknowledges that Scala is the heir apparent of Java for the JVM.

Don't get me wrong -- i'm not a Scala biggot. There are a lot of corners of
this language i don't like. For my money, Haskell is a better language. But,
Haskell doesn't run on the JVM. You can't ship Haskell apps as jars or wars
and smoothly hook them into maven repos, and you can't very easily build
Haskell apps using standard JVM libs. So, that's why Scala, and that's why
lift.

Well... there's also the fact that the Scala and lift communities are
populated by very impressive people who are very open and incredibly
responsive.

Best wishes,

--greg

On Sun, Aug 23, 2009 at 7:45 AM, jack jack.wid...@gmail.com wrote:


 I am doing a startup company that involves both a lot of processing on
 the backend (in the code) and a decent amount of comet/ajax in the
 frontend.It is very important that the code quickly  on the server.  I
 have seen the light with respect to Scala and Lift looks terrific. My
 only concern is how new it is and the availability of resources
 (programmers, books etc).

 I really do want to use Lift instead of Rails. Could somebody please
 convince me? :)

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread marius d.

Hmmm .. I'm wondering if we can write a Scala compiler plugin that
transform functions provided to Lift's S/SHtml function etc. into a
richer FunctionX implementation that knows how to serialize it's
members. We could restrict the types that as LiftSerializable on top
of primitives, Calenars, SessionVar/RequestVar etc. If users need
their own classes to be LiftSerilizable they would have to implement
LiftSerializable trait.

Thoughts?

Br's,
Marius

On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
 At a first glace Java serialization is needed because of its awareness
 of the reference graph. But in the same time it does not perform well.
 One way might be the byte level instrumentation that would induce code
 to figure out the reference graph and know how to stream-ify it using
 a given efficient protocol. But that induces risks and it involves
 tons of work. I think would be doable though.

 The problem is not really the technology of propagating session
 information to other nodes. That's the easiest part, but tough one is
 figuring out the low level reference graph and serialization
 semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
 name it, are unlikely to help solving the fundamental problem.

 Br's,
 Marius

 On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:

  On Sun, Aug 23, 2009 at 7:04 PM, David

  Pollakfeeder.of.the.be...@gmail.com wrote:
   On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
   kev.lee.wri...@googlemail.com wrote:

   I'm wondering if we can't leverage JavaSpaces to handle a lot of this
   stuff.  From my experience with the technology it seems to be a pretty 
   good
   fit for the problem.

   Two reasons:
   - JavaSpaces is as far as I know, GPL and we will not mix any GPL into 
   Lift

  JavaSpaces is just the specification. There are two implementations I
  know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
  have hands on experience with either.

   - It doesn't solve the issue with low-level session replication which 
   relies
   on serialization of the session data for transfer to another app server
   instance.

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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread Kevin Wright
Also FlyObjectSpace (http://www.flyobjectspace.com/)
It comes with a suitable licence and has a Scala version.  Not used it
myself but I'm definitely about to check it out...

I'd also be willing to be that the devs would be extremely accommodating if
it were being used in a high profile project such as Lift. :)




On Sun, Aug 23, 2009 at 6:16 PM, Arthur avand...@gmail.com wrote:


 On Sun, Aug 23, 2009 at 7:04 PM, David
 Pollakfeeder.of.the.be...@gmail.com wrote:
  On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
  kev.lee.wri...@googlemail.com wrote:
 
  I'm wondering if we can't leverage JavaSpaces to handle a lot of this
  stuff.  From my experience with the technology it seems to be a pretty
 good
  fit for the problem.
 
  Two reasons:
  - JavaSpaces is as far as I know, GPL and we will not mix any GPL into
 Lift

 JavaSpaces is just the specification. There are two implementations I
 know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
 have hands on experience with either.

  - It doesn't solve the issue with low-level session replication which
 relies
  on serialization of the session data for transfer to another app server
  instance.

 Arthur

 


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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread marius d.



On Aug 23, 9:47 pm, Ryan Donahue donahu...@gmail.com wrote:
 Marius, this sound like a very good idea.  This would allow the app
 developer to decide whether to spend the extra time thinking about
 serialization/session replication.  If you don't need it, then you
 don't use the compiler plugin and just continue building lift apps as
 you have been.  If you do need it, then you use the plugin and you'll
 have compiler errors or warnings telling you where you need to make
 use of LiftSerializable.

 If the serializing problems are handled, would there be any reasons
 not to  tattach the lift objects tohe HttpSession to support existing
 session replication mechanisms such as Tomcat's?

There probably would as typically container's HTTPSession's are using
Java's serialization and the above would aim for a different one.


 On Aug 23, 1:45 pm, marius d. marius.dan...@gmail.com wrote:

  Hmmm .. I'm wondering if we can write a Scala compiler plugin that
  transform functions provided to Lift's S/SHtml function etc. into a
  richer FunctionX implementation that knows how to serialize it's
  members. We could restrict the types that as LiftSerializable on top
  of primitives, Calenars, SessionVar/RequestVar etc. If users need
  their own classes to be LiftSerilizable they would have to implement
  LiftSerializable trait.

  Thoughts?

  Br's,
  Marius

  On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:

   At a first glace Java serialization is needed because of its awareness
   of the reference graph. But in the same time it does not perform well.
   One way might be the byte level instrumentation that would induce code
   to figure out the reference graph and know how to stream-ify it using
   a given efficient protocol. But that induces risks and it involves
   tons of work. I think would be doable though.

   The problem is not really the technology of propagating session
   information to other nodes. That's the easiest part, but tough one is
   figuring out the low level reference graph and serialization
   semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
   name it, are unlikely to help solving the fundamental problem.

   Br's,
   Marius

   On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:

On Sun, Aug 23, 2009 at 7:04 PM, David

Pollakfeeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
 kev.lee.wri...@googlemail.com wrote:

 I'm wondering if we can't leverage JavaSpaces to handle a lot of this
 stuff.  From my experience with the technology it seems to be a 
 pretty good
 fit for the problem.

 Two reasons:
 - JavaSpaces is as far as I know, GPL and we will not mix any GPL 
 into Lift

JavaSpaces is just the specification. There are two implementations I
know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
have hands on experience with either.

 - It doesn't solve the issue with low-level session replication which 
 relies
 on serialization of the session data for transfer to another app 
 server
 instance.

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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread Ryan Donahue

Marius, this sound like a very good idea.  This would allow the app
developer to decide whether to spend the extra time thinking about
serialization/session replication.  If you don't need it, then you
don't use the compiler plugin and just continue building lift apps as
you have been.  If you do need it, then you use the plugin and you'll
have compiler errors or warnings telling you where you need to make
use of LiftSerializable.

If the serializing problems are handled, would there be any reasons
not to attach the lift objects to the HttpSession to support existing
session replication mechanisms such as Tomcat's?

On Aug 23, 1:45 pm, marius d. marius.dan...@gmail.com wrote:
 Hmmm .. I'm wondering if we can write a Scala compiler plugin that
 transform functions provided to Lift's S/SHtml function etc. into a
 richer FunctionX implementation that knows how to serialize it's
 members. We could restrict the types that as LiftSerializable on top
 of primitives, Calenars, SessionVar/RequestVar etc. If users need
 their own classes to be LiftSerilizable they would have to implement
 LiftSerializable trait.

 Thoughts?

 Br's,
 Marius

 On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:

  At a first glace Java serialization is needed because of its awareness
  of the reference graph. But in the same time it does not perform well.
  One way might be the byte level instrumentation that would induce code
  to figure out the reference graph and know how to stream-ify it using
  a given efficient protocol. But that induces risks and it involves
  tons of work. I think would be doable though.

  The problem is not really the technology of propagating session
  information to other nodes. That's the easiest part, but tough one is
  figuring out the low level reference graph and serialization
  semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
  name it, are unlikely to help solving the fundamental problem.

  Br's,
  Marius

  On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:

   On Sun, Aug 23, 2009 at 7:04 PM, David

   Pollakfeeder.of.the.be...@gmail.com wrote:
On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
kev.lee.wri...@googlemail.com wrote:

I'm wondering if we can't leverage JavaSpaces to handle a lot of this
stuff.  From my experience with the technology it seems to be a pretty 
good
fit for the problem.

Two reasons:
- JavaSpaces is as far as I know, GPL and we will not mix any GPL into 
Lift

   JavaSpaces is just the specification. There are two implementations I
   know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
   have hands on experience with either.

- It doesn't solve the issue with low-level session replication which 
relies
on serialization of the session data for transfer to another app server
instance.

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



[Lift] Re: Lift vs Rails

2009-08-23 Thread Jack Widman
Thanks Derek for the quick and helpful response. I am going to go with
Lift.

On Sun, Aug 23, 2009 at 12:49 PM, Derek Williams de...@nebvin.ca wrote:

 On Sun, Aug 23, 2009 at 8:45 AM, jack jack.wid...@gmail.com wrote:

 I really do want to use Lift instead of Rails. Could somebody please
 convince me? :)


 I used to struggle with Rails (and to a lesser extent Merb) because it was
 difficult to do things that weren't the Rails Way. Lift does have a
 recommended way of doing things as well but I haven't yet run into issues
 where I had to fight the framework in order to do things my way. This aspect
 along with the performance and ease of use makes it my preferred framework
 by far.

 If you are not doing the coding yourself, finding a programmer might be an
 issue as experienced Scala developers (not to mention Lift developers) are
 probably much harder to find then Ruby and Rails developers.

 As far as existing libraries, being able to use any Java library is a big
 plus. It can sometimes be hard to find a good (or maintained) ruby library
 in order to use an existing binary (C/C++) library.

 The only thing at the moment that I would like to be better is Text
 Editor/IDE support. I don't find this to be too bad of a problem though as I
 spent all of my Ruby development struggling with the same things. I ended up
 using Vim for ruby development, and have now turned to Emacs for Scala
 development. For learning Scala I used Eclipse as it did a good job of
 giving me documentation for Classes/Methods. After a couple of months of
 coding I only have to reference the scaladocs once in a while as I find the
 language to be very natural. But these are issues that you will run into
 with Ruby development too, as getting good IDE support for a dynamic
 language can be even more difficult.

 I'd recommend Lift for your project, especially considering you want to use
 plenty of Ajax/Comet. I never even considered using Comet in a web project
 of mine until I started using Lift. The only case where I might recommend
 Rails is if you are not a decent coder yourself and you aren't able to find
 a good Lift developer to work with.

 Hope this helps

 --
 Derek Williams

 


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



[Lift] Re: MappedDateTime losing time?

2009-08-23 Thread Jeppe Nejsum Madsen

Derek Chen-Becker dchenbec...@gmail.com writes:

 It should be very safe to use 1.0.1-SNAPSHOT. I'm planning on spinning the
 release of 1.0.1 GA next Wednesday, so we're in a code freeze starting
 Sunday. Really, the 1.0 line is strictly bug-fix at this point (1.1-SNAPSHOT
 is where new features make it in). So far, the things that have made it into
 1.0.1 are:

 1. Proper Oracle support
 2. Fix for PostgreSQL double type
 3. The DateTime fix
 4. Some fixes for the Textile parser
 5. Some minor XML parsing fixes (PCDataMarkupParser)
 6. Some Actor fixes

Derek, with the flurry of changes you're doing to the Db code (which is
nice :-), it's increasingly difficult to maintain my own copy which
fixes http://github.com/dpp/liftweb/issues#issue/36 

Any chance to get this included in 1.1 soon? (It's a two line fix :-)?

/Jeppe

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



[Lift] Re: Lift vs Rails

2009-08-23 Thread Jack Widman
Thanks Marius. I agree its a no brainer. Just wanted some independent
confirmation!.

On Sun, Aug 23, 2009 at 1:08 PM, marius d. marius.dan...@gmail.com wrote:


 Looks like you don't need to be convinced :) ... Scala with its
 features + Java compatibility + Lift's rich set of features  +
 performance of Scala  Lift makes it a no brainer. Enumerating all the
 pros of Scala and Lift would just take way to long.


 The list of Scala books and the Lift book are enlisted here
 http://www.scala-lang.org/node/959

 Br's,
 Marius

 On Aug 23, 5:45 pm, jack jack.wid...@gmail.com wrote:
  I am doing a startup company that involves both a lot of processing on
  the backend (in the code) and a decent amount of comet/ajax in the
  frontend.It is very important that the code quickly  on the server.  I
  have seen the light with respect to Scala and Lift looks terrific. My
  only concern is how new it is and the availability of resources
  (programmers, books etc).
 
  I really do want to use Lift instead of Rails. Could somebody please
  convince me? :)
 


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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread marius d.

Sure thing Greg.

On Aug 23, 9:59 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
 Marius,

 This is closely related to the proposal to deal with http streams via
 delimited continuations. Sorry i haven't fleshed this out a bit. Let me put
 my thoughts on paper/pseudo code and email it out for comment in a day or
 so.

 Best wishes,

 --greg



 On Sun, Aug 23, 2009 at 10:45 AM, marius d. marius.dan...@gmail.com wrote:

  Hmmm .. I'm wondering if we can write a Scala compiler plugin that
  transform functions provided to Lift's S/SHtml function etc. into a
  richer FunctionX implementation that knows how to serialize it's
  members. We could restrict the types that as LiftSerializable on top
  of primitives, Calenars, SessionVar/RequestVar etc. If users need
  their own classes to be LiftSerilizable they would have to implement
  LiftSerializable trait.

  Thoughts?

  Br's,
  Marius

  On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
   At a first glace Java serialization is needed because of its awareness
   of the reference graph. But in the same time it does not perform well.
   One way might be the byte level instrumentation that would induce code
   to figure out the reference graph and know how to stream-ify it using
   a given efficient protocol. But that induces risks and it involves
   tons of work. I think would be doable though.

   The problem is not really the technology of propagating session
   information to other nodes. That's the easiest part, but tough one is
   figuring out the low level reference graph and serialization
   semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
   name it, are unlikely to help solving the fundamental problem.

   Br's,
   Marius

   On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:

On Sun, Aug 23, 2009 at 7:04 PM, David

Pollakfeeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
 kev.lee.wri...@googlemail.com wrote:

 I'm wondering if we can't leverage JavaSpaces to handle a lot of
  this
 stuff.  From my experience with the technology it seems to be a
  pretty good
 fit for the problem.

 Two reasons:
 - JavaSpaces is as far as I know, GPL and we will not mix any GPL
  into Lift

JavaSpaces is just the specification. There are two implementations I
know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
have hands on experience with either.

 - It doesn't solve the issue with low-level session replication which
  relies
 on serialization of the session data for transfer to another app
  server
 instance.

Arthur

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117

 +1 206.650.3740

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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread David Pollak
On Sun, Aug 23, 2009 at 10:45 AM, marius d. marius.dan...@gmail.com wrote:


 Hmmm .. I'm wondering if we can write a Scala compiler plugin that
 transform functions provided to Lift's S/SHtml function etc. into a
 richer FunctionX implementation that knows how to serialize it's
 members. We could restrict the types that as LiftSerializable on top
 of primitives, Calenars, SessionVar/RequestVar etc. If users need
 their own classes to be LiftSerilizable they would have to implement
 LiftSerializable trait.


I think we can do it without explicit traits.  I think we just need to walk
the graph for everything that's added to the LiftSession and see where it
leads.  Any graph we can walk is something that we can serialize... even
without Java serialization.  Any graph that ends in globals or some class
that refers to native stuff (e.g., IO), then we're toast.




 Thoughts?

 Br's,
 Marius

 On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
  At a first glace Java serialization is needed because of its awareness
  of the reference graph. But in the same time it does not perform well.
  One way might be the byte level instrumentation that would induce code
  to figure out the reference graph and know how to stream-ify it using
  a given efficient protocol. But that induces risks and it involves
  tons of work. I think would be doable though.
 
  The problem is not really the technology of propagating session
  information to other nodes. That's the easiest part, but tough one is
  figuring out the low level reference graph and serialization
  semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
  name it, are unlikely to help solving the fundamental problem.
 
  Br's,
  Marius
 
  On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:
 
   On Sun, Aug 23, 2009 at 7:04 PM, David
 
   Pollakfeeder.of.the.be...@gmail.com wrote:
On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
kev.lee.wri...@googlemail.com wrote:
 
I'm wondering if we can't leverage JavaSpaces to handle a lot of
 this
stuff.  From my experience with the technology it seems to be a
 pretty good
fit for the problem.
 
Two reasons:
- JavaSpaces is as far as I know, GPL and we will not mix any GPL
 into Lift
 
   JavaSpaces is just the specification. There are two implementations I
   know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
   have hands on experience with either.
 
- It doesn't solve the issue with low-level session replication which
 relies
on serialization of the session data for transfer to another app
 server
instance.
 
   Arthur
 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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



[Lift] Re: alternate webroot using Boot?

2009-08-23 Thread David Pollak
Are you just looking to pass certain requests down the Servlet's filter
chain so they can be handled generically by the app server?
You can set:

LiftRules.liftRequest.append {
  case Req(static_stuff :: _, _, _) = false
}

That'll make /static_stuff/... all get passed through to the web container.

On Sat, Aug 22, 2009 at 9:29 PM, Grant Wood smackt...@gmail.com wrote:


 Thanks David,

  I think your best bet is to serve your static content via a front-end web
  server (I use Nginx) and route all the app-related requests to your
  container.

 I was trying to avoid that for this project. Back to using /content/
 for everything static.  Nginx is a great suggestion for this, thanks!


 -Grant

 On Aug 22, 8:48 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  On Sat, Aug 22, 2009 at 4:51 PM, Grant Wood smackt...@gmail.com wrote:
 
   How can I tell a Lift app to use an alternate webroot (holding all my
   html, static templates, images, etc)?  Essentially, I want my
   application to look in a folder of my choosing for content, rather
   than in the webapp directory as it does by default.
 
   I can't be the only person who has to manage/deploy content in a
   separate process and system than the application,
 
  I think you're the first person that has asked for this.
 
   so there is likely a
   simple LiftRule I can override in Boot.scala to use content in a
   location other than the war.
 
  I think this might be impossible (or at least very, very difficult.)
   Mapping from resources contained in the WAR file into the application
 space
  is not defined by any spec that I know of and varies on a container by
  container basis.
 
  I think your best bet is to serve your static content via a front-end web
  server (I use Nginx) and route all the app-related requests to your
  container.
 
   However, digging through the
   documentation, discussions, and code (LiftServlet, LiftRules, etc.) I
   don't see an obvious entry point.
 
   Thank you for your help!
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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



[Lift] Re: Structuring Web Application

2009-08-23 Thread greekscala

Hello David,

thanks for helping.
Do you mean by composing my business logic with traits
like the example of Jonas Boner 
http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html
?
I understand the example.

What do you mean by objects? The object Scala keyword?

It would be great if you can give me a little example. How to glue it
with a Lift Snippet.

Thanks
kind regards

On 23 Aug., 19:23, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 5:15 AM, greekscala hellectro...@gmail.com wrote:

  Hello Timothy,

  thank you.
  I know that I do not need Spring for Scala.
  I dont expressed it well. How do I glue my app parts
  together. And how do I glue the lift part with a facade or
  application service of my domain layer.

 Use traits to describe the pieces of your business logic rather than
 classes.  Traits can be composed very easily.

 Don't use new, but use object's as factories that make run-time decisions
 about how to compose traits and vend them.





  Thanks for your help

  On 23 Aug., 13:12, Timothy Perrett timo...@getintheloop.eu wrote:
   Can you please be more specific about your app tier that you wish to
   access - im unfortunately not seeing what hurdle stops you from
   accessing it just as you would from Java?

   Cheers, Tim

   On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:

Hello Lift Community,

I want to implement a new Project in Scala with Lift. I am new to
Scala/Lift.
Scala looks great and it expanded my horizon. FP is a new concept to
me.

My background is Java and a little bit of Spring. I read three Scala
books
and a lot on blogs. But there is a missing part for me on how to
combine
my classes. I read the Scalable Components Paper and I dont get it
100%.
I need a little bit more input on structuring a web app and I hope to
get the 100%
with you guys.
With Spring you let the container manage the classes. ok.
I think my problem is, I dont know how you structured a web app in
days
without Spring.

I would like to have Lift access my domain logic over an application
layer (Domain
Driven Design).
In Wicket I would have my SpringBean annotation.

So I hope to understand, how
- can I access my app layer?
- how could I organize my domain logic. I want to use DDD. I know I
have to use
object and class in a bigger sense...?

I hope you guys can give me some hints.

Thanks a lot

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

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



[Lift] Re: Lift Core Missing on mvn install

2009-08-23 Thread Peter Robinett

Hi Derek,

I hadn't tried deleting my .m2 directory but unfortunately that didn't
help: http://gist.github.com/173501

Peter

On Aug 22, 5:46 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
 I don't see anything in the pom.xml that should be causing an issue. Have
 you tried wiping your .m2 repository? Sometimes Maven gets stuck. If you do
 that and you still get the issue, could you post the full output from mvn
 -e clean install?

 Derek

 On Fri, Aug 21, 2009 at 6:42 PM, Peter Robinett 
 pe...@bubblefoundry.comwrote:



  Hi all,

  I think I have a problem with my pom.xml file, as when I run 'mvn
  install' I get an error saying that Lift Core is missing. 'mvn
  jetty:run' works fine. My pom.xml is here:http://gist.github.com/172540

  I'd appreciate any tips. Thanks!

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



[Lift] Re: Lift Core Missing on mvn install

2009-08-23 Thread David Pollak
You need to put the snapshots repository in your repository listing:
  repositories
repository
  idscala-tools.org/id
  nameScala-Tools Maven2 Repository/name
  urlhttp://scala-tools.org/repo-releases/url
/repository
repository
  idscala-tools.org.snapshots/id
  nameScala-Tools Maven2 Repository for Snapshots/name
  urlhttp://scala-tools.org/repo-snapshots/url
  snapshots /
/repository
  /repositories


On Sun, Aug 23, 2009 at 3:48 PM, Peter Robinett pe...@bubblefoundry.comwrote:


 Hi Derek,

 I hadn't tried deleting my .m2 directory but unfortunately that didn't
 help: http://gist.github.com/173501

 Peter

 On Aug 22, 5:46 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
  I don't see anything in the pom.xml that should be causing an issue. Have
  you tried wiping your .m2 repository? Sometimes Maven gets stuck. If you
 do
  that and you still get the issue, could you post the full output from
 mvn
  -e clean install?
 
  Derek
 
  On Fri, Aug 21, 2009 at 6:42 PM, Peter Robinett pe...@bubblefoundry.com
 wrote:
 
 
 
   Hi all,
 
   I think I have a problem with my pom.xml file, as when I run 'mvn
   install' I get an error saying that Lift Core is missing. 'mvn
   jetty:run' works fine. My pom.xml is here:
 http://gist.github.com/172540
 
   I'd appreciate any tips. Thanks!
 
   Peter Robinett
 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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



[Lift] JPA blank archetype

2009-08-23 Thread Charles F. Munat

Anyone know offhand what the mvn command is to create a blank JPA 
project (split, not single)? We should probably collect all the 
archetype commands and put them on the new wiki (and keep them up to 
date with the latest version number).

I'm happy to do it if I can figure out what the right versions are...

Chas.

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



[Lift] Re: JPA blank archetype

2009-08-23 Thread Charles F. Munat

I found this in the lift book and used it:

mvn archetype:generate \
-DarchetypeRepository=http://scala-tools.org/repo-snapshots \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-jpa-basic \
-DarchetypeVersion=1.1-SNAPSHOT \
-DgroupId=com.foo.jpaweb \
-DartifactId=JPADemo \
-Dversion=1.0-SNAPSHOT

During the creation of the basic jpa app, I got this:

Downloading: 
http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar
44K downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 
'66b831a190e2e072816e5b2acc8064287d94b371'; remote = 
'023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
Downloading: 
http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar
44K downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 
'66b831a190e2e072816e5b2acc8064287d94b371'; remote = 
'023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING

And a bunch of warnings:

[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/pom.xml [line 37,column 16] : 
${scala.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/pom.xml [line 43,column 16] : 
${scala.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/pom.xml [line 85,column 25] : 
${scala.version} is not a valid reference.
[WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/web/pom.xml [line 13,column 
9] : ${parent.artifactId} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/web/pom.xml [line 24,column 
16] : ${pom.groupId} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/web/pom.xml [line 26,column 
16] : ${pom.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/spa/pom.xml [line 14,column 
9] : ${parent.artifactId} is not a valid reference.

The build completed successfully anyway. Afterward, I tried mvn 
compile in the top directory and got the following error:

[WARNING] 
/private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:70: 
error: type mismatch;
[WARNING]  found   : 
net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]
[WARNING]  required: 
net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]
[WARNING]   case null = 
Full(LiftRules.defaultLocaleCalculator(request))
[WARNING] ^
[WARNING] 
/private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:75: 
error: type mismatch;
[WARNING]  found   : 
(net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]) = 
java.util.Locale
[WARNING]  required: 
(net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]) = 
java.util.Locale
[WARNING] LiftRules.localeCalculator = localeCalculator _
[WARNING]  ^
[WARNING] two errors found
[INFO] 

[ERROR] BUILD FAILURE

H. Ideas?

Chas.

Charles F. Munat wrote:
 Anyone know offhand what the mvn command is to create a blank JPA 
 project (split, not single)? We should probably collect all the 
 archetype commands and put them on the new wiki (and keep them up to 
 date with the latest version number).
 
 I'm happy to do it if I can figure out what the right versions are...
 
 Chas.
 
  
 

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



[Lift] Re: JPA blank archetype

2009-08-23 Thread Derek Chen-Becker
It looks like this is still the older archive before HttpServletRequest →
HTTPRequest. The code in master has the change applied, so I'm not sure why
it's failing. The warnings are normal (I haven't figured out all of the
tricks with the velocity templating), but something isn't being pulled
correctly. Have you tried blowing away your .m2?

Derek

On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com wrote:


 I found this in the lift book and used it:

 mvn archetype:generate \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-jpa-basic \
 -DarchetypeVersion=1.1-SNAPSHOT \
 -DgroupId=com.foo.jpaweb \
 -DartifactId=JPADemo \
 -Dversion=1.0-SNAPSHOT

 During the creation of the basic jpa app, I got this:

 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar
 44Khttp://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar%0A44Kdownloaded
   (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar
 44Khttp://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar%0A44Kdownloaded
   (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING

 And a bunch of warnings:

 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 37,column 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 43,column 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 85,column 25] :
 ${scala.version} is not a valid reference.
 [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 13,column
 9] : ${parent.artifactId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 24,column
 16] : ${pom.groupId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 26,column
 16] : ${pom.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/spa/pom.xml [line 14,column
 9] : ${parent.artifactId} is not a valid reference.

 The build completed successfully anyway. Afterward, I tried mvn
 compile in the top directory and got the following error:

 [WARNING]

 /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:70:
 error: type mismatch;
 [WARNING]  found   :
 net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]
 [WARNING]  required:
 net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]
 [WARNING]   case null =
 Full(LiftRules.defaultLocaleCalculator(request))
 [WARNING] ^
 [WARNING]

 /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:75:
 error: type mismatch;
 [WARNING]  found   :
 (net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]) =
 java.util.Locale
 [WARNING]  required:
 (net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]) =
 java.util.Locale
 [WARNING] LiftRules.localeCalculator = localeCalculator _
 [WARNING]  ^
 [WARNING] two errors found
 [INFO]
 
 [ERROR] BUILD FAILURE

 H. Ideas?

 Chas.

 Charles F. Munat wrote:
  Anyone know offhand what the mvn command is to create a blank JPA
  project (split, not single)? We should probably collect all the
  archetype commands and put them on the new wiki (and keep them up to
  date with the latest version number).
 
  I'm happy to do it if I can figure out what the right versions are...
 
  Chas.
 
  
 

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 

[Lift] Re: JPA blank archetype

2009-08-23 Thread Charles F. Munat

No on blowing away m2. I did switch to the blank archetype (which is 
what I actually wanted) and it worked fine. But I can try again with the 
basic and blowing away m2.

Chas.

Derek Chen-Becker wrote:
 It looks like this is still the older archive before HttpServletRequest 
 → HTTPRequest. The code in master has the change applied, so I'm not 
 sure why it's failing. The warnings are normal (I haven't figured out 
 all of the tricks with the velocity templating), but something isn't 
 being pulled correctly. Have you tried blowing away your .m2?
 
 Derek
 
 On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 I found this in the lift book and used it:
 
 mvn archetype:generate \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-jpa-basic \
 -DarchetypeVersion=1.1-SNAPSHOT \
 -DgroupId=com.foo.jpaweb \
 -DartifactId=JPADemo \
 -Dversion=1.0-SNAPSHOT
 
 During the creation of the basic jpa app, I got this:
 
 Downloading:
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar%0A44K
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
 Downloading:
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar%0A44K
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
 
 And a bunch of warnings:
 
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 37,column 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 43,column 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 85,column 25] :
 ${scala.version} is not a valid reference.
 [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 13,column
 9] : ${parent.artifactId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 24,column
 16] : ${pom.groupId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 26,column
 16] : ${pom.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/spa/pom.xml [line 14,column
 9] : ${parent.artifactId} is not a valid reference.
 
 The build completed successfully anyway. Afterward, I tried mvn
 compile in the top directory and got the following error:
 
 [WARNING]
 
 /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:70:
 error: type mismatch;
 [WARNING]  found   :
 net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]
 [WARNING]  required:
 net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]
 [WARNING]   case null =
 Full(LiftRules.defaultLocaleCalculator(request))
 [WARNING] ^
 [WARNING]
 
 /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:75:
 error: type mismatch;
 [WARNING]  found   :
 (net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]) =
 java.util.Locale
 [WARNING]  required:
 (net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]) =
 java.util.Locale
 [WARNING] LiftRules.localeCalculator = localeCalculator _
 [WARNING]  ^
 [WARNING] two errors found
 [INFO]
 
 [ERROR] BUILD FAILURE
 
 H. Ideas?