You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ben Acker <be...@gmail.com> on 2007/07/07 06:23:58 UTC

T5 Services

Howdy!

Being somewhat of a T5 noob, I have had troubles getting explicit directions
on how to create a service in T5.

I'm positive that it is simple, I just can't find anything that says
anything explicitly in the mailing lists, documentation, etc.

If anyone has the time, please let me know where I need to throw in my
annotations and where to throw the service (probably mypackage.services,
with AppModule)

Thanks in advance!

-Ben

PS - A link to any documentation would be more than adequate, and I really
appreciate any help!

Re: T5 Services

Posted by Ben Acker <be...@gmail.com>.
Thank you very much Howard for the explicit instructions.

The most recent quickstart appmodule.java has it in there - I apologize for
not having the grey matter to not check that - one can learn a lot from
grabbing the source...

-Ben

On 7/7/07, Ben Acker <be...@gmail.com> wrote:
>
> Thanks!
>
> On 7/7/07, Howard Lewis Ship <hl...@gmail.com> wrote:
> >
> > 1) Define your service interface
> > 2) Provide an implementation
> > 3) Inside your AppModule, update the bind() method, i.e.
> >
> > public static void bind(ServiceBinder binder)
> > {
> >   binder.bind(MyInterface.class, MyImpl.class );
> > }
> >
> > 4) Inject it into your component:
> >
> > @Inject
> > private MyInterface _myService;
> >
> >
> > That covers most simple services with normal dependencies.  There's a
> > large number of more involved solutions, but for normal stuff, that's
> > just about it.
> >
> > Services are not components, they don't hot reload. Change AppModule
> > or any of the rest and you need to restart.
> >
> > On 7/6/07, Ben Acker <benacker@gmail.com > wrote:
> > > Howdy!
> > >
> > > Being somewhat of a T5 noob, I have had troubles getting explicit
> > directions
> > > on how to create a service in T5.
> > >
> > > I'm positive that it is simple, I just can't find anything that says
> > > anything explicitly in the mailing lists, documentation, etc.
> > >
> > > If anyone has the time, please let me know where I need to throw in my
> > > annotations and where to throw the service (probably
> > mypackage.services ,
> > > with AppModule)
> > >
> > > Thanks in advance!
> > >
> > > -Ben
> > >
> > > PS - A link to any documentation would be more than adequate, and I
> > really
> > > appreciate any help!
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>

Re: T5 Services

Posted by Ben Acker <be...@gmail.com>.
Thanks!

On 7/7/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> 1) Define your service interface
> 2) Provide an implementation
> 3) Inside your AppModule, update the bind() method, i.e.
>
> public static void bind(ServiceBinder binder)
> {
>   binder.bind(MyInterface.class, MyImpl.class);
> }
>
> 4) Inject it into your component:
>
> @Inject
> private MyInterface _myService;
>
>
> That covers most simple services with normal dependencies.  There's a
> large number of more involved solutions, but for normal stuff, that's
> just about it.
>
> Services are not components, they don't hot reload. Change AppModule
> or any of the rest and you need to restart.
>
> On 7/6/07, Ben Acker <be...@gmail.com> wrote:
> > Howdy!
> >
> > Being somewhat of a T5 noob, I have had troubles getting explicit
> directions
> > on how to create a service in T5.
> >
> > I'm positive that it is simple, I just can't find anything that says
> > anything explicitly in the mailing lists, documentation, etc.
> >
> > If anyone has the time, please let me know where I need to throw in my
> > annotations and where to throw the service (probably mypackage.services,
> > with AppModule)
> >
> > Thanks in advance!
> >
> > -Ben
> >
> > PS - A link to any documentation would be more than adequate, and I
> really
> > appreciate any help!
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T5 Services

Posted by Howard Lewis Ship <hl...@gmail.com>.
1) Define your service interface
2) Provide an implementation
3) Inside your AppModule, update the bind() method, i.e.

public static void bind(ServiceBinder binder)
{
  binder.bind(MyInterface.class, MyImpl.class);
}

4) Inject it into your component:

@Inject
private MyInterface _myService;


That covers most simple services with normal dependencies.  There's a
large number of more involved solutions, but for normal stuff, that's
just about it.

Services are not components, they don't hot reload. Change AppModule
or any of the rest and you need to restart.

On 7/6/07, Ben Acker <be...@gmail.com> wrote:
> Howdy!
>
> Being somewhat of a T5 noob, I have had troubles getting explicit directions
> on how to create a service in T5.
>
> I'm positive that it is simple, I just can't find anything that says
> anything explicitly in the mailing lists, documentation, etc.
>
> If anyone has the time, please let me know where I need to throw in my
> annotations and where to throw the service (probably mypackage.services,
> with AppModule)
>
> Thanks in advance!
>
> -Ben
>
> PS - A link to any documentation would be more than adequate, and I really
> appreciate any help!
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org