Re: A WM brain bender: DB-based template loader

Marc Palmer <[email protected]>
Newsgroups gmane.comp.java.webmacro.user
Organization AnyWare Ltd.
Message-ID <[email protected]>
marcel.huijkman wrote:
> Okay, A DB-based template loader could be handy.
> 
> However, I advise not to go this way with naming it db: and so on.
> 
> In a month, a persons stands up, and has an idea to have templates 
> stored in property files,
> or in xml files or or an ftp server. So it must not be a db: solution, 
> but more generic.

Sorry, I don't get this... you can have anything you like as a 
"protocol" identifier and it's a perfectly good system as far as I can 
see, you can have as many of them as you like:

property:somepath/templatename
db:somepath/templatename
myXMLTemplateLoader:somepath/templatename
randomCodeGenerator:somepath/templatename

...whatever.

> It  should be a thing you could easily use in your servlet and adapt to 
> whatever
> happens in the future. Perhaps something like:

You can. You just change the WM configuration to add the protocols you 
want.

> #include as location1 "$(TEMPLATE_DIR)_includes/init.inc"
> and location1 as a property in the WebMacro.properties
> I don't know, but let's think first and then program.

Sorry, am I misunderstanding you? The delegating template loader 
provider which uses protocol-based TemplateLoader implementations has 
been in WM for a -long- time now. It's part of core WM, it's just not 
enabled by default.

Cheers

-- 
Marc Palmer - - - [email protected]
			
Wangjammers, J2ME Developers
   ~ http://www.wangjammers.org/games/

Blog
   ~ http://www.jroller.com/page/Wangjammer5



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.