Single page app as custom resource?
Hi, we're developing a webbapplication to our legacy product and we're doing it in wicket. We have a few pages which are using a lot of ajax, and therefore each one of them could be seen as kind of a SPA. (Does that make sense?) Now we might have a case when a client (or we our selves) would like to extend the wicket webbapplication with a page/spa written in javascript (angular/react etc). From the users point of view, there should be no difference. It should be the same session etc. Can this be done with a dynamic resource? Or in some other way? Is it a bad idea or just another way to do things? Cheers Lars
Re: Single page app as custom resource?
Ok, now I found wicketstuff-rest-annotations... so, can I create a wicket page, load resources for a java scriptframework and then use wicket-rest-requests with ajax to integrate a SPA in my wicket-web-application? tisdag 15 november 2016 skrev Lars Törner : > Hi, > > we're developing a webbapplication to our legacy product and we're doing > it in wicket. > > We have a few pages which are using a lot of ajax, and therefore each one > of them could be seen as kind of a SPA. (Does that make sense?) > > Now we might have a case when a client (or we our selves) would like to > extend the wicket webbapplication with a page/spa written in javascript > (angular/react etc). From the users point of view, there should be no > difference. It should be the same session etc. > > Can this be done with a dynamic resource? Or in some other way? Is it a > bad idea or just another way to do things? > > Cheers > Lars >
Re: Single page app as custom resource?
Hi Lars, AFAIK some people use this approach in their applications. You can use Wicket resources as endpoints or any other, e.g. Spring MVC, just make sure you "wrap" them in WicketSessionFilter so you have access to Application.get() and Session.get() inside them. On Nov 16, 2016 7:41 AM, "Lars Törner" wrote: > Ok, now I found wicketstuff-rest-annotations... so, can I create a wicket > page, load resources for a java scriptframework and then use > wicket-rest-requests with ajax to integrate a SPA in my > wicket-web-application? > > tisdag 15 november 2016 skrev Lars Törner : > > > Hi, > > > > we're developing a webbapplication to our legacy product and we're doing > > it in wicket. > > > > We have a few pages which are using a lot of ajax, and therefore each one > > of them could be seen as kind of a SPA. (Does that make sense?) > > > > Now we might have a case when a client (or we our selves) would like to > > extend the wicket webbapplication with a page/spa written in javascript > > (angular/react etc). From the users point of view, there should be no > > difference. It should be the same session etc. > > > > Can this be done with a dynamic resource? Or in some other way? Is it a > > bad idea or just another way to do things? > > > > Cheers > > Lars > > >
Re: Single page app as custom resource?
Ok, thanks Martin! It would be really interesting to hear the opinion of someone that tried the approach. 2016-11-16 12:43 GMT+01:00 Martin Grigorov : > Hi Lars, > > AFAIK some people use this approach in their applications. > > You can use Wicket resources as endpoints or any other, e.g. Spring MVC, > just make sure you "wrap" them in WicketSessionFilter so you have access to > Application.get() and Session.get() inside them. > > On Nov 16, 2016 7:41 AM, "Lars Törner" wrote: > > > Ok, now I found wicketstuff-rest-annotations... so, can I create a > wicket > > page, load resources for a java scriptframework and then use > > wicket-rest-requests with ajax to integrate a SPA in my > > wicket-web-application? > > > > tisdag 15 november 2016 skrev Lars Törner : > > > > > Hi, > > > > > > we're developing a webbapplication to our legacy product and we're > doing > > > it in wicket. > > > > > > We have a few pages which are using a lot of ajax, and therefore each > one > > > of them could be seen as kind of a SPA. (Does that make sense?) > > > > > > Now we might have a case when a client (or we our selves) would like to > > > extend the wicket webbapplication with a page/spa written in javascript > > > (angular/react etc). From the users point of view, there should be no > > > difference. It should be the same session etc. > > > > > > Can this be done with a dynamic resource? Or in some other way? Is it a > > > bad idea or just another way to do things? > > > > > > Cheers > > > Lars > > > > > >
Re: Single page app as custom resource?
Hi, I haven't directly tried this approach but there is an Apache project, Syncope, that recently has gone in this direction. The following is the link to their enduser module which is built with Angular for the frontend and uses Wicket resources for the REST API: https://github.com/apache/syncope/tree/master/client/enduser On 16/11/2016 12:56, Lars Törner wrote: Ok, thanks Martin! It would be really interesting to hear the opinion of someone that tried the approach. 2016-11-16 12:43 GMT+01:00 Martin Grigorov : Hi Lars, AFAIK some people use this approach in their applications. You can use Wicket resources as endpoints or any other, e.g. Spring MVC, just make sure you "wrap" them in WicketSessionFilter so you have access to Application.get() and Session.get() inside them. On Nov 16, 2016 7:41 AM, "Lars Törner" wrote: Ok, now I found wicketstuff-rest-annotations... so, can I create a wicket page, load resources for a java scriptframework and then use wicket-rest-requests with ajax to integrate a SPA in my wicket-web-application? tisdag 15 november 2016 skrev Lars Törner : Hi, we're developing a webbapplication to our legacy product and we're doing it in wicket. We have a few pages which are using a lot of ajax, and therefore each one of them could be seen as kind of a SPA. (Does that make sense?) Now we might have a case when a client (or we our selves) would like to extend the wicket webbapplication with a page/spa written in javascript (angular/react etc). From the users point of view, there should be no difference. It should be the same session etc. Can this be done with a dynamic resource? Or in some other way? Is it a bad idea or just another way to do things? Cheers Lars - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Single page app as custom resource?
Interesting! Thank you Andrea! fre 18 nov. 2016 kl. 12:41 skrev Andrea Del Bene : > Hi, > > I haven't directly tried this approach but there is an Apache project, > Syncope, that recently has gone in this direction. The following is the > link to their enduser module which is built with Angular for the > frontend and uses Wicket resources for the REST API: > > https://github.com/apache/syncope/tree/master/client/enduser > > On 16/11/2016 12:56, Lars Törner wrote: > > Ok, thanks Martin! > > > > It would be really interesting to hear the opinion of someone that tried > > the approach. > > > > 2016-11-16 12:43 GMT+01:00 Martin Grigorov : > > > >> Hi Lars, > >> > >> AFAIK some people use this approach in their applications. > >> > >> You can use Wicket resources as endpoints or any other, e.g. Spring MVC, > >> just make sure you "wrap" them in WicketSessionFilter so you have > access to > >> Application.get() and Session.get() inside them. > >> > >> On Nov 16, 2016 7:41 AM, "Lars Törner" wrote: > >> > >>> Ok, now I found wicketstuff-rest-annotations... so, can I create a > >> wicket > >>> page, load resources for a java scriptframework and then use > >>> wicket-rest-requests with ajax to integrate a SPA in my > >>> wicket-web-application? > >>> > >>> tisdag 15 november 2016 skrev Lars Törner : > >>> > Hi, > > we're developing a webbapplication to our legacy product and we're > >> doing > it in wicket. > > We have a few pages which are using a lot of ajax, and therefore each > >> one > of them could be seen as kind of a SPA. (Does that make sense?) > > Now we might have a case when a client (or we our selves) would like > to > extend the wicket webbapplication with a page/spa written in > javascript > (angular/react etc). From the users point of view, there should be no > difference. It should be the same session etc. > > Can this be done with a dynamic resource? Or in some other way? Is it > a > bad idea or just another way to do things? > > Cheers > Lars > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >