Re: [Lift] Exploring record and alternative backends
I don't have any specific use case. I just want to know more and experiment with Record. On Tue, Nov 24, 2009 at 11:08 AM, Timothy Perrett timo...@getintheloop.euwrote: Ok, so this is spawned from a comment made by DPP - Its true, I was working on an Akka Record implementation but I had to shelve the concept for now as im busy with work. I am however using a custom backend I wrote at work where we have a service based system and that is working absolutely beautifully - its a little tricky getting your head around the implementation at first (we need to document this badly) but when you do, its a powerful one. What is your use case for getting started with Record? What is it you want to achieve? Cheers, Tim On 24 Nov 2009, at 15:41, Oscar Picasso wrote: Hi, I would like to learn Record and some alternative backend. I have read a post about a good Akka / Record bridge. Where should I start? Is the Akka / Record bridge part of the lift distribution (didn't see it)? Is there an example somewhere? Thanks. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] Broken 1.1-M7 jpa archetypes
It seems that 1.1-M7 jpa archetypes other than lift-archetype-jpa-basic are broken, both in snapshots and releases repositories. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Controlling fields in form generation
Thanks, that's what I was looking for. On Tue, Nov 24, 2009 at 12:40 AM, Ross Mellgren dri...@gmail.com wrote: It looks like you can override dbIncludeInForm_? to suppress fields from showing up in the form: ... object myField extends MappedString(this, 32) { override def dbIncludeInForm_? = false } ... -Ross On Nov 23, 2009, at 11:38 PM, Oscar Picasso wrote: HI, I generate a form with .toForm and want some fields to not appear in the form. I have tried to subclass fieldOrder in the MetaMapper but while it controls the order, all the fields keep appearing in the form even if they are not in the list returned by the overrided fieldOrder methods. I have tried other methods but with no luck. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Mapper vs. Record vs. JPA
Actually I intended to write: - JPA: I practice it on a daily base and it's very good but I feel like there is *a mismatch *between JPA and lift / scala. Not that I have thought a lot about it, it's just a feeling. Your input just confirms my feelings. Thanks. On Sun, Nov 22, 2009 at 8:11 PM, Chris Lewis burningodzi...@gmail.comwrote: I'm writing an app to deploy to googele app engine, and so I'm using JPA. Here are the cons I've encountered: 1) JPA mandates conventions on model class code. In scala this usually means any persistent fields are public vars, which is theoretically dangerous (and generally frowned upon). I personally have mixed feelings on mutability in domain entity classes (Mapper entities are also mutable), and there is ongoing discussion on this topic. 2) Collections in JPA are java.util, not scala. This means that you can't transform them as you can with the usual higher order functions found scala collections (map, filter, etc), unless you use implicit conversions (usually via jcl). Implicits make your code feel like scala code, but I'm not a fan of having conversions rampant for this, and I don't like to explicitly pollute my namespaces by importing jcl. 3) JPA is not monadic. JPA entities are from java land, and in java land you represent optional members with null. Idiomatic scala doesn't do nulls because they wreak havoc at runtime. Always. Consider an entity Person with a member middleName. In your domain it isn't required, and so you allow null at the database level. In a JPA impl you allow this to be null, and now everywhere you reference middleName, you absolutely must test for null. In scala you use the Option monad, so middleName is no longer of type String but Option[String]. NPEs are now effectively impossible. chris Oscar Picasso wrote: I am starting to (re)learn lift and wondering which persistence mechanism I should use: Mapper, Record or JPA? It should be ready for for prime time and fit perfectly with the lift / scala way of doing things but still be powerful enough. * I have read that Mapper has some limitations like when dealing with complex object graphs, many to many relationships etc. * I don't know Record but I have two concern with it: is it mature enough? I have read that David is not satisfied with Record especially on the mutability front. What are the practical implications of not having immutability for Record? * JPA: I practice it on a daily base and it's very good but I feel like there is between JPA and lisft / scala. Not that I have thought a lot about it, it's just a feeling. I have also read there are some issues with the Hibernate Validators. Could some people on the list be kind enough to summarize the pros and cons of using any of these solutions at this stage? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
[Lift] Generic Form Customization
Hi, The out of the box form generated by a Mapper looks like that: form action=/expense/edit method=post table ... tr tddescription/td tdinput name=F3167038127803C0 type=text maxlength=100 value= //td /tr ... tr tdnbsp;/td tdinput value=Create type=submit //td /tr /table /form I would like however something like that: form action=/expense/edit method=post table ... tr tdlabel for=expense_descriptionExpense Description/label/td !-- The localized label -- tdinput id=expense_description name=F3167038127803C0 type=text maxlength=100 value= //td /tr ... tr tdnbsp;/td tdinput value=Create type=submit //td /tr /table /form As an exercise I just tried to add the id attribute to the field element: object description extends MappedString(this, 100) { override def fieldId = uniqueFieldId.toOption.map(Text(_)) } However I want to do this kind of customization to all the fields without overriding the fieldId method in each of them. I thought about writing a mixin trait with the fieldId method and having all my fields extends this mixin. Is this the right approach? If so does this mixin trait needs to extends MappedField and what should be its signature? These are some basic questions, but I have not programmed in scala since quite a long time so I am a little confused about the right approach. Or maybe there is a better idea than using a mixin? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
[Lift] Re: Generic Form Customization
Ok I think I got it: trait CustomMappedField[F, T : Mapper[T]] extends MappedField[F, T] { override def fieldId = uniqueFieldId.toOption.map(Text(_)) } object description extends MappedString(this, 100) with CustomMappedField[String, Expense] It works but I still don't like the fact that I need to write CustomMappedField[String, Expense] while it's already known that the description object inherits from MappedField[String, Expense]. There should be something more elegant. On Mon, Nov 23, 2009 at 1:11 AM, Oscar Picasso oscarpica...@gmail.comwrote: Hi, The out of the box form generated by a Mapper looks like that: form action=/expense/edit method=post table ... tr tddescription/td tdinput name=F3167038127803C0 type=text maxlength=100 value= //td /tr ... tr tdnbsp;/td tdinput value=Create type=submit //td /tr /table /form I would like however something like that: form action=/expense/edit method=post table ... tr tdlabel for=expense_descriptionExpense Description/label/td !-- The localized label -- tdinput id=expense_description name=F3167038127803C0 type=text maxlength=100 value= //td /tr ... tr tdnbsp;/td tdinput value=Create type=submit //td /tr /table /form As an exercise I just tried to add the id attribute to the field element: object description extends MappedString(this, 100) { override def fieldId = uniqueFieldId.toOption.map(Text(_)) } However I want to do this kind of customization to all the fields without overriding the fieldId method in each of them. I thought about writing a mixin trait with the fieldId method and having all my fields extends this mixin. Is this the right approach? If so does this mixin trait needs to extends MappedField and what should be its signature? These are some basic questions, but I have not programmed in scala since quite a long time so I am a little confused about the right approach. Or maybe there is a better idea than using a mixin? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
Re: [Lift] Re: scala eclipse plugin with lift
I am finally able to use the plugin. I noticed the plugin version is 2.7.7 and that the lift project scala version was 2.7.3 so I changed the scala version to 2.7.7 It works now. Actually I am not sure this was the change that made it work because just before I restarted eclipse and it already seemed to work. On Wed, Nov 18, 2009 at 7:27 AM, Miles Sabin mi...@milessabin.com wrote: On Wed, Nov 18, 2009 at 12:17 PM, Marius marius.dan...@gmail.com wrote: It interpreted my scala code as java out of the sudden. I tried the JDT weving trick and nothing. If you had JDT weaving enabled then only way you would see Scala code interpreted as Java is if the .project file included the Java builder. That only happens when you use Maven to generate your project metadata. So please report this issue to whoever is responsible for that Maven behaviour. Cheers, Miles -- Miles Sabin tel: +44 (0)7813 944 528 skype: milessabin http://www.chuusai.com/ http://twitter.com/milessabin -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
Re: [Lift] scala eclipse plugin with lift
Hi David, Thanks for your welcome. I hope to have now a little more time to take a deeper look at lift. I am delighted to see how much the community as grown around this exciting framework. I am really impressed by both the framework and the community. Congratulations. Oscar On Tue, Nov 17, 2009 at 10:40 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Hey Oscar, Welcome back to Lift-land... haven't seen you in almost two years. Thanks, David On Tue, Nov 17, 2009 at 6:56 PM, Oscar Picasso oscarpica...@gmail.comwrote: Hi, I did import a new created lift project in a eclipse as a maven project. The project is recognized as a scala project but there is neither syntax syntax highlighting nor auto completion while it works fine, in the same workspace when I create directly a scala project with the scala eclipse plugin. Any idea? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
[Lift] Basic view question
Hi, I just created a simple project with the maven archetype and tried to add a view as explained in the The Definitive Guide to Lift. package org.opicasso.two.view import net.liftweb.http.LiftView import scala.xml.NodeSeq class SomeView extends LiftView { override def dispatch = { case show = doShow _ } def doShow () : NodeSeq = { lift:surround with=default at=content h1hello/h1 /lift:surround } } The Boot class was not changed: package bootstrap.liftweb import _root_.net.liftweb.util._ import _root_.net.liftweb.http._ import _root_.net.liftweb.sitemap._ import _root_.net.liftweb.sitemap.Loc._ import Helpers._ /** * A class that's instantiated early and run. It allows the application * to modify lift's environment */ class Boot { def boot { // where to search snippet LiftRules.addToPackages(org.opicasso.two) // Build SiteMap val entries = Menu(Loc(Home, List(index), Home)) :: Nil LiftRules.setSiteMap(SiteMap(entries:_*)) } } However when trying http://localhost:8080/SomeView/show I get The Requested URL /SomeView/show was not found on this server Is there something else that needs to be done? Is the url correct? Oscar -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
[Lift] scala eclipse plugin with lift
Hi, I did import a new created lift project in a eclipse as a maven project. The project is recognized as a scala project but there is neither syntax syntax highlighting nor auto completion while it works fine, in the same workspace when I create directly a scala project with the scala eclipse plugin. Any idea? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
[Lift] Re: a plea for documentation
Which book are you talking about? I didn't know that they were already chapters of a lift book we could read. On Wed, Nov 26, 2008 at 9:15 PM, David Stein [EMAIL PROTECTED] wrote: I started looking at a few chapters a while ago, but they were more outlines at the time. Somehow I missed the chapters which are actually pretty comprehensive, like the one on JPA. Very much looking forward to this! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Scala 2.7.2 and documentation?
Two book? Wow! Any idea when they are expected? Oscar On Mon, Nov 17, 2008 at 1:51 PM, David Pollak [EMAIL PROTECTED] wrote: On Mon, Nov 17, 2008 at 10:33 AM, tacobandit [EMAIL PROTECTED] wrote: I noticed mvn pulled a new lift today and it seems it's still not working with scala 2.7.2? I'm not worried about it or anything just wondering if I'm doing something wrong since I think David Pollack remarked that once 2.7.2 final was released lift would be immediately updated... I didn't same immediately, I said soon after. Upgrading any software is a non-trivial task. There is a 2.7.2 branch of Lift. It's been maintained in parallel with Scala's 2.7.2 development. Lift depends on more than just Scala... it also depends on Specs and ScalaCheck. These packages were upgraded to Scala 2.7.2-final over the weekend. Expect Lift to be updated to 2.7.2-final this week. Also, I'm wondering if there's a master plan for documentation. I think that's a huge blocker for wide lift adoption. I mean not just the lack of hand-holding tutorial type stuff but even in the scaladocs... If they're anything like me, people pretty much have to look at the source code to learn how to use lift... fortunately the source is clear and easy to read so it's not so bad, and i'm happy with it... but I just have a curiosity if addressing the documentation issue is on the horizon? There are two Lift books in the works. As part of the API clean-up tasks, we're writing more ScalaDocs. It's a long process, but expect reasonable documentation when Lift goes 1.0. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Collaborative Task Management http://much4.us 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Recommended tools ?
I have tried it with a simple project. When importing the build path and dependencies are ok. But when I try to run or debug the application directly from Netbeans it actually launches: NetBeans: Executing '/opt/maven/bin/mvn -Dexec.args=-Xdebug -Djava.compiler=none -Xnoagent -Xrunjdwp:transport=dt_socket,server=n,address=34404 -classpath %classpath ${packageClassName} -Djpda.listen=true -Djpda.address=34404 -Dexec.executable=java process-classes org.codehaus.mojo:exec-maven-plugin:1.1:exec' And gives me the error: [compiler:compile] Nothing to compile - all classes are up to date [scala:compile {execution: default}] Compiling 1 source files to /home/oscar/netbeans/mavos/target/classes [WARNING] /home/oscar/netbeans/mavos/src/main/scala/org/mavos/Main.scala:10: error: identifier expected but 'object' found. [WARNING] object Main { [WARNING] ^ [WARNING] one error found Here I would prefer the run to be done as like with a scala project directly created with Netbeans. I thought I could configure it on right-click project Properties but with a maven project a right click on a project raise an error. (I just sent more details on the scala-tools list) I guest it's a problem with the version of either NetBeans or the scala or maven plugins. Versions do you use for: - NetBeans - The Maven plugin - The scala plugin. On Sun, Nov 16, 2008 at 3:59 PM, David Bernard [EMAIL PROTECTED]wrote: Maven + Netbeans (+ maven module/plugin for netbeans) + scala work like charm. after installing the netbeans maven plugin you simply open your maven project like native netbeans project. If you open a multi-module maven project, then you could see maven sub-project into the modules section of your project : double clik = open sub-project like a native netbeans modules,... I didn't try m2eclipse or Q4E since 1 year, and under eclipse I use external tools to run maven (for java and scala project). But the maven plugin for netbeans is the best integration I see. On Sun, Nov 16, 2008 at 01:38, David Pollak [EMAIL PROTECTED] wrote: I do maven from the command line. DavidB knows about maven in netbeans On Nov 15, 2008 4:20 PM, Derek Chen-Becker [EMAIL PROTECTED] wrote: Out of curiosity, how does Netbeans handle Maven projects, particularly ones with nested modules? The most recent Eclipse plugin still has some warts, but it generally seems to work OK if I set up the .classpath file properly to point at all of the source folders. Thanks, Derek On Sat, Nov 15, 2008 at 11:25 AM, David Pollak [EMAIL PROTECTED] wrote: I've bee... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Recommended tools ?
Derek, With Java, Eclipse handles very well multi modules with the help of m2eclipse. Just checkout a multimodule project as a Maven project from subversion and it will create all the required projects in eclipse. No need to use eclipse:eclipse. With scala that's another story I have never had success using scala + eclipse + maven, even for simple projects, whether with m2eclipse, Q/IAM or without any of them. If you have a setup, example of pom and steps by step actions required to make it work I would appreciate. I have already got help from other users but I didn't myself never make it work. The main issue being that at the beginning everything seems to work fne and then suddenly when I try to launch a scala application (not a lift application) from eclipse it stops working. On Sat, Nov 15, 2008 at 7:20 PM, Derek Chen-Becker [EMAIL PROTECTED]wrote: Out of curiosity, how does Netbeans handle Maven projects, particularly ones with nested modules? The most recent Eclipse plugin still has some warts, but it generally seems to work OK if I set up the .classpath file properly to point at all of the source folders. Thanks, Derek On Sat, Nov 15, 2008 at 11:25 AM, David Pollak [EMAIL PROTECTED] wrote: I've been using netbeans very succesfully. I recomend it. Thanks, David On Nov 15, 2008 8:53 AM, Oscar Picasso [EMAIL PROTECTED] wrote: Hi, Which tools would you recommend to work for a lift project, and more generally with scala? The requirement being that the project also uses maven. I have tried the Eclipse plugin a number of times and I found it too unstable. The last Intellij IDEA plugin is decent, I was considering switching to IDEA. Howver I ran lately in some issues. The more important being that if I define implicits somewhere their containing folder keep loading... forever. I could use emacs but I would like some pretty formatting, code completion and error checking. On a scala list post I read David P. explaining that there are a number of decent tools to work with lift. Which ones? BTW: the lift wiki search does not work. It always returns a *No such special page*. Oscar --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Two years loving Scala
For me: + very nice language: it's really a pleasure to code with scala + very nice community: high quality discussions, very helpful, very smart people, very clever answers without being condescending, very responsive + good documentation (Programming with Scala) + a very good web framework (lift) + interesting testing libs: specs, ScaleCheck... - tools, tools, tools: eclipse plugin works when it wants which is not often - integration with java infrastructure could be better : lots of trials and errors to try integrate maven + eclipse + scala for example (and still not working very well) - free documentation should be also in html - is the scala community shrinking? it seems that the traffic in the scala has decreased since about on year ago (on the other hand lift traffic seems to have increased) - not much evolution on the content of the scala site (besides the look and feel) - compiling is too slow In my opinion the +s are far more important than the -s, but the -s could by a real barrier to a wider popularity. On Thu, Nov 13, 2008 at 4:55 PM, David Pollak [EMAIL PROTECTED] wrote: Folks, I just did a blog post about my two years in the Scala community. http://blog.lostlake.org/index.php?/archives/83-Two-years-loving-Scala.html Thanks, David -- Lift, the simply functional web framework http://liftweb.net Collaborative Task Management http://much4.us 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---