468,510 Members | 1,769 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,510 developers. It's quick & easy.

How to generate HTML pages

Hi all,

I'm about to embark on a new project and can't decide quite how to do it.
In summary, I have a database whose data I want to use to create html pages
for a website. The website will just be a series of static html pages. I
will keep all the data locally and would generate the required pages and
upload them whenever I needed to. I do not want to have the database
anywhere but on my lcoal machine.

My questions are:
1. Should I create a windows or web application to generate my pages?
2. If a window app, will this be faster?
3. If an web app, how do I automatically save the result of an aspx page as
static html?
4. What would you recommend as the best way to generate these pages -
HTMLTextWriter?
5. Should I perhaps generate XML and use XSL to render the pages?
6. What classes are available (and best) for the generation of html pages?

Which direction would you all head in?
Thanks for any advice or ideas.
Nick
Jul 21 '05 #1
2 1926
>1. Should I create a windows or web application to generate my pages?

My vote would be for a windows app - you're not planning to host it on
a remote machine, you don't need to access it from your holidays on
Hawaii - so there's no point or real benefit in creating a web app,
really.
2. If a window app, will this be faster?
Most likely, yes. A lot more powerful and easier to use, too - the
Windows UI is just that much richer than the severly limited web /
HTML interface can ever be.
4. What would you recommend as the best way to generate these pages -
HTMLTextWriter?
Have a look at CodeSmith - it's a freeware code generation / template
tool which can be easily used from a .NET app. You could easily set up
your HTML pages as CodeSmith templates, and pull out the data from the
data to feed them into the CodeSmith templates.

http://www.ericjsmith.net/codesmith/
5. Should I perhaps generate XML and use XSL to render the pages?
I don't see much benefit in this, unless you already have XML to begin
with. Otherwise, you'll end up converting your native data format to
XML, then send it through XSL transformation, to end up in HTML - why
not create the HTML from the raw data in the first place? Also, XSL is
not always all that easy to learn and use, and some rather basic
operations (like grouping etc.) are just a royal pain in XSL (at least
in 1.0).
6. What classes are available (and best) for the generation of html pages?


CodeSmith - see above! ;-)

Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Jul 21 '05 #2
I would recommend to create XML from the data
and use XSLT to transform into HTML.
That way, you get a flexible solution.
IMO, HTML should never be "hard coded".
Layout is easily modified directly in the XSLT file, in case there is
something you need to change.

And besides, maybe you some day would need some other
format like text or another XML format like XSL-FO or SVG or whatever.
Then, you will only need to write a new XSLT template in a few minutes.

XSLT is very powerful.

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Nick" <ni***************@lycos.co.uk> wrote in message
news:2s*************@uni-berlin.de...
Hi all,

I'm about to embark on a new project and can't decide quite how to do it.
In summary, I have a database whose data I want to use to create html
pages
for a website. The website will just be a series of static html pages. I
will keep all the data locally and would generate the required pages and
upload them whenever I needed to. I do not want to have the database
anywhere but on my lcoal machine.

My questions are:
1. Should I create a windows or web application to generate my pages?
2. If a window app, will this be faster?
3. If an web app, how do I automatically save the result of an aspx page
as
static html?
4. What would you recommend as the best way to generate these pages -
HTMLTextWriter?
5. Should I perhaps generate XML and use XSL to render the pages?
6. What classes are available (and best) for the generation of html pages?

Which direction would you all head in?
Thanks for any advice or ideas.
Nick

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Fred | last post: by
11 posts views Thread by shank | last post: by
4 posts views Thread by Dehaibe François | last post: by
4 posts views Thread by Nick | last post: by
6 posts views Thread by ash | last post: by
5 posts views Thread by vikram | last post: by
5 posts views Thread by pittendrigh | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.