On 29 Sep 2003 21:08:40 -0400
Robert Cummings <[EMAIL PROTECTED]> wrote:


> > I like that idea too-- I just don't like having to learn what amounts to a 
> > third language to do it. Does one have to have a templating engine in order 
> > to achieve this?
> > 
> > I find reusability to be, largely, a theoretical mantra, templates or not. 
> > In general, between applications, so much changes that even the same basic 
> > idea means that the most reusable part are SQL queries and such, and I 
> > already keep THOSE separate.
> > 
> > And I've been looking for good examples of code on the web-- examples that 
> > exemplify forethought and reusability. I must be looking in the wrong 
> > places :)
> 
> Well an example I'm experiencing right now with my template system which
> is making my life so much easier and saving me oodles of time -- is
> creating a PDF version of my site. To do this doing a few things:
> 
> 1. creating a new site configuration (actually a copy of the
>    InterJinn site configuration with a few changes)
> 
> 2. Creating a new set of template patterns for this configuration
>    (2 to be exact)
> 
> 3. Creating one new layout template for the PDF version.
> 
> 4. Creating one master source file which provides a chapter
>    mechanism for the InterJinn site's sections.
> 
> 5. extending the original jinnDoc tag compiler to provide support
>    for a <jinnDoc:chapter/> and <jinnDoc:subChapter/> tag and to
>    reduce the <h?/> tag ranks for the current <jinnDoc:title/>,
>    <jinnDoc:subTitle/>, etc. tags.
> 
> 6. Compiling the new site patterns.
> 
> 7. running htmldoc on the output.
> 
> So in 7 fairly easy steps (once you know the framework) 

That's the key, what better way then rolling your own. I think frameworks develop
on their own with experience. That's not to say that looking at other people's
solutions isn't part of the experience.

>I've converted
> my InterJinn site into an easily downloadable PDF for offline reading.
> Total time invested: 3 hours. later I'll add support for
> <jinnDoc:pdfOnly/> and <jinnDoc:webOnly/> tags to properly separate out
> content that makes no sense in the website or vice versa.
> 
> The nice thing about this was I hadn't even planned on doing a PDF till
> someone requested it via a comment on the website. I'll probably release
> interJinn-0.9.2 next weekend, so you can see the code then if you want
> since I include the InterJinn site as it's own example :) As is you can
> see the non PDF stuff if you download the current version.
> 
> Cheers,
> Rob.
> -- 
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for       |
> | creating re-usable components quickly and easily.          |
> `------------------------------------------------------------'
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


____
Regards, Andu Novac

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to