I would definitely split it into two web applications with a common tapestry module.Any other way will result to a mess.
On Thu, Jul 30, 2015 at 10:12 PM, Stephen Nutbrown <steves...@gmail.com> wrote: > Hi, > > To cut a long story short, I have a website running using tapestry which > has two main areas, we will call them "Client accounts" and "Partner > accounts". The powers that be have now decided the best way forwards is to > split this into two separate domains, let's call them www.clients.com and > www.partners.com. > > All of the logic and services are set up at the moment and hibernate is > used which accesses one database. Splitting them up is going to be tricky, > as both of the sites need access to the same, up to date database. Ideally > I can serve both these pages from the same webapp, and just say for example > put pages for clients.com in the "pages.clients" package and put pages for > partner.com in the "partner.clients" package, that way they can both make > use of the database, it'll be up to date, and we have to maintain only one > webapp and we don't need to duplicate lots of things or split everything up > in the backend. > > Has anyone done something similar, and if so, is there a sensible structure > you would recommend? > > I am thinking the most tricky page is the index, so I would have this page > redirect to /clients or /partner by returning the correct page from > onActivate. This would however mean that the page would be > partners.com/partner and clients.com/client but this is OK. > > Then, perhaps each page in the clients package can inherit from some base > class which pretty much checks the request to make sure it's on > clients.com > and not partners.com (if it is, it can redirect). The same for the > partners.com site. > > All in all, I can see this becoming rather messy so i'm looking for any > advice within Tapestry how may be best to do this. > > Any help is really appreciated, > > Thanks, >