I have a question regarding potential Clojure integration in my application
service layer. As of now, standard Tapestry mechanism of dependency
injection won't work for Clojure-based services, because it's constructed
using ServiceBuilder and there is no implementation class.

I understand that it probably cannot be solved directly, but what
alternative scenarios do we have at our disposal?

One of them is probably a custom service builder. Any others?

Ideally, I would like to have something like:

(with-tapestry
   (def service1 (tapestry-inject 'com.myapp.Service1))
   (def service2 (tapestry-inject 'com.myapp.Service2))
 ...
)

Thanks for any suggestions.


On Mon, Jul 2, 2012 at 7:31 PM, Howard Lewis Ship <hls...@gmail.com> wrote:

> I see Clojure use with Tapestry as an extension of the (largely
> stateless) services layer; although you can use :gen-class to create
> class-like things with readable/writable properties, that will not
> work very will with Tapestry that expects to be able to read bytecode
> from a .class file and enhance it in multiple ways.
>
> Tapestry pages and components are inherently stateful and mutable;
> trying to implement them in Clojure is a bit off-base.
>
> On Sun, Jul 1, 2012 at 10:05 PM, freizl <fre...@gmail.com> wrote:
> > This sounds a very interesting topic.
> >
> > Because of clojure Java Interp, getting tapestry work with clojure seems
> not
> > difficult.
> > I have set up a tutorial project at
> > https://github.com/freizl/clojure-tapestry.
> >
> > I did not tested all tapestry functionality but I think it should be
> working
> > well.
> >
> > PS: I'm new to both Tapestry and Clojure.
> >
> >
> > --
> > View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-and-Clojure-tp5713643p5714226.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Ilya Obshadko

Reply via email to