[Lift] Re: all page URLs appended with ;jsessionid=knq01t90ajh7

2009-09-19 Thread Lee Mighdoll
For jetty, you might also try the following inside your web.xml webapp
section:

  context-param
param-nameorg.mortbay.jetty.servlet.SessionURL/param-name
param-valuenone/param-value
  /context-param

see:  http://docs.codehaus.org/display/JETTY/SessionIds

Lee

--~--~-~--~~~---~--~~
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] timestamp versioning for javascript includes

2009-04-29 Thread Lee Mighdoll
I'm trying to avoid having to clear the browser cache when I change a
javascript file.

One approach is to append a timestamp to the script src tag in the html
file.

  script id=json src=/classpath/json.js type=text/javascript/

becomes:

  script id=json src=/classpath/json.js?*12341234*
type=text/javascript/

I'm told rails uses this approach.  Is there already a handy way to do this
in lift?  Or is there a better way?

Happy to try and make a snippet for this if it's useful for others.

Lee

--~--~-~--~~~---~--~~
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: timestamp versioning for javascript includes

2009-04-29 Thread Lee Mighdoll

 I'd rather have something like:

 /classpath/date_2009_04_29_18_20/json.js



 There are a couple of advantages:

- It's human readable

 Readable is worth a few bytes, I agree.   I like the date_ prefix too, it
leaves room for using a hash approach at some future date.


-
- It's better for caching as the browser can continue to cache the file
rather than making an HTTP request because of the params

 I think the browsers cache urls with params... a quick glance at the rails
docs suggest they expect these requests to be cached, though I haven't
tested it mysolf.

I'd imagine this also needs to work for non-/classpath served files.  Does
that push us back to the params style?

Happy to try and make a snippet for this if it's useful for others.


 Sure.


Glad to have a way to help.  Heading on vacation now, I'll give it a try
next week.

--~--~-~--~~~---~--~~
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: timestamp versioning for javascript includes

2009-04-29 Thread Lee Mighdoll
 I think the browsers cache urls with params... a quick glance at the rails
 docs suggest they expect these requests to be cached, though I haven't
 tested it mysolf.

 I'd imagine this also needs to work for non-/classpath served files.  Does
 that push us back to the params style?


 No, because you can rewrite the incoming URLs back to what they should be.


So if I understand you correctly, /date_{date_format} will become magic
anywhere in url request paths.  so these work too:
classpath/js/date_2009_04_29_18_20/json.s   or
/foo/bar/date_2009_04_29_18_20/json.s.

That's ok with me, though it's a bit more aggressive to mess with the
segments of the mapping of the url path to file system path.

Potentially could use dates on directories then too, although I'm not quite
sure why.  e.g.  foo/date_2009_04_29_18_20/bar/json.js would check the
modification date of the bar directory..

Lee

--~--~-~--~~~---~--~~
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] sync posted, how to comet?

2009-04-28 Thread Lee Mighdoll
I've posted a first snapshot of the jSync server (and the corresponding
javascipt client) here on
githubhttp://github.com/mighdoll/jsync/tree/master.


jSync synchronizes trees of objects between javascript and scala.  jSync is
not complete enough for use yet, but I'm pleased with the approach so far.
I think it'll be a great way to write rich client apps.  You can try running
the tests pretty easily:
  $ git clone git://github.com/mighdoll/jsync.git
  $ cd jsync  mvn install
  $ cd server  mvn jetty:run
  $ firefox http://localhost:8080/jsync/test/tests.html

If you're interested in this kind of thing do poke around the code -- I'd
welcome comments.

jSync uses lift of course, but I could use some help...

For example, how can I wire in a comet connection?  The current
implementation uses http very simply.  The javascript client sends http POST
messages to /sync, and looks for one or more responses in the http
response.  I've currently wired it in via LiftRules.dispatch.prepend(), but
I'm sure that's not right.  How do I comet-ify this?

Lee

--~--~-~--~~~---~--~~
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] timestamp versioning for including a javascript file

2009-04-24 Thread Lee Mighdoll
I'm trying to avoid having to clear the browser cache when I change a
javascript file.

One approach is to append a timestamp to the script src tag in the html
file.

  script id=json src=/classpath/json.js type=text/javascript/

becomes:

  script id=json src=/classpath/json.js?*12341234*
type=text/javascript/

Is there already a handy way to do this in lift (I'm told rails uses this
approach)?  Or is there a better way?  And if not, would this make a good
snippet?

Lee

--~--~-~--~~~---~--~~
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: Cannot access html files other than index.html in GAE using lift

2009-04-23 Thread Lee Mighdoll
Since lift is a servlet filter, can it simply pass through requests for
unmapped html pages and let the web container serve them or send a 404?  I
don't quite understand the security issue, though.

Lee

re: documentation, I tripped on this getting started as well.

On Thu, Apr 23, 2009 at 8:45 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Thu, Apr 23, 2009 at 8:30 AM, Andrew Scherpbier 
 and...@scherpbier.orgwrote:


 Hi kkarad,
 I'm a fellow newbie to lift (and scala) and ran into the same issue.  I
 believe the solution is simple:  You need to create entries in your
 SiteMap for every page.  You'll need to do that in your Boot.scala.
 Make them Hidden if you don't want them displayed in the menu; you still
 need those entries though.

 I suggest reading chapter 5 in the Exploring Lift book that is
 available as a draft PDF.
 BTW, to the authors of that book:  I spent a lot of time trying to
 figure out this exact same issue.  Could you make this more prominent?
 Some examples of using multiple pages would be helpful.  Since the
 SiteMap is so important, I think it would be good to add more coverage
 of it in chapter 3.


 Andrew,

 Thanks for your comments.

 There's a tension in Lift between quick  simple and maintainable 
 secure.  SiteMap is a little heavier weight than simple routing tables (or
 doing things by default).  On the other hand, SiteMap gives you security,
 menu generation, bread crumbs, and much, much more.  Perhaps I'll add
 something to the 404 when running in development mode (or bespin mode).

 Thanks,

 David




 Cheers!

 --Andrew

 kkarad wrote:
  Hi all,
 
  I am new to lift web framework. Recently I started working on a test
  project using google app engine for java and lift. I followed the
  Atsuhiko Yamanaka's instructions and I was able to deploy and run the
  helloworld example on the google app cloud.
 
  The problem I am facing now is that I cannot access deployed html
  files other than the default (index.html). The problem occurs in the
  dev_appserver provided by the google app engine sdk.
 
  For instance, the fileupload.xthml file under the webapp folder cannot
  be accessed using the http://localhost:8080/fileupload [or with the
  suffix]. The error message I get back is: The Requested URL / was not
  found on this server
 
  Due to my lack of lift knowledge I am not able to identify if its a
  lift or gae/j problem. Could you please help me?
 
  Bellow I include the content of web.xml, appengine-web.xml and the
  tree structue of the webapp folder in maven.
 
  web-app
  filter
  filter-nameLiftFilter/filter-name
  display-nameLift Filter/display-name
  descriptionThe Filter that intercepts lift calls/
  description
  filter-classnet.liftweb.http.LiftFilter/filter-class
  /filter
 
 
  filter-mapping
  filter-nameLiftFilter/filter-name
  url-pattern/*/url-pattern
  /filter-mapping
 
  welcome-file-list
  welcome-fileindex.html/welcome-file
  /welcome-file-list
 
  /web-app
 
  
 
  appengine-web-app xmlns=http://appengine.google.com/ns/1.0;
applicationfoo/application
version1/version
system-properties
  property name=in.gae.j value=true /
/system-properties
sessions-enabledtrue/sessions-enabled
static-files
  include path=/style/**.css/
  include path=/images/**.gif/
  include path=/images/**.jpg/
  include path=/script/**.js/
/static-files
  /appengine-web-app
 
  
  /webapp/WEB-INF/web.xml
  /webapp/WEB-INF/appengine-web.xml
  /webapp/fileupload.xthml --- Access fails using the
  http://localhost:8080/fileupload [or with the suffix]
  /webapp/index.html --- Access OK
 
  






 --
 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: Cannot access html files other than index.html in GAE using lift

2009-04-23 Thread Lee Mighdoll
Ah, thanks for the explanation.

Perhaps a site map entry for /static in the default archtetype?

Lee

On Thu, Apr 23, 2009 at 9:51 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Thu, Apr 23, 2009 at 9:48 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 Since lift is a servlet filter, can it simply pass through requests for
 unmapped html pages and let the web container serve them or send a 404?  I
 don't quite understand the security issue, though.


 Security issues:

- Serving turd pages left behind by the developers or from an older
version of the app
- Serving pages that can only be viewed if you're logged in





 Lee

 re: documentation, I tripped on this getting started as well.

 On Thu, Apr 23, 2009 at 8:45 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Thu, Apr 23, 2009 at 8:30 AM, Andrew Scherpbier 
 and...@scherpbier.org wrote:


 Hi kkarad,
 I'm a fellow newbie to lift (and scala) and ran into the same issue.  I
 believe the solution is simple:  You need to create entries in your
 SiteMap for every page.  You'll need to do that in your Boot.scala.
 Make them Hidden if you don't want them displayed in the menu; you still
 need those entries though.

 I suggest reading chapter 5 in the Exploring Lift book that is
 available as a draft PDF.
 BTW, to the authors of that book:  I spent a lot of time trying to
 figure out this exact same issue.  Could you make this more prominent?
 Some examples of using multiple pages would be helpful.  Since the
 SiteMap is so important, I think it would be good to add more coverage
 of it in chapter 3.


 Andrew,

 Thanks for your comments.

 There's a tension in Lift between quick  simple and maintainable 
 secure.  SiteMap is a little heavier weight than simple routing tables (or
 doing things by default).  On the other hand, SiteMap gives you security,
 menu generation, bread crumbs, and much, much more.  Perhaps I'll add
 something to the 404 when running in development mode (or bespin mode).

 Thanks,

 David




 Cheers!

 --Andrew

 kkarad wrote:
  Hi all,
 
  I am new to lift web framework. Recently I started working on a test
  project using google app engine for java and lift. I followed the
  Atsuhiko Yamanaka's instructions and I was able to deploy and run the
  helloworld example on the google app cloud.
 
  The problem I am facing now is that I cannot access deployed html
  files other than the default (index.html). The problem occurs in the
  dev_appserver provided by the google app engine sdk.
 
  For instance, the fileupload.xthml file under the webapp folder cannot
  be accessed using the http://localhost:8080/fileupload [or with the
  suffix]. The error message I get back is: The Requested URL / was not
  found on this server
 
  Due to my lack of lift knowledge I am not able to identify if its a
  lift or gae/j problem. Could you please help me?
 
  Bellow I include the content of web.xml, appengine-web.xml and the
  tree structue of the webapp folder in maven.
 
  web-app
  filter
  filter-nameLiftFilter/filter-name
  display-nameLift Filter/display-name
  descriptionThe Filter that intercepts lift calls/
  description
  filter-classnet.liftweb.http.LiftFilter/filter-class
  /filter
 
 
  filter-mapping
  filter-nameLiftFilter/filter-name
  url-pattern/*/url-pattern
  /filter-mapping
 
  welcome-file-list
  welcome-fileindex.html/welcome-file
  /welcome-file-list
 
  /web-app
 
 
 
 
  appengine-web-app xmlns=http://appengine.google.com/ns/1.0;
applicationfoo/application
version1/version
system-properties
  property name=in.gae.j value=true /
/system-properties
sessions-enabledtrue/sessions-enabled
static-files
  include path=/style/**.css/
  include path=/images/**.gif/
  include path=/images/**.jpg/
  include path=/script/**.js/
/static-files
  /appengine-web-app
 
 
 
  /webapp/WEB-INF/web.xml
  /webapp/WEB-INF/appengine-web.xml
  /webapp/fileupload.xthml --- Access fails using the
  http://localhost:8080/fileupload [or with the suffix]
  /webapp/index.html --- Access OK
 
  






 --
 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









 --
 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

[Lift] Re: developing Scala/Lift using Eclipse

2009-04-21 Thread Lee Mighdoll
I've played a bit with both netbeans 6.7m2 and eclipse 3.4.2 with the 2.7.3
plugin.  I'm currently using eclipse, but I've found it to be fairly
tempermental... I often have to manually do a clean build to get correct
error messages, or reload the file in the editor, and stepping through the
debugger ping pongs up and down a bit.  But when eclipse works, the
turnaround time to restart a lift application is less than five seconds, and
the debugger generally works well.  I'm hoping that the 2.7.4 version of
eclipse will be better.

I had some trouble debugging with netbeans -- I couldn't set scala
breakpoints in some places for example.

The netbeans javascript code editor is the best I've used so far.  Aptana
provides a nice (free) javascript debugging environment for eclipse.

Lee

On Tue, Apr 21, 2009 at 10:16 AM, Kai M. k...@meder.info wrote:




 On Apr 21, 7:10 am, Lee Mighdoll leemighd...@gmail.com wrote:
  On my version, I see a bunch of libraries that start out M2_REPO, and if
 I
  scroll the library window to the right I see that M2_REPO is successfully
  resolved to: - /home/lee/.m2/repository... If you don't see the libraries
  resolved correctly to your repository, Add Variable ..  Configure
  Variables..., gives you the chance to set the M2_REPO.

 thanks alot for this fact. indeed the var was not set. however, after
 setting it up, eclipse does not show any import-errors but i still can
 not navigate into the sources nor do a proper build.
 switching to netbeans right now... i really hope it wont get eclipse-
 like PITA

 +42 for eclipse-screencast ;)

 thanks!
 kai

 


--~--~-~--~~~---~--~~
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: developing Scala/Lift using Eclipse

2009-04-20 Thread Lee Mighdoll
I've seen that problem, though I don't recall exactly when.  Perhaps your
your classpath variables aren't set up correctly?

With your project highlighted in the project explorer, try the following
menu sequence:  Project  Properties  Java Build Path  Libraries.

On my version, I see a bunch of libraries that start out M2_REPO, and if I
scroll the library window to the right I see that M2_REPO is successfully
resolved to: - /home/lee/.m2/repository... If you don't see the libraries
resolved correctly to your repository, Add Variable ..  Configure
Variables..., gives you the chance to set the M2_REPO.

Failing that, here's some other voodoo you might try.
* clean all
* make a phantom change to the M2_REPO variable anyway, then and change it
back.
* reinstall eclipse classic 3.4.2, with the 2.7.3 scala plugin and no other
plugins.

Lee



On Mon, Apr 20, 2009 at 2:40 PM, kmed k...@meder.info wrote:


 Hello all,

 I just started learning Scala and came across Lift. I am using Eclipse
 Ganymede with the Scala-Plugin. How do I fully include the Lift-
 sources to navigate (Strg+Click) into the Lift-Classes?
 Currently Eclipse does not even understand the absolute _root_-package-
 thingy. It's pretty annoying if everything is red and only maven knows
 if it compiles correctly :(
 Any Hint?

 Thanks in advance,
 Kai

 


--~--~-~--~~~---~--~~
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 committers] Re: Meeting

2009-04-17 Thread Lee Mighdoll
I'm currently giving AOP a try
herehttp://github.com/mighdoll/aspecting/tree/master(not in lift).
I was looking for a cleaner way to create objects with
observable properties.  I like that an aspect allows for observable objects
that are idiomatic to use and write, and don't require any extra
boilerplate.


The scala class needs only to add the marker trait Observable.

  class Model extends Observable {
var prop:String = _
  }

Modifications to the instance will then trigger the aspect, notifying
an observer.

val model = new Model()
m.prop = whee

Run that and the test observer sees the change and prints:

change observed example.mo...@6abf2d5e= prop:whee


I'm getting more tempted to use aspectJ because it enables such a
simple and idiomatic
approach to writing model objects that are:
* Concise to write
* Use the normal idioms for working with mutable scala objects.
* Compatible with java libraries, including JPA...


The sources are in src.

To try it yourself, use this script which runs mvn.
./tryMe









On Fri, Apr 17, 2009 at 4:26 AM, Josh Suereth joshua.suer...@gmail.comwrote:



 You can impl AOP using many different techniques. I proposed the
 simplest one (used by Spring, Guice etc.). Using a regular JDK Dynamic
 Proxy (which is the 'build in Java reflect proxy thingy'). What is
 your question?

  
   So, what does AOP give us that can't be done at another phase?

 AOP is not about a specific phase. It can be done at:
 * compile time
 * class load time
 * runtime

 Can be done with:
 * Bytecode mods
 * Generated proxy
 * Dynamic proxy
 * JVM-level hooks

  
 
  Semantics to annotations.
 
  Can you help out with an example?

 Annotate a class with f.e.
 @transactional(type=Required)  class Foo { ..}
 and have all methods in this class being invoked under a transaction
 with Required semantics

 or annotate a specific method
 @transactional(type=RequiresNew)  def foo { ..}
 to get the same behavior for a method only

 Annotations is the way most JEE devs are used to handle these things
 since it is the approach both Spring, Guice, EJB 3 etc. etc. has
 taken.



 I use this all the time in java, because there is no other good option
 for transactions in java.  It's basically the best method.  However I don't
 believe this is the case in Scala, and I'd rather think through the options
 and determine the best one.




 The stuff I have written allow using AspectJ pointcuts as well.
 E.g. f.e. apply transactions to all methods in the service layer:
 match('* com.biz.service.*(..)')

 Or to a specific method:
 match('void Store.buy(Item)')



 Point-cuts after-the fact seem a decent use of transactions.  This is under
 the following assumptions:

 1) Your code will be used in more than one configuration type
 2) Your transaction granularity is determined by the configuration of your
 module, not by the module itself.

 Regarding 2, I think all-to-often real world problems begin to break this
 assumption, making internal business logic and external transaction
 configuration dependent on each other.



 But you could just use call-by-name:

 transactional(TransactionType.Required) { // tx begin
  .. // do stuff in TX
 }  // tx commit or rollback

 But that pollutes the code, makes it harder to change, configure and
 is not declarative.
 Perhaps give the user options?


 How is it not declarative?  I agree that Aspects really do give you better
 configuration abilities for code, however I'm not sure transactions are
 ideally suited for AOP.  I think Java is not ideally suited for
 transactional code, so we use AOP.




 I'd love to hear your response!  This is something I've been mulling
 through recently, and I'm still on the fence for Transactions should be
 done using AOP on the JVM

 -Josh


 


--~--~-~--~~~---~--~~
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: Forms validation formatter

2009-04-03 Thread Lee Mighdoll

 Most web sites I've worked on, there's a default way to display a form and
 that default is encapsulated in the model itself.  This encapsulation does
 not bar you from building your own form renders, but it does give you nice
 default behavior.


I found it odd at first too, to find web rendering methods in the data
object classes.  It doesn't bother me particularly.  But it does seem like
keeping Record narrow would encourage broader use of the Record API.

--~--~-~--~~~---~--~~
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: The Lift 1.1 list

2009-04-01 Thread Lee Mighdoll
Sounds great.

One other feature I'd like (and I think would be widely useful):
* Partitioned service cluster support for a/b testing:  redirect some users
to a different server, e.g. to test the new version

And possibly:
* Backing store support for Voldemort (or does that come through goat
rodeo?)

How'd you get the name goat rodeo?! lol

Lee

On Wed, Apr 1, 2009 at 9:11 AM, David Pollak
feeder.of.the.be...@gmail.comwrote:

 Folks,

 I think we've got our Lift 1.1 list.  If anyone has anything to add, please
 speak up now.

- Improved documentation: better VScalaDoc coverage as well as better
tutorial and cook-book documentation.
- Improved J2EE support including JTA and Portlets.
- Finish Record/Field code with backing store including JDBC, JPA and
Goat Rodeo (what's Goat Rodeo? http://goatrodeo.org)
- Improved client-side JavaScript support and better JavaScript
abstractions.
- Client/Server data synchronization (integrated with Record/Field)
- Improved support for REST.
- Improved performance including caching templates when running in
production mode.
- OSGi support.
- Improved testing framework and better testing support when running in
test mode.
- Implement Servlet 3.0 support.
- HTML 5 and Web Sockets support and integration with Kaazing's Web
Sockets server.  Also, sensing which browser is making the request and
performing optimizations based on that browser's characteristics
(specifically, Chrome and Firefox 3.1 support)

 We will have bug-fix releases of 1.0 along the way and we'll have a release
 off the 1.0 branch when Scala 2.8 is released.

 Feedback is welcome in the next 3 days.

 Thanks,

 David

 --
 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] object sync ideas

2009-04-01 Thread Lee Mighdoll
I've been thinking about object synchronization recently and I think it's
jelled enough now to gather some feedback on a concrete proposal.

The basic idea is that you should be able to modify a javascript object on
the browser, and then see the change automatically reflected to a scala
server object.   Similarly changes made to scala objects should propagate to
the browser, continuously and asynchronously via comet.  Ideally, the
framework should most of the lifting, so that programs on both client and
server feel like they're modifying plain old local objects.  I'm hoping to
help add some version of this to lift!

Some documentation and a cut at the javascript side of the implementation
are here http://github.com/mighdoll/jsync/tree/master.

Suggestions of any kind would be welcome,
Lee

--~--~-~--~~~---~--~~
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: Welcome Jonas Bonér to the Lift committer s

2009-03-30 Thread Lee Mighdoll
Welcome Jonas!

I'd been thinking that some judicious use of aspectJ might be a nice fit for
lift.  Rumor has it you know something about aspects...

Lee


On Mon, Mar 30, 2009 at 11:15 AM, marius d. marius.dan...@gmail.com wrote:


 Welcome Jonas !

 On Mar 30, 7:52 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Folks,
 
  Please join me in welcoming Jonas as a Lift committer.  I had the
 pleasure
  of meeting Jonas as QCon in London this month.  Jonas, Tim, and I went
 out a
  grabbed a few pints and chatted.  I think Jonas has a lot to contribute
 to
  Lift.
 
  So, please join me in welcoming him!
 
  Thanks,
 
  David
 
  --
  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: Welcome Jonas Bonér to the Lift committer s

2009-03-30 Thread Lee Mighdoll
Certainly, maintaining an aspect compiler in the project would be hassle.
Probably not worth debating AOP unless there's a case that really calls for
it.  My guess is that most uses of aspects will eventually get rolled into
scala compiler plugins, anyway, but that aspectJ could be an interim
strategy if there's a use case.

Lee

On Mon, Mar 30, 2009 at 11:53 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:



 On Mon, Mar 30, 2009 at 11:26 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 Welcome Jonas!

 I'd been thinking that some judicious use of aspectJ might be a nice fit
 for lift.  Rumor has it you know something about aspects...


 AspectJ over my dead body.  :-)

 I think AOP is a dangerous and generally very bad thing to do (sorry
 Jonas).  I have not found an application for it in Scala and would need a
 lot of convincing to include it with anything Lift-related.

 Sorry for the wicked negative vibe against AOP... but it's one of my
 hard-core things.



 Lee



 On Mon, Mar 30, 2009 at 11:15 AM, marius d. marius.dan...@gmail.comwrote:


 Welcome Jonas !

 On Mar 30, 7:52 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Folks,
 
  Please join me in welcoming Jonas as a Lift committer.  I had the
 pleasure
  of meeting Jonas as QCon in London this month.  Jonas, Tim, and I went
 out a
  grabbed a few pints and chatted.  I think Jonas has a lot to contribute
 to
  Lift.
 
  So, please join me in welcoming him!
 
  Thanks,
 
  David
 
  --
  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: What a difference a CPU makes

2009-03-25 Thread Lee Mighdoll
Running mvn -o clean install, I get:
 27:04 on my old desktop (1Ghz Sempron 3100, 2gb, software raid 1)
 6:59 on my new laptop (Core2 Duo CPU 9550 2.66Ghz, 4gb, software raid 1)
 4:41 on my new desktop (3Ghz Core2 Quad 9650, 8gb, hardware raid 10)

(I ran mvn clean install first to make sure I had all the artifacts
downloaded.)

Anybody tried a parallel version of maven?

Lee

On Wed, Mar 25, 2009 at 9:22 AM, Timothy Perrett timo...@getintheloop.euwrote:


 Also, what command are you running to constitute a “build”? I usually run:

 mvn clean package install scala:doc

 What are you guys running as im interested in the comparison.

 Cheers, Tim

 On 25/03/2009 12:38, David Pollak feeder.of.the.be...@gmail.com wrote:

 Derek,

 What OS are you running?  The old numbers are worse than my HP 2133 Netbook
 which clocks in at 15 minutes for a full Lift build.

 Thanks,

 David

 On Tue, Mar 24, 2009 at 7:42 PM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:

 I just wanted to throw this out there in case anyone else is considering
 new hardware. I had an Athlon X2 4200+ powering my dev box (6GB of ram, 2 x
 RAID 1 SATA drives) and average build time for a mvn clean install for the
 entire liftweb project was roughly 17 minutes and 45 seconds. I just
 upgraded to a Phenom X3 720 (no change in any other hardware) and my build
 times are now about 7 minutes! I'm guessing that the L3 cache on the Phenom
 is a huge part of that, but I'm sure that the increased clock and newer core
 are helping a bit.

 Derek





 


--~--~-~--~~~---~--~~
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: Welcome Lee Mighdoll to the Lift committers

2009-03-18 Thread Lee Mighdoll
Happy to be able to help.

Lee

On Wed, Mar 18, 2009 at 7:54 AM, David Bernard
david.bernard...@gmail.comwrote:


 Bienvenue !

 On Wed, Mar 18, 2009 at 10:33, Timothy Perrett timo...@getintheloop.eu
 wrote:
 
  Welcome Lee - good to have you on board.
 
  Send me a picture and bio of yourself and i'll add you to the
  liftweb.net team list :-)
 
  Cheers, Tim
 
  On Mar 18, 9:12 am, marius d. marius.dan...@gmail.com wrote:
  Lee, you're most welcomed !
 
  On Mar 18, 5:11 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
 
   Folks,
   I'm pleased to welcome Lee Mighdoll to the Lift committers.  Lee wrote
 the
   brilliant line:
 
   Lift is an expressive and elegant framework for writing web
 applications.
 
   Almost 18 months ago... but he's not a marketing guy, he's a code
 slinger
   and he's going to be slinging some pretty cool code into Lift.
 
   Please join me in welcoming Lee on board!
 
   Thanks,
 
   David
 
   --
   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: Eclipse or Netbeans

2009-03-09 Thread Lee Mighdoll
Clearly old outdated reports :-).  I'll give eclipse a fresh try.

Lee

On Mon, Mar 9, 2009 at 3:29 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Same here. I have a few squiggly errors from time to time but I don't have
 the time to really dig into it (sorry Miles). Otherwise it's been very, very
 stable for me.

 Derek


 On Mon, Mar 9, 2009 at 3:29 PM, Alex Boisvert boisv...@intalio.comwrote:

 I've recently switched back into Eclipse (from jEdit) based on the latest
 plugin version.  Works very well now.

 alex


 On Mon, Mar 9, 2009 at 1:37 PM, Lee Mighdoll leemighd...@gmail.comwrote:

 I switched to NetBeans recently because by all reports the scala plugin
 for NetBeans is more stable.

 I do miss eclipse a bit, but NetBeans has some charm too.  Give it a try.

 Lee


 On Mon, Mar 9, 2009 at 11:10 AM, Larry Morroni la...@morroni.comwrote:


 Hi,
 Just curious which people prefer and why when it comes to Lift/Scala
 development.  I have used Eclipse for awhile but have recently been
 exploring NetBeans.
 Larry

 --
 Larry Morroni (la...@morroni.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: reporting snippet instantiation errors

2009-03-06 Thread Lee Mighdoll
Sure, thanks for taking a look.  My snippet class had something like this:

import scala.io.Source

class MySnippet {
  val file = Source.fromFile(mistypedFileName)
}

(The patched version generates two error log messages in this case.  I
couldn't figure out a small patch to make it just one message.)

Lee

On Fri, Mar 6, 2009 at 7:20 AM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Let me create a branch for this and test it out. Also, could you tell me
 what the error was with your snippet so I can compare current behavior with
 what the patch provides?

 Derek


 On Thu, Mar 5, 2009 at 10:59 PM, Lee Mighdoll leemighd...@gmail.comwrote:

 When I had a bug which threw an exception instantiating my snippet, Lift
 logged a confusing error message: ClassNotFound.  The class was found, it
 just didn't run correctly...

 Enclosed is a patch to show a more informative error message.

 Lee




 


--~--~-~--~~~---~--~~
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: reporting snippet instantiation errors

2009-03-06 Thread Lee Mighdoll
Thanks for both the suggestion and the patch review.

For future reference on submitting patches -- is it best to email a patch or
is there some more savvy git trick?

Lee

On Fri, Mar 6, 2009 at 8:47 AM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 I agree that it's an iffy pattern, but I also think that it's important to
 make error messages as clear as possible. I'm testing the patch right now
 (made a minor mod) and I'll push the branch to github in a little bit for
 review.

 Derek

 On Fri, Mar 6, 2009 at 9:14 AM, Timothy Perrett 
 timo...@getintheloop.euwrote:


 Lee,

 That seems like a pretty dangerous opertation. Wouldn’t you do:

 class MySnippet {
   val file: Box[Source] = tryo {
 Source.fromFile(mistypedFileName)
   }
 }

 In this way you could then use pattern matching and avoid NPE’s

 Cheers, Tim
 - Show quoted text -


 On 06/03/2009 16:04, Lee Mighdoll leemighd...@gmail.com wrote:

 - Show quoted text -

 Sure, thanks for taking a look.  My snippet class had something like this:

 import scala.io.Source

 class MySnippet {
   val file = Source.fromFile(mistypedFileName)
 }

 (The patched version generates two error log messages in this case.  I
 couldn't figure out a small patch to make it just one message.)

 Lee

 On Fri, Mar 6, 2009 at 7:20 AM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:

 Let me create a branch for this and test it out. Also, could you tell me
 what the error was with your snippet so I can compare current behavior with
 what the patch provides?

 Derek


 On Thu, Mar 5, 2009 at 10:59 PM, Lee Mighdoll leemighd...@gmail.com
 wrote:

 When I had a bug which threw an exception instantiating my snippet, Lift
 logged a confusing error message: ClassNotFound.  The class was found, it
 just didn't run correctly...

 Enclosed is a patch to show a more informative error message.

 Lee













 


--~--~-~--~~~---~--~~
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: reporting snippet instantiation errors

2009-03-06 Thread Lee Mighdoll
Thanks for both the suggestion and the patch review.

For future reference on submitting patches -- is it best to email a patch or
is there some more savvy git trick?

Lee

On Fri, Mar 6, 2009 at 8:47 AM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 I agree that it's an iffy pattern, but I also think that it's important to
 make error messages as clear as possible. I'm testing the patch right now
 (made a minor mod) and I'll push the branch to github in a little bit for
 review.

 Derek

 On Fri, Mar 6, 2009 at 9:14 AM, Timothy Perrett 
 timo...@getintheloop.euwrote:


 Lee,

 That seems like a pretty dangerous opertation. Wouldn’t you do:

 class MySnippet {
   val file: Box[Source] = tryo {
 Source.fromFile(mistypedFileName)
   }
 }

 In this way you could then use pattern matching and avoid NPE’s

 Cheers, Tim
 - Show quoted text -


 On 06/03/2009 16:04, Lee Mighdoll leemighd...@gmail.com wrote:

 - Show quoted text -

 Sure, thanks for taking a look.  My snippet class had something like this:

 import scala.io.Source

 class MySnippet {
   val file = Source.fromFile(mistypedFileName)
 }

 (The patched version generates two error log messages in this case.  I
 couldn't figure out a small patch to make it just one message.)

 Lee

 On Fri, Mar 6, 2009 at 7:20 AM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:

 Let me create a branch for this and test it out. Also, could you tell me
 what the error was with your snippet so I can compare current behavior with
 what the patch provides?

 Derek


 On Thu, Mar 5, 2009 at 10:59 PM, Lee Mighdoll leemighd...@gmail.com
 wrote:

 When I had a bug which threw an exception instantiating my snippet, Lift
 logged a confusing error message: ClassNotFound.  The class was found, it
 just didn't run correctly...

 Enclosed is a patch to show a more informative error message.

 Lee













 


--~--~-~--~~~---~--~~
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: url encoded javascript

2009-03-04 Thread Lee Mighdoll
That would be nice, and would work on the page containing the link, but not
for a bookmarklet.  With bookmarklets, the user drags the link to the
browser bookmark menu or bookmark bar.  Then the bookmarklet runs in the
context of whatever page they're currently looking at.

Lee

On Wed, Mar 4, 2009 at 1:38 AM, Viktor Klang viktor.kl...@gmail.com wrote:

 If you use jQuery it's even simpler:

 jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
 )


 On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 Ah, sorry to be so cryptic.  The idea is to create a link containing a
 'javascript:' url that the user can then drag to the browser's bookmark
 bar.  I had something  like this:

 a
 href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src','
 http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
 )
 Bookmarklet
 /a

 But the script is a little tricky to read and edit in that form, so I
 wanted to programmatically convert it from a more readable version.

 I figured out how to run mvn yui-compressor to remove comments from the
 script.  Then I read the compressed version of the script file in the
 snippet code.   If I were to polish it further, I'd next find a java version
 of encodeUriComponent... but it's probably enough for now.

 Lee


 On Sun, Mar 1, 2009 at 2:48 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Lee,
 If you want to include a JavaScript script on the page, the easiest
 mechanism is:

 import net.liftweb.http._
 import js._
 import JsCmds._
 import JE._

 Script(JsRaw(a String containing the raw script))

 This will create a script tag on the page and put a // ![CDATA[ in it
 followed by your script followed by //]] and the closing /script tag.

 If this is not what you were looking to do, please let us know.

 Thanks,

 David

 On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 I'd like to make a bookmarklet snippet.  So I want to take a short
 javascript file, encode it as url, and then include it in a snippet.

 Any suggestions?  Not sure whether to solve this with mvn or lift -- I'm
 new to both.






 --
 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








 --
 Viktor Klang
 Senior Systems Analyst


 


--~--~-~--~~~---~--~~
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: url encoded javascript

2009-03-04 Thread Lee Mighdoll
thx - I'll keep an eye out for that.  I think IE had a max url length of 2K
or so, but I'll watch our for maximum attribute lengths as well.

The basic idea is to use the bookmarklet to load and insert a larger script
-- so hopefully it can stay small.

Lee

On Wed, Mar 4, 2009 at 10:37 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Lee,
 Be careful.  Different browsers have different maximum attribute lengths
 and, at least in the case of Safari, if the maximum length is exceeded,
 Safari will silently discard the attribute.

 Thanks,

 David


 On Wed, Mar 4, 2009 at 10:29 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 That would be nice, and would work on the page containing the link, but
 not for a bookmarklet.  With bookmarklets, the user drags the link to the
 browser bookmark menu or bookmark bar.  Then the bookmarklet runs in the
 context of whatever page they're currently looking at.

 Lee


 On Wed, Mar 4, 2009 at 1:38 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 If you use jQuery it's even simpler:

 jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
 )


 On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 Ah, sorry to be so cryptic.  The idea is to create a link containing a
 'javascript:' url that the user can then drag to the browser's bookmark
 bar.  I had something  like this:

 a
 href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src','
 http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
 )
 Bookmarklet
 /a

 But the script is a little tricky to read and edit in that form, so I
 wanted to programmatically convert it from a more readable version.

 I figured out how to run mvn yui-compressor to remove comments from the
 script.  Then I read the compressed version of the script file in the
 snippet code.   If I were to polish it further, I'd next find a java 
 version
 of encodeUriComponent... but it's probably enough for now.

 Lee


 On Sun, Mar 1, 2009 at 2:48 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Lee,
 If you want to include a JavaScript script on the page, the easiest
 mechanism is:

 import net.liftweb.http._
 import js._
 import JsCmds._
 import JE._

 Script(JsRaw(a String containing the raw script))

 This will create a script tag on the page and put a // ![CDATA[ in
 it followed by your script followed by //]] and the closing /script 
 tag.

 If this is not what you were looking to do, please let us know.

 Thanks,

 David

 On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll 
 leemighd...@gmail.comwrote:

 I'd like to make a bookmarklet snippet.  So I want to take a short
 javascript file, encode it as url, and then include it in a snippet.

 Any suggestions?  Not sure whether to solve this with mvn or lift --
 I'm new to both.






 --
 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








 --
 Viktor Klang
 Senior Systems Analyst









 --
 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: url encoded javascript

2009-03-04 Thread Lee Mighdoll
That's basically what the link above does -- hard to read in compressed
form.  :-).

The server sends an arbitrarily script that's inserted and executed in the
document that the user is currently viewing.  The inserted script does the
real work.

The marklet parameter is issued per user, for security/manageability.  And
the server issued script is inserted into the head not the body to handle
frameset documents.

I suppose I could combine the requested script and marklet parameter into a
bitly url, but I'm not sure it'd save much.  The script insertion code needs
to remain as part of the url so the browser will execute it without
navigating to a new page.

Lee

On Wed, Mar 4, 2009 at 11:24 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Wed, Mar 4, 2009 at 11:09 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 thx - I'll keep an eye out for that.  I think IE had a max url length of
 2K or so, but I'll watch our for maximum attribute lengths as well.

 The basic idea is to use the bookmarklet to load and insert a larger
 script -- so hopefully it can stay small.


 Perhaps the bookmarklet could be kind of like a TinyURL... a durable,
 unique URL that points back to your server.  When the user clicks on the
 link, your server can serve up as much as it needs to.




 Lee


 On Wed, Mar 4, 2009 at 10:37 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Lee,
 Be careful.  Different browsers have different maximum attribute lengths
 and, at least in the case of Safari, if the maximum length is exceeded,
 Safari will silently discard the attribute.

 Thanks,

 David


 On Wed, Mar 4, 2009 at 10:29 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 That would be nice, and would work on the page containing the link, but
 not for a bookmarklet.  With bookmarklets, the user drags the link to the
 browser bookmark menu or bookmark bar.  Then the bookmarklet runs in the
 context of whatever page they're currently looking at.

 Lee


 On Wed, Mar 4, 2009 at 1:38 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 If you use jQuery it's even simpler:

 jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
 )


 On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 Ah, sorry to be so cryptic.  The idea is to create a link containing a
 'javascript:' url that the user can then drag to the browser's bookmark
 bar.  I had something  like this:

 a
 href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src','
 http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
 )
 Bookmarklet
 /a

 But the script is a little tricky to read and edit in that form, so I
 wanted to programmatically convert it from a more readable version.

 I figured out how to run mvn yui-compressor to remove comments from
 the script.  Then I read the compressed version of the script file in the
 snippet code.   If I were to polish it further, I'd next find a java 
 version
 of encodeUriComponent... but it's probably enough for now.

 Lee


 On Sun, Mar 1, 2009 at 2:48 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Lee,
 If you want to include a JavaScript script on the page, the easiest
 mechanism is:

 import net.liftweb.http._
 import js._
 import JsCmds._
 import JE._

 Script(JsRaw(a String containing the raw script))

 This will create a script tag on the page and put a // ![CDATA[ in
 it followed by your script followed by //]] and the closing /script 
 tag.

 If this is not what you were looking to do, please let us know.

 Thanks,

 David

 On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll 
 leemighd...@gmail.com wrote:

 I'd like to make a bookmarklet snippet.  So I want to take a short
 javascript file, encode it as url, and then include it in a snippet.

 Any suggestions?  Not sure whether to solve this with mvn or lift --
 I'm new to both.






 --
 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








 --
 Viktor Klang
 Senior Systems Analyst









 --
 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








 --
 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

[Lift] 1.1 lift idea: sync

2009-03-04 Thread Lee Mighdoll
I've been thinking about browser-server data sync for use in my next
project.  Sync is potentially more interesting than RPC style ajax,
especially for rich clients, and I think sync could be a grand thing to add
to lift.

The basic idea is like this.  A javascript client subscribes to a set of
syncable objects.  The objects are then mirrored on the client and the
server.  Modify a syncable object on the server and the changes are pushed
via comet to the client.  Modify a syncable object in javascript, and the
changes propagate to the server.

I've did some sketches on the javascript side, and I think it'll be a nice
fit there.  Saving changes made on the browser becomes more transparent in
the same way that ORM/JDO makes persisting to a db simpler.  And rich
clients can reuse change notification rather than creating custom ajax
endpoints for server push.

Adobe has a Data Management
Servicehttp://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=data_manage_4.htmlon
this theme.  I'm not sure what the closest thing in the java world
would
be.

Perhaps browser sync would fit in lift as an alternate backend to
record/mapper?

Lee

--~--~-~--~~~---~--~~
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: url encoded javascript

2009-03-03 Thread Lee Mighdoll
Ah, sorry to be so cryptic.  The idea is to create a link containing a
'javascript:' url that the user can then drag to the browser's bookmark
bar.  I had something  like this:

a
href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src','
http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
)
Bookmarklet
/a

But the script is a little tricky to read and edit in that form, so I wanted
to programmatically convert it from a more readable version.

I figured out how to run mvn yui-compressor to remove comments from the
script.  Then I read the compressed version of the script file in the
snippet code.   If I were to polish it further, I'd next find a java version
of encodeUriComponent... but it's probably enough for now.

Lee

On Sun, Mar 1, 2009 at 2:48 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:

 Lee,
 If you want to include a JavaScript script on the page, the easiest
 mechanism is:

 import net.liftweb.http._
 import js._
 import JsCmds._
 import JE._

 Script(JsRaw(a String containing the raw script))

 This will create a script tag on the page and put a // ![CDATA[ in it
 followed by your script followed by //]] and the closing /script tag.

 If this is not what you were looking to do, please let us know.

 Thanks,

 David

 On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 I'd like to make a bookmarklet snippet.  So I want to take a short
 javascript file, encode it as url, and then include it in a snippet.

 Any suggestions?  Not sure whether to solve this with mvn or lift -- I'm
 new to both.






 --
 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] Tracking the latest with maven.. but not too quickly

2009-03-03 Thread Lee Mighdoll
I've a local copy of the lift sources that I'd like to build and debug my
app against.  So I currently reference the 1.1-SNAPSHOT artifact in my
application's pom.xml.

But maven seems to pull stuff down from the net more often than I'd like.
I'd like my snapshot not to change until I git pull the latest lift version
manually.  What's the best way to do this?

I was thinking perhaps one way would be to locally modify the version in all
the lift pom.xml files to 1.1-SNAPSHOT.local.  Or maybe there's some
configuration option?  Or perhaps I should setup a local maven repository?

--~--~-~--~~~---~--~~
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: Tracking the latest with maven.. but not too quickly

2009-03-03 Thread Lee Mighdoll
thx, i'll try using -o more (and keep my eye out for a slightly more
failsafe option too :-)).

Lee

On Tue, Mar 3, 2009 at 7:30 PM, Josh Suereth joshua.suer...@gmail.comwrote:

 Make sure you're using maven 2.0.10 if you plan on working on 1.1-SNAPSHOT
 (or any other SNAPSHOT dependency).  Otherwise -o is broken.

 On Tue, Mar 3, 2009 at 8:42 PM, Jorge Ortiz jorge.or...@gmail.com wrote:

 You can run Maven in offline mode with the -o flag. That should stop it
 from fetching anything.

 --j


 On Tue, Mar 3, 2009 at 5:34 PM, Lee Mighdoll leemighd...@gmail.comwrote:

 I've a local copy of the lift sources that I'd like to build and debug my
 app against.  So I currently reference the 1.1-SNAPSHOT artifact in my
 application's pom.xml.

 But maven seems to pull stuff down from the net more often than I'd like.
 I'd like my snapshot not to change until I git pull the latest lift version
 manually.  What's the best way to do this?

 I was thinking perhaps one way would be to locally modify the version in
 all the lift pom.xml files to 1.1-SNAPSHOT.local.  Or maybe there's some
 configuration option?  Or perhaps I should setup a local maven repository?









 


--~--~-~--~~~---~--~~
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: Issue with http://liftweb.net site design (IE7 / Opera 9.63)

2009-02-27 Thread Lee Mighdoll
I just ran across this handy windows tool for trying multiple versions of
IE:  IETester http://www.my-debugbar.com/wiki/IETester/HomePage

Lee

On Fri, Feb 27, 2009 at 8:53 AM, David Bernard
david.bernard...@gmail.comwrote:



 On Fri, Feb 27, 2009 at 17:37, Timothy Perrett timo...@getintheloop.euwrote:



 Im afraid not David, I just created some bespoke CSS.

 What makes you ask?


 I ask, because
 * lift demo/archetype promote blueprint, and blueprint is done for cross
 browser fixed layout like the one on liftweb.net.
 * I'm too lazy to search in the source of the site ;)

 But I'm also too lazy/tired/busy to try/help you ;)

 Nice job.



 Thanks, Tim

 On 27/02/2009 16:30, David Bernard david.bernard...@gmail.com wrote:

  Do you use Blueprint css to create the new site ?






 


--~--~-~--~~~---~--~~
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] url encoded javascript

2009-02-26 Thread Lee Mighdoll
I'd like to make a bookmarklet snippet.  So I want to take a short
javascript file, encode it as url, and then include it in a snippet.

Any suggestions?  Not sure whether to solve this with mvn or lift -- I'm new
to both.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---