Michael,
I strongly recommend against tunneling your entire application through the
index.html file. By doing that, you would be effectively rewriting, badly, a
huge amount of logic that Mason already covers, namely selecting a component
based on the requested URL. Different resources need to have different URLs,
and in Mason that should definitely mean different paths, not just different
query parameters.
I would start by creating two component directories, Includes and Pages.
Factor out all the shared functionality into Includes. The Includes
directory will be shared across all the sites. In the Pages directory,
create components representing the major resources of your application (your
main URLs), that can be customized for each site. Sometimes these pages may
do nothing except call a component in Includes, but that's okay. It keeps
the separation clean, making maintenance easier down the road. The Pages
directory can be "cloned" and customized as needed.
If the commonalities are many and the differences few, you might consider
using one codebase and defining the differences via your config. I happen to
run a fairly large installation where we have many substantially similar web
sites all running on the same platform. In our case, all sites are served by
the same codebase, and differences are encapsulated in a Site object
(basically a fancy config hash). Any components that need to behave
differently for different sites depend on the Site object to tell them the
differences. Which stylesheet to pull in, which content database to connect
to, etc. It's a very complex system, and I don't necessarily recommend it,
but it can work and it has advantages of scale if done well, because all the
sites can share server resources.
I hope that helps your thinking at least a little bit. Good luck with your
project!
--
Vince Veselosky
Web: http://www.webquills.net
Twitter: @veselosky (http://twitter.com/veselosky)
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users