Re: [Lift] Feature Request: Header offset in lift-textile

2009-12-13 Thread Timothy Perrett
Why on earth would you want that? Wouldn't that fundamentally break the standard textile notation?! If you want a h2 then just use h2. Cheers, Tim On 12 Dec 2009, at 20:39, tommycli wrote: It'd be nice to have a header-offset feature in lift-textile. That is, if header_offset=1 gets

[Lift] Fake Data Driven Development

2009-12-13 Thread ngocdaothanh
Hi, I want to ask if there is a Scala or Java library to auto-generate fake data like this: http://faker.rubyforge.org/ I searched but could not find one. A library like this helps development a lot. For web projects I have a development method which I call Fake Data Driven Development: 1.

Re: [Lift] Fake Data Driven Development

2009-12-13 Thread Timothy Perrett
It might be worth just asking this on the scala-user list over at EPFL... im not aware of anything, but you'll be talking to a broader Scala audience there. Cheers, Tim On 13 Dec 2009, at 10:50, ngocdaothanh wrote: Hi, I want to ask if there is a Scala or Java library to auto-generate

[Lift] Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Dave Briccetti
For a lightning talk at Bay Area Scala Enthusiasts at Twitter HQ Monday, I will show BirdShow, a Lift application that shows photos from Flickr. The current instantiation is a nature photography Web site. Would some of you Lift experts be willing to review the code and comment on the application?

Re: [Lift] Fake Data Driven Development

2009-12-13 Thread Indrajit Raychaudhuri
Hi Ngoc, Will this work for you? http://databene.org/databene-benerator http://databene.org/maven-benerator-plugin Admittedly, faker is simpler to setup compared to benerator however. Cheers, Indrajit On 13/12/09 4:20 PM, ngocdaothanh wrote: Hi, I want to ask if there is a Scala or Java

Re: [Lift] Fake Data Driven Development

2009-12-13 Thread Alex Boisvert
ScalaCheck http://code.google.com/p/scalacheck/ has a nice API for generating data where you can plug your own generators. http://code.google.com/p/scalacheck/wiki/UserGuide It doesn't directly generate data to the database, XML, or any other specific format but you can use it to feed data into

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Timothy Perrett
On the whole, looks quite tidy. However, what made you go for the Loggable trait? Why dont you use lift's backed in logging utilities? The only other thing possibly to consider would be parallel executing snippets - im not sure if its 100% applicable for your use case, but maybe it could work for

[Lift] Re: Feature Request: Header offset in lift-textile

2009-12-13 Thread tommycli
A use case is inline page previews for entries - whereas on the full page there should be full headers, on the preview, h1 ought to become h3 etc. On Dec 13, 2:20 am, Timothy Perrett timo...@getintheloop.eu wrote: Why on earth would you want that? Wouldn't that fundamentally break the standard

Re: [Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Indrajit Raychaudhuri
Very tidy indeed! I like the style and formatting :) Some more points in addition to what Tim mentioned: 1. The application is based on Lift 1.0 and Scala 2.7.3. Moving to Lift 1.1 (with Scala 2.7.7) would be recommended. Lift 1.1-SNAPSHOT should be fine or wait for the Lift 1.1-M8

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Timothy Perrett
The point about snippets is a subjective one - it depends what Dave is trying to show in his presentation my thought would be to leave them as they are because it makes lift appear simpler (that is, there is auto-wire-up). However, for production, stateless snippets should be objects with

[Lift] Goals for type and method renaming for Lift 2.0 - was: Open discussion on Lift Name Calling practices

2009-12-13 Thread Kris Nuttycombe
To this point, the only goals that have been recommended for this effort are those that I've noted below: 1) Remove ambiguity wherever possible! There are a number of places where very similar names are used to refer to utterly different things. 2) As an aide removing ambiguity, consider

Re: [Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Indrajit Raychaudhuri
On 14/12/09 12:06 AM, Timothy Perrett wrote: The point about snippets is a subjective one - it depends what Dave is trying to show in his presentation my thought would be to leave them as they are because it makes lift appear simpler (that is, there is auto-wire-up). Point taken.

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Indrajit Raychaudhuri
Dave, I have updated your application to Lift 1.1-SNAPSHOT on my github fork [1] and sent you a pull request. This basically covers #1 thru' #4 in my list. Feel free to merge if it interests you. [1] http://github.com/indrajitr/bird-show Cheers, Indrajit On Dec 14, 12:25 am, Indrajit

Re: [Lift] Re: (Maven problem?) Char encoding problem using S.?

2009-12-13 Thread Jeppe Nejsum Madsen
Indrajit Raychaudhuri indraj...@gmail.com writes: [...] FWIW, PropertyResourceBundle uses properties.load(InputStream) which assumes ISO-8859-1 (Latin1) encoded stream. In Java 6, however, you have properties.load(Reader) which does not have this limitation. Oh didn't know about that,

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Dave Briccetti
Thank you, Tim and Indrajit! I changed the logging, pulled and pushed Indrajit’s changes, and I’m now studying the rest of the suggestions. I set LiftRules.enableLiftGC = false, simply to avoid the client- server interactions that from the point of view of a user don’t seem necessary, and, in

Re: [Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Indrajit Raychaudhuri
Cool Dave! Superb pictures, btw. On 14/12/09 1:34 AM, Dave Briccetti wrote: Thank you, Tim and Indrajit! I changed the logging, pulled and pushed Indrajit’s changes, and I’m now studying the rest of the suggestions. I set LiftRules.enableLiftGC = false, simply to avoid the client- server

[Lift] Jetty/Derby, unable to redeploy hot changes (FIXED)

2009-12-13 Thread joseph hirn
I just started looking into lift today but I ran into an issue where I could not make hot changes to class files without having to restart jetty because Derby would complain it was already bound. I was searching around on here and found this issue:

[Lift] Re: About the performance

2009-12-13 Thread DMB
This makes me wonder how these number compare to other Java frameworks as well as to Mono XSP. It's hard to do an apples to apples comparison with these things, but on the Microsoft side I've seen ASP.NET serve way more pages per second than that (2-3x), on what would now be considered outdated

Re: [Lift] Re: About the performance

2009-12-13 Thread Timothy Perrett
I think you would find asp.net mvc to be slower... You can't compare lift to serving a single code behind page in dont net; asp.net mvc has less features but would be a closer comparison. Lift might not be perfect (what is?) and as we move forward we'll be making optomizations to the core

Re: [Lift] Re: About the performance

2009-12-13 Thread Marcin Mielżyński
DMB pisze: This makes me wonder how these number compare to other Java frameworks as well as to Mono XSP. It's hard to do an apples to apples comparison with these things, but on the Microsoft side I've seen ASP.NET serve way more pages per second than that (2-3x), on what would now be

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Dave Briccetti
I discovered I need a way to perodically reload certain cached data from Flickr. What sort of timer/actor/thread should I use. Every hour or so I want to call a method from Flickr.scala on each FlickrUser object. -- You received this message because you are subscribed to the Google Groups Lift

Re: [Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Alex Boisvert
One comment I would make about Parallelizer is that it creates a new thread pool every time it's invoked. This isn't very efficient but more importantly, it's somewhat reckless. Imagine if your home page or your search function are invoked simultaneously by 10 users (or more). The application

Re: [Lift] Re: Multi-Ćolumn MappedField

2009-12-13 Thread Naftoli Gugenheim
I have somewhere that I do something like: def table: ... = ... // calculate which is the lookup table. probably should be a lazy val object value extends LongMappedMapper(this, table) - Joernjoern.bernha...@gmx.net wrote: I believe it's a bit more

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-13 Thread Naftoli Gugenheim
Are FKs not created using a Driver that supports it? schemify calls ensureConstraints which seems to do it, no? - Derek Chen-Beckerdchenbec...@gmail.com wrote: If FKs are enabled then the spec fails because you're intentionally trying to break the joins by

Re: [Lift] MappedField Callback(s)

2009-12-13 Thread Naftoli Gugenheim
Isn't there LifecycleCallback or something for this? - Peter Robinettpe...@bubblefoundry.com wrote: MetaMapper has a bunch of nice callback methods (afterCreate, beforeValidation, etc) that you can hook into. Recently I've found myself wanting one on

Re: [Lift] Scala to JavaScript DSL ...

2009-12-13 Thread Naftoli Gugenheim
Looks like a neat approach. It would be great if it was possible to get a better syntax though. It might not be worth the effort or stable enough, but have you seen scala.reflect.Code? scalac can compile code into an AST. - Marius

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-13 Thread Naftoli Gugenheim
Other advantages of a DSL include type safety and typo safety. :) - Mariusmarius.dan...@gmail.com wrote: That is certainly one way to go but personally I'm not at all a fan of this string literals approach,. For instance if Scala would not have had built in

Re: [Lift] Jetty/Derby, unable to redeploy hot changes (FIXED)

2009-12-13 Thread Tim Nelson
I had the same problem while using H2. I solved it by disposing the db connections when the servlet is destroyed. I wrote a gist about it here: http://gist.github.com/166687 I don't think I've ever seen your solution, which might be a better way to handle it. Tim On Sun, Dec 13, 2009 at 3:41

Re: [Lift] Goals for type and method renaming for Lift 2.0 - was: Open discussion on Lift Name Calling practices

2009-12-13 Thread Naftoli Gugenheim
I agree very strongly that this is the principle goal. A good name expresses what it refers to succintly, and if that is not enough to inform one exactly what it is, once one learns what it is then he sees how obvious it is from the name and it is an efficient, effective reminder. (If something

[Lift] Re: About the performance

2009-12-13 Thread DMB
That's a common misconception among Java folks. Leaving aside the relative merits of the various web frameworks, .NET runtime is about 10% faster on Windows in steady state than Sun Server JRE, and it uses half as much RAM to boot. Mono is slower than JRE (aside from app start-up times, which are

[Lift] Re: About the performance

2009-12-13 Thread DMB
code behind in dot net suck In what way? :-) Code behind has been gone for years now. It's code beside now -- implemented as a partial class. Your ASPX page gets compiled into a class, and code beside simply implements a partial class that uses the controls defined in the page. On Dec 13, 2:31 

Re: [Lift] Jetty/Derby, unable to redeploy hot changes (FIXED)

2009-12-13 Thread Alex Boisvert
Yes, putting any JDBC driver into the container's classpath (i.e., Jetty) is the better way. Otherwise, if you put the driver into the .war, you'll most likely end up with class / permgen leakage if you redeploy your webapp. (Because java.sql.Driver holds a reference to all loaded drivers)

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Dave Briccetti
Very helpful suggestions. Thanks. How can I hook into Web app shutdown/undeployment so I can shut down the thread pool? -- 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

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-13 Thread Alex Boisvert
On Sat, Dec 12, 2009 at 11:06 AM, Marius marius.dan...@gmail.com wrote: That is certainly one way to go but personally I'm not at all a fan of this string literals approach,. For instance if Scala would not have had built in XML support using XML as string literals Lift would probably loose

Re: [Lift] Scala to JavaScript DSL ...

2009-12-13 Thread Alex Boisvert
scala.reflect.Code (aka expression trees / AST manipulation) would actually be great -- what was proposed was far from it, though. As I understand it, this approach has not advanced in about 2 years. I'd be happy to hear if it was a viable option, even if only on 2.8. alex On Sun, Dec 13,

Re: [Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Alex Boisvert
Use LiftRules.unloadHooks.append(myShutdownHook) From LiftRules.scala: /** * Hooks to be run when LiftServlet.destroy is called. */ val unloadHooks = RulesSeq[() = Unit] alex On Sun, Dec 13, 2009 at 6:45 PM, Dave Briccetti da...@davebsoft.com wrote: Very helpful suggestions. Thanks.

[Lift] Re: Jetty/Derby, unable to redeploy hot changes (FIXED)

2009-12-13 Thread joseph hirn
Yeah the dependencies section of Jetty is pretty nifty. I had this same problem using Tibco messaging tibrvj.jar in my war causing jetty fail when reloading an application. In the case of Tibco I had to still keep it as a regular dependency with scopeprovided/scope so that I could compile but I

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-13 Thread Dave Briccetti
Great. Changes made to Parallelizer to use a single thread pool. Thanks, and hope to see you Monday. -- 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

[Lift] Radio labels

2009-12-13 Thread Todd
Looking to properly label my radios with label for=inputid/ labelinput id=inputid /. Here's my current snippet: def create(xhtml: NodeSeq) : NodeSeq = { def submitHandler() = { S.redirectTo(/createSuccess?name= + name.is); } var chosenMethod:

Re: [Lift] Re: Jetty/Derby, unable to redeploy hot changes (FIXED)

2009-12-13 Thread Indrajit Raychaudhuri
On 14/12/09 8:54 AM, joseph hirn wrote: Yeah the dependencies section of Jetty is pretty nifty. I had this same problem using Tibco messaging tibrvj.jar in my war causing jetty fail when reloading an application. In the case of Tibco I had to still keep it as a regular dependency

Couldn't start SessionMaster ping error; was: [Lift] Re: odd ajax issue (works every other time)

2009-12-13 Thread O'Rorke Paul
Hi: I am still getting Couldn't start SessionMaster ping errors when I shut down with a control C. Is this just something to be expected on shutting down that way? or do I need to edit my pom.xml and change scanIntervalSeconds5/scanIntervalSeconds to scanIntervalSeconds0/scanIntervalSeconds ?

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-13 Thread Derek Chen-Becker
Currently ensureConstraints calls DriverType.supportsForeignKeys_?, defaulting to false. The ticket that I'm working on is because none of the drivers seem to override that. The current MappedManyToMany throws an FK violation exception because it tries to delete one side of the Many-To-Many

[Lift] lift-textile misprocesses a list without a preceding empty line

2009-12-13 Thread tommycli
The below example fails to render a list in lift-textile, but works in the reference implementation (http://textism.com/tools/textile/ index.php). Lists work in lift-textile only if there is an empty line preceding it, but this is a deviation from the reference implementation. Example follows:

Re: [Lift] Goals for type and method renaming for Lift 2.0 - was: Open discussion on Lift Name Calling practices

2009-12-13 Thread Heiko Seeberger
2009/12/13 Kris Nuttycombe kris.nuttyco...@gmail.com To this point, the only goals that have been recommended for this effort are those that I've noted below: 1) Remove ambiguity wherever possible! There are a number of places where very similar names are used to refer to utterly different

Re: [Lift] Goals for type and method renaming for Lift 2.0 - was: Open discussion on Lift Name Calling practices

2009-12-13 Thread Heiko Seeberger
And here is another one: 6) Use names related to the nature of the thing being named: We should be able to know what a type is or a method does from reading its name. Heiko My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org

[Lift] Re: Scala to JavaScript DSL ...

2009-12-13 Thread Marius
On Dec 14, 4:54 am, Alex Boisvert alex.boisv...@gmail.com wrote: On Sat, Dec 12, 2009 at 11:06 AM, Marius marius.dan...@gmail.com wrote: That is certainly one way to go but personally I'm not at all a fan of this string literals approach,. For instance if Scala would not have had built in