473,385 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2210
>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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Fred | last post by:
Hi, I'm sure there are a bunch of them, but googling just returned full-fledged CMS that require a DBMS and generate dynamic pages. I'd just like a script that would 1. look in a directory...
11
by: shank | last post by:
<% Response.contenttype = "application/vnd.ms-excel" %> <% Response.AddHeader "Content-Disposition", "filename=hardware.xls" %> I'm using the above lines to generate a spreadsheet from a...
4
by: Dehaibe François | last post by:
Hi, I'm making a program which uses a scanner which is enable to can multiple pages. I want to save all the scanned images into a PDF FILE. Does exist an API which can generate PDF FILE in...
2
by: zoltix | last post by:
Hello, I try to send an xml from an aspx pages which generate an xml file. And I tried with this method FileStream fs = new...
4
by: Nick | last post by:
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...
5
by: Rob Roberts | last post by:
Is there any way to change VS2005 to generate HTML 4.01/Strict instead of XHTML 1.0/Transititional? VS2005 puts a DOCTYPE statement specifying XHTML 1.0/Transitional at the top of every new aspx...
6
by: ash | last post by:
i have a web page using frameset split into few pages. And I want to generate one page of HTML code and send it through email. My question is have to generate a HTML page using asp? Thx very much.
5
by: vikram | last post by:
I am developing a display web site which displays several listing and details, data is picked up from database for the lists. There is no search criteria but only pagination stuff. What i am...
5
by: pittendrigh | last post by:
There must be millions of dynamically generated html pages out there now, built by on-the-fly php code (and jsp, perl cgi, asp, etc). Programatic page generation is transparently useful. But...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.