You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Carlos Costa Portela <cc...@servidores.net> on 2001/07/10 18:32:12 UTC
Trying to start portal / help with modules
Hello all!
I have a good experience designing portals and big websites, but I
want start now a good site, and I've thunk that perhaps Apache modules can
be the best aproach to this problem.
My idea:
designers write templates using specific tags, like <shop>, <advert
code="1"> or similar.
a program parses the template and call to another programs to process
tags.
I've been reading something and I think that perhaps I could write an
apache module to do this work.
Just these questions:
1. can this be done using apache modules?
2. can you point me to online tutorials about this?
3. another aproach to this problem?
Thanks in advance, and keep the good work,
Carlos.
http://www.improveyourweb.com : All about web, PHP-Nuke based site
Web info for and from web people: enjoy it!
_______Carlos Costa Portela__________________________________________
| e-mail: ccosta@servidores.net | http://www.registros.net |
| www: http://ccp.servidores.net | http://www.avisaboe.com |
| http://www.biologia.org | http://moana.servidores.net |
|__Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|
Re: Trying to start portal / help with modules
Posted by Carlos Costa Portela <cc...@servidores.net>.
On 10 Jul 2001, Ian Holsman wrote:
> you might also want to have a look at JSP/jakarta.apache.org
> they have a custom tag facility, and might be easier to develop in than
> 'C'
But it would be a slower result, wouldn't it?
Best regards,
Carlos.
http://www.improveyourweb.com : All about web, PHP-Nuke based site
[ Web info for and from web people: enjoy it! ]
_______Carlos Costa Portela__________________________________________
| e-mail: ccosta@servidores.net | http://www.registros.net |
| www: http://ccp.servidores.net | http://www.avisaboe.com |
| http://www.biologia.org | http://moana.servidores.net |
|__Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|
Re: Trying to start portal / help with modules
Posted by Ian Holsman <ia...@cnet.com>.
On 10 Jul 2001 16:56:07 -0400, Cliff Woolley wrote:
> On Tue, 10 Jul 2001, Carlos Costa Portela wrote:
>
> > My idea:
> > designers write templates using specific tags, like <shop>, <advert
> > code="1"> or similar.
> >
> > a program parses the template and call to another programs to process
> > tags.
>
> You could write a custom extension to mod_include to do this. With 2.0
> it's easy--a module can hook into mod_include at runtime to add its own
> include directives. With 1.3, you'd have to modify mod_include, I think.
> But it's easier than starting from scratch...
>
you might also want to have a look at JSP/jakarta.apache.org
they have a custom tag facility, and might be easier to develop in than
'C'
..Ian
> --Cliff
>
>
> --------------------------------------------------------------
> Cliff Woolley
> cliffwoolley@yahoo.com
> Charlottesville, VA
>
--
Ian Holsman IanH@cnet.com
Performance Measurement & Analysis
CNET Networks - (415) 364-8608
Re: Trying to start portal / help with modules
Posted by Carlos Costa Portela <cc...@servidores.net>.
On Fri, 13 Jul 2001, Cliff Woolley wrote:
> duplicating functionality that's already built in to mod_include,
> including the parser and the pre-defined SSI tags. But it's not the
> easiest approach and might not be the most appropriate in this case,
> especially given the below:
I don't want lose functionality, of course :)
>
> > can I access to my databases from mod_include code?
>
> You can if you write the interface for it. =-)
Well.. then I can! :)
> Consider using PHP. It's got drivers for lots of DB's built in, and
> instead of defining custom tags, you can just have a library of
> pre-defined functions called banner(), shop(), etc. Stick a call to the
> appropriate function in a PHP tag, and the function dumps out the
> necessary HTML. That's way easier to code and maintain and probably a
> better match for what you're trying to do.
PHP or JSP can be a good solution, but I would like keep
independence between design and code.
Note: Since this is not -now- a Apache question, I've post a story about
this topic to http://www.improveyourweb.com [(a php nuke web page that I
am starting this weeks) - if you can give me your feedback, thanks!.].
Best regards,
Carlos.
_______Carlos Costa Portela__________________________________________
| e-mail: ccosta@servidores.net | http://www.registros.net |
| www: http://ccp.servidores.net | http://www.avisaboe.com |
| http://www.biologia.org | http://moana.servidores.net |
|__Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|
Re: Trying to start portal / help with modules
Posted by Cliff Woolley <cl...@yahoo.com>.
On Fri, 13 Jul 2001, Carlos Costa Portela wrote:
> > http://www.apache.org/websrc/cvsweb.cgi/httpd-2.0/modules/filters/mod_include.c
>
> Thank you very much. Do you think that is this a good aproach to a
> complex web page? (using items like <banner>, <shop> or <team_info
> id="1">) ?
It's one approach. All it really gains you is keeping you from
duplicating functionality that's already built in to mod_include,
including the parser and the pre-defined SSI tags. But it's not the
easiest approach and might not be the most appropriate in this case,
especially given the below:
> can I access to my databases from mod_include code?
You can if you write the interface for it. =-)
Consider using PHP. It's got drivers for lots of DB's built in, and
instead of defining custom tags, you can just have a library of
pre-defined functions called banner(), shop(), etc. Stick a call to the
appropriate function in a PHP tag, and the function dumps out the
necessary HTML. That's way easier to code and maintain and probably a
better match for what you're trying to do.
--Cliff
--------------------------------------------------------------
Cliff Woolley
cliffwoolley@yahoo.com
Charlottesville, VA
Re: Trying to start portal / help with modules
Posted by Carlos Costa Portela <cc...@servidores.net>.
On Thu, 12 Jul 2001, Cliff Woolley wrote:
> On Wed, 11 Jul 2001, Carlos Costa Portela wrote:
>
> > Thank you very much, Cliff. Can you give me an URL so I can learn
> > how to hook into mod_include and define my own tags?.
>
> mod_include.c in Apache 2.0 was sort of written as its own example
> document in that regard. Best I can tell you is to look at the source:
>
> http://www.apache.org/websrc/cvsweb.cgi/httpd-2.0/modules/filters/mod_include.c
Thank you very much. Do you think that is this a good aproach to a
complex web page? (using items like <banner>, <shop> or <team_info
id="1">) ?
can I access to my databases from mod_include code?
Best regards,
Carlos.
http://www.improveyourweb.com : All about web, PHP-Nuke based site
[ Web info for and from web people: enjoy it! ]
_______Carlos Costa Portela__________________________________________
| e-mail: ccosta@servidores.net | http://www.registros.net |
| www: http://ccp.servidores.net | http://www.avisaboe.com |
| http://www.biologia.org | http://moana.servidores.net |
|__Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|
Re: Trying to start portal / help with modules
Posted by Cliff Woolley <cl...@yahoo.com>.
On Wed, 11 Jul 2001, Carlos Costa Portela wrote:
> Thank you very much, Cliff. Can you give me an URL so I can learn
> how to hook into mod_include and define my own tags?.
mod_include.c in Apache 2.0 was sort of written as its own example
document in that regard. Best I can tell you is to look at the source:
http://www.apache.org/websrc/cvsweb.cgi/httpd-2.0/modules/filters/mod_include.c
Specifically, look at the function include_post_config(). Basically just
do what that function does, replacing the calls to
ssi_pfn_register("tag",handle_tag) with registrations for your own custom
tags. And then write a function to handle each of them.
Like I said, this is a new capability in 2.0. If you're going to use
Apache 1.3, you'll have to insert some code into the if/elseif statement
in send_parsed_content() in 1.3's mod_include.c.
Hope this helps.
--Cliff
--------------------------------------------------------------
Cliff Woolley
cliffwoolley@yahoo.com
Charlottesville, VA
Re: Trying to start portal / help with modules
Posted by Carlos Costa Portela <cc...@servidores.net>.
On Tue, 10 Jul 2001, Cliff Woolley wrote:
> On Tue, 10 Jul 2001, Carlos Costa Portela wrote:
>
> > My idea:
> > designers write templates using specific tags, like <shop>, <advert
> > code="1"> or similar.
> >
> > a program parses the template and call to another programs to process
> > tags.
>
> You could write a custom extension to mod_include to do this. With 2.0
> it's easy--a module can hook into mod_include at runtime to add its own
> include directives. With 1.3, you'd have to modify mod_include, I think.
> But it's easier than starting from scratch...
Thank you very much, Cliff. Can you give me an URL so I can learn
how to hook into mod_include and define my own tags?.
Carlos.
http://www.improveyourweb.com : All about web, PHP-Nuke based site
[ Web info for and from web people: enjoy it! ]
_______Carlos Costa Portela__________________________________________
| e-mail: ccosta@servidores.net | http://www.registros.net |
| www: http://ccp.servidores.net | http://www.avisaboe.com |
| http://www.biologia.org | http://moana.servidores.net |
|__Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|
Re: Trying to start portal / help with modules
Posted by Cliff Woolley <cl...@yahoo.com>.
On Tue, 10 Jul 2001, Carlos Costa Portela wrote:
> My idea:
> designers write templates using specific tags, like <shop>, <advert
> code="1"> or similar.
>
> a program parses the template and call to another programs to process
> tags.
You could write a custom extension to mod_include to do this. With 2.0
it's easy--a module can hook into mod_include at runtime to add its own
include directives. With 1.3, you'd have to modify mod_include, I think.
But it's easier than starting from scratch...
--Cliff
--------------------------------------------------------------
Cliff Woolley
cliffwoolley@yahoo.com
Charlottesville, VA