Hi folks,

I'm wondering that here is any preferred/recommentd component
distribution method?

E.g. someone can make a component MenuGen.mc, what will be able
generate many types of html-menus, (maybe with CSS and JS too), and
want publish it for others. Here are many possibilities, what
generally should help other app/web developers, like:

- menus
- breadcrumbs
- pagers
- buttons
- general site templates

For some of them here are already useful CPAN modules, and need only
make components and somewhat package it for distro.

Qst1: The only way is  - publish components in the github as plain
files? Or here is any idea for "packaging" method?

The second question is about the html-template separation.

E.g. What is the best way having an separate directory, e.g.
/templates, where one can put some _poet-specific_ site-templates,
together with template-specific methods, css, js and etc.. and the
"main" execution flow only fill the template as one of last actions -
probably from /Base.mc.

How to implement for example:
       http://example.com/some/component?template=print

e.g. in the "normal" execution flow the site will use some "default"
template, but when get the arg "template=print" (or any other
"template-name") will search the "/templates" for the requested
template (like "print") and will use/fill that one...

This can be usefull too, for dynamically switching templates based on
useragent, so for mobile browsers one want generate mobile version and
so on... Unfortunatelly, it is _not enoug_ change only css, but need
output different html code too.

I understand than this is too application specific, and some apps
simply doesn't need this, but would be nice have some hints, what is
the right way to do this tasks like this. Is the "right way" using
subrequests here with "$m->visit" ? Any other hints?

So, Qst2: what is the best way implement template switcher for:
  a.) requests like  http://example.com/some/component?template=print
  b.) template swicthing based on browser user-agent string
(HTTP::BrowserDetect)

ak.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to