This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Architecture pattern...


I'm trying to think of good ways to architect/design a web application that
I'm currently working on, and I've a few ideas knocking around in my head,
and I wonder if any of ye can comment...

So basically, what I wnat to be able to do is present a taxonomy (if you
read this list regularly, I posted a query on Friday which explained what I
was doing there - thanks guys, I got it all figured from your replies).  A
taxonomy consists of categories and subcategories, and so on.  Each
category can contain articles.  So I have something really nice working
based on the servlet example that comes with xalan.  It works well and
demonstrates what I want to do very well.

categories.xml + categories.xsl + cat_id -> servlet -> HTML output.

However, I have noticed that this is quite slow (even though I think the SAX
parser is being used) - I guess the overhead of parsing the xml and xsl each
hit is causing the bottle neck.

So, working in a company that produces a high quality EJB server I figure
that I'll try to make some changes to the pattern used:

categories.xml -> categories bean (preparsed categories DOM)

categories.xsl -> stylesheet bean (preparsed xsl DOM)

Then another bean takes the cat_id, feeds to the preparsed stylesheet DOM
and preloaded categories DOM and bingo, output HTML.  The double advantage
is that since the DOM is already loaded and parsed in the bean, it is
available to other beans that may need to get at the data (I have plans that
articles will get inserted into the categories DOM by another process).  the
XML file will then just be the persistant representation of the DOM.

Only thing is, I haven't seen any mention of this type of approach around
the net, and I'm doubting if it is actually a good pattern to use...

Any comments from anyone?  Anyone seen this type of approach before?

Peter McEvoy
Senior Technical Analyst
IONA Technologies PLC


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]