You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@polygene.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2015/08/02 12:29:10 UTC
Restlet library
Gang,
I have been adapting my Restlet library to Zest 3.0, and it is coming along
quite well.
* CRUD handling of Entities if one so chooses.
* Resources for 'anything'
* Link traversals
* Autobuilding the EntryPoint (bookmarkable) document.
* Invocation of methods on resources or entities.
* Support for www-form-urlencoded to ValueComposite
* Security support (want to use Shiro library, yet integrate with Restlet's)
* Application structure support. Predefined, but replaceable, layers are;
- Connectivity
- Resource
- Domain
- Infrastructure
- Configuration
I am not yet done, but about to commit what I have so far, including the
beginning of a TestApplication.
public static void main( String[] args )
throws Exception
{
RestApplicationAssembler assembler = new RestApplicationAssembler(
NAME, VERSION, MODE,
ConfigurationLayer.class,
InfrastructureLayer.class,
DomainLayer.class,
ResourceLayer.class,
ConnectivityLayer.class
);
assembler.initialize();
ModuleAssembly configModule = assembler.layer(
ConfigurationLayer.class ).module( ConfigurationModule.NAME );
assembler.layer( InfrastructureLayer.class,
new FileStorageModule( configModule )
);
assembler.layer( DomainLayer.class,
new OrdersModule()
);
assembler.start();
assembler.addShutdownHook();
}
Feedback is welcome, as usual.
Cheers
--
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java
Re: Restlet library
Posted by Niclas Hedhman <ni...@hedhman.org>.
By providing your own InfrastructureLayer....
I am still fiddling with the whole assembly bit to get it as sweet as
possible... Not satisfied yet
On Aug 2, 2015 19:36, "Paul Merlin" <pa...@nosphere.org> wrote:
> Hey Niclas,
>
> I added the missing dependencies, the library now compiles.
>
> First thought: File-EntityStore and RDF-IndexQuery dependencies are
> hardcoded, how can one use this with other ES/IQ ?
>
>
> Niclas Hedhman a écrit :
> > One more thing;
> > * Deployable either with embeddde HTTP server or as Servlet on
> containers.
> >
> >
> > committed.
> >
> > On Sun, Aug 2, 2015 at 6:29 PM, Niclas Hedhman <ni...@hedhman.org>
> wrote:
> >
> >> Gang,
> >>
> >> I have been adapting my Restlet library to Zest 3.0, and it is coming
> >> along quite well.
> >>
> >> * CRUD handling of Entities if one so chooses.
> >> * Resources for 'anything'
> >> * Link traversals
> >> * Autobuilding the EntryPoint (bookmarkable) document.
> >> * Invocation of methods on resources or entities.
> >> * Support for www-form-urlencoded to ValueComposite
> >> * Security support (want to use Shiro library, yet integrate with
> >> Restlet's)
> >>
> >> * Application structure support. Predefined, but replaceable, layers
> are;
> >> - Connectivity
> >> - Resource
> >> - Domain
> >> - Infrastructure
> >> - Configuration
> >>
> >> I am not yet done, but about to commit what I have so far, including the
> >> beginning of a TestApplication.
> >>
> >> public static void main( String[] args )
> >> throws Exception
> >> {
> >> RestApplicationAssembler assembler = new RestApplicationAssembler(
> NAME, VERSION, MODE,
> >> ConfigurationLayer.class,
> >> InfrastructureLayer.class,
> >> DomainLayer.class,
> >> ResourceLayer.class,
> >> ConnectivityLayer.class
> >> );
> >>
> >> assembler.initialize();
> >>
> >> ModuleAssembly configModule = assembler.layer(
> ConfigurationLayer.class ).module( ConfigurationModule.NAME );
> >>
> >> assembler.layer( InfrastructureLayer.class,
> >> new FileStorageModule( configModule )
> >> );
> >>
> >> assembler.layer( DomainLayer.class,
> >> new OrdersModule()
> >> );
> >>
> >> assembler.start();
> >> assembler.addShutdownHook();
> >> }
> >>
> >>
> >>
> >> Feedback is welcome, as usual.
> >>
> >>
> >> Cheers
> >> --
> >> Niclas Hedhman, Software Developer
> >> http://zest.apache.org - New Energy for Java
> >>
> >
> >
> >
>
Re: Restlet library
Posted by Paul Merlin <pa...@nosphere.org>.
Hey Niclas,
I added the missing dependencies, the library now compiles.
First thought: File-EntityStore and RDF-IndexQuery dependencies are
hardcoded, how can one use this with other ES/IQ ?
Niclas Hedhman a écrit :
> One more thing;
> * Deployable either with embeddde HTTP server or as Servlet on containers.
>
>
> committed.
>
> On Sun, Aug 2, 2015 at 6:29 PM, Niclas Hedhman <ni...@hedhman.org> wrote:
>
>> Gang,
>>
>> I have been adapting my Restlet library to Zest 3.0, and it is coming
>> along quite well.
>>
>> * CRUD handling of Entities if one so chooses.
>> * Resources for 'anything'
>> * Link traversals
>> * Autobuilding the EntryPoint (bookmarkable) document.
>> * Invocation of methods on resources or entities.
>> * Support for www-form-urlencoded to ValueComposite
>> * Security support (want to use Shiro library, yet integrate with
>> Restlet's)
>>
>> * Application structure support. Predefined, but replaceable, layers are;
>> - Connectivity
>> - Resource
>> - Domain
>> - Infrastructure
>> - Configuration
>>
>> I am not yet done, but about to commit what I have so far, including the
>> beginning of a TestApplication.
>>
>> public static void main( String[] args )
>> throws Exception
>> {
>> RestApplicationAssembler assembler = new RestApplicationAssembler( NAME, VERSION, MODE,
>> ConfigurationLayer.class,
>> InfrastructureLayer.class,
>> DomainLayer.class,
>> ResourceLayer.class,
>> ConnectivityLayer.class
>> );
>>
>> assembler.initialize();
>>
>> ModuleAssembly configModule = assembler.layer( ConfigurationLayer.class ).module( ConfigurationModule.NAME );
>>
>> assembler.layer( InfrastructureLayer.class,
>> new FileStorageModule( configModule )
>> );
>>
>> assembler.layer( DomainLayer.class,
>> new OrdersModule()
>> );
>>
>> assembler.start();
>> assembler.addShutdownHook();
>> }
>>
>>
>>
>> Feedback is welcome, as usual.
>>
>>
>> Cheers
>> --
>> Niclas Hedhman, Software Developer
>> http://zest.apache.org - New Energy for Java
>>
>
>
>
Re: Restlet library
Posted by Niclas Hedhman <ni...@hedhman.org>.
One more thing;
* Deployable either with embeddde HTTP server or as Servlet on containers.
committed.
On Sun, Aug 2, 2015 at 6:29 PM, Niclas Hedhman <ni...@hedhman.org> wrote:
> Gang,
>
> I have been adapting my Restlet library to Zest 3.0, and it is coming
> along quite well.
>
> * CRUD handling of Entities if one so chooses.
> * Resources for 'anything'
> * Link traversals
> * Autobuilding the EntryPoint (bookmarkable) document.
> * Invocation of methods on resources or entities.
> * Support for www-form-urlencoded to ValueComposite
> * Security support (want to use Shiro library, yet integrate with
> Restlet's)
>
> * Application structure support. Predefined, but replaceable, layers are;
> - Connectivity
> - Resource
> - Domain
> - Infrastructure
> - Configuration
>
> I am not yet done, but about to commit what I have so far, including the
> beginning of a TestApplication.
>
> public static void main( String[] args )
> throws Exception
> {
> RestApplicationAssembler assembler = new RestApplicationAssembler( NAME, VERSION, MODE,
> ConfigurationLayer.class,
> InfrastructureLayer.class,
> DomainLayer.class,
> ResourceLayer.class,
> ConnectivityLayer.class
> );
>
> assembler.initialize();
>
> ModuleAssembly configModule = assembler.layer( ConfigurationLayer.class ).module( ConfigurationModule.NAME );
>
> assembler.layer( InfrastructureLayer.class,
> new FileStorageModule( configModule )
> );
>
> assembler.layer( DomainLayer.class,
> new OrdersModule()
> );
>
> assembler.start();
> assembler.addShutdownHook();
> }
>
>
>
> Feedback is welcome, as usual.
>
>
> Cheers
> --
> Niclas Hedhman, Software Developer
> http://zest.apache.org - New Energy for Java
>
--
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java
Re: Restlet library
Posted by Niclas Hedhman <ni...@hedhman.org>.
You mean the new Restful stuff? No, this has been extracted from
proprietary work that I have been doing lately. I don't know of any good
Restful demo out there, as a reasonable candidate to re-implement. Pointers
are welcome.
If you mean "in general", then the "Domain Driven Design" flagship demo
(Shipping) has been converted to Zest and using DCI[1] principle, by Marc
Grue (with input from Rickard Oberg).
Perhaps the Spring PetClinic is a better candidate, I might take a look a
bit later, just for the fun of it...
[1] Data Context Interactions, by Tryggve Renskaug also know for the MVC
pattern.
On Mon, Aug 3, 2015 at 7:03 AM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:
> On Sun, Aug 2, 2015 at 3:29 AM, Niclas Hedhman <ni...@hedhman.org> wrote:
> > Gang,
> >
> > I have been adapting my Restlet library to Zest 3.0, and it is coming
> along
> > quite well.
>
> Quick question: do you happen to have a demo app for that (a pet store of
> sorts if you know what I mean)?
>
> Thanks,
> Roman.
>
--
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java
Re: Restlet library
Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
On Sun, Aug 2, 2015 at 3:29 AM, Niclas Hedhman <ni...@hedhman.org> wrote:
> Gang,
>
> I have been adapting my Restlet library to Zest 3.0, and it is coming along
> quite well.
Quick question: do you happen to have a demo app for that (a pet store of
sorts if you know what I mean)?
Thanks,
Roman.