joohang

Lifer
Oct 22, 2000
12,340
1
0
Zuni,

Ever considered using XML in the forums? It could save quite a bit of bandwidth and overall performance (especially with long threads).

I got some great ideas, if you are interested.
 

MegalodoN

Senior member
Oct 9, 1999
557
0
0
joohang -
I thought about that too.

XML would fit perfectly into a design like this. Although, it would require a total redesign of the forums...

We could call it FuseTalk 3.0 or maybe FuseTalk-X :)
 

dcpsoguy

Diamond Member
Nov 5, 2000
3,252
0
0
Just a simple question-

How would XML make the forums run faster , and save bandwith? WOuld you be backing away from Coldfusion?
 

Jason Clark

Diamond Member
Oct 9, 1999
5,497
1
0
Nope ColdFusion is here to stay. You can combine then to produce some nifty results. We'll see :).
 

joohang

Lifer
Oct 22, 2000
12,340
1
0
dcpsoguy,

Based on my idea of implementing XML, it saves bandwidth (in IE5+) by streaming the forum data in XML and applying an XSL stylesheet on the client.

This releases the load of Cold Fusion generating HTML and the contents can be transported at a significantly lower size.


Zuni: I'll send you an e-mail within the next couple of days.
 

dcpsoguy

Diamond Member
Nov 5, 2000
3,252
0
0
Sweet. That would be cool. In case you are wondering, I know the Coldfusion programming language, and since it is a awesome programming language, Im glad it is here to stay.
 

joohang

Lifer
Oct 22, 2000
12,340
1
0
I thought some of you would be interested in reading my e-mail to Zuni.



Here are my ideas that could *possibly* improve the the forum performance. Judging from the performance enhancements of MSXML 3.0, it could definitely save quite a bit of server load as well.

I'm not exactly sure how you built FuseTalk, so I'll just make a bunch of assumptions.

A) To display the contents of a thread, Cold Fusion queries the data source, generates the appropriate HTML, and then sends off the results to the client. The HTML contents can grow quite large, especially with very long threads. According to Netscape 4.x that I use at work, some threads were 300+ KB.

Possible new scenario:
Cold Fusion queries the data source, generates an XML data (which may be validated through a schema or DTD), and sends the results to the clients. The XML data could not only contain contents, but information about the customizable elements (such as "allow PM to the user," and "allow viewing of user profile," etc). XML eliminates the need to generate repetitive code, and therefore it is much more compact than HTML. The returned XML results will be transformed into HTML on the client with an XSL stylesheet.

Possible Problems:
- I am not 100% sure if Cold Fusion can do this. I only use ASP. :)
- The client needs IE 5.x, which includes MSXML 2.0. MSXML 3.0 is much faster and has more features such as XSLT, but it is not included with the browsers by default. You could do a MSXML version checking and ask AT users to install MSXML 3.0.
- I don't have enough experience with XML to be certain whether this will provide a significant improvement, but it will sure save a lot of bandwidth.
- Maybe XML should be an optional feature. You will need to use the "traditional" (generating HTML with Cold Fusion) for Netscape and older IE any ways.

Other possibly cool features:
- XML can be asynchronously downloaded. This means that the "main layout" of the forum would stay as it is, but the XML data can be refreshed. This allows refreshing of threads by simply download an XML data (extremely compact) with updated thread messages. Maybe you could even add an option to refresh every couple of minutes for "hot threads."

- Based on the idea above, the client (IE5+) could also choose a preferred method of sorting, number of messages to be displayed per page, and so on. All these could be achieved within the client, and thereby not impacting server performance at all.

- You could safely allow HTML on message posts, too. Simply build a Schema that only allows &quot;simple&quot; and &quot;safe&quot; tags such as <p>, <b>, etc. If a &quot;prohibited&quot; tag such as <script> is entered, the XML parser (run on the server) would return an error as HTML is not validated. One drawback about this feature is that AT members must know some basic XML/XHTML rules. i.e. all tags must be closed, lower-case, etc.

- It'd be also cool if each member could have their own CSS file for their messages.



LMK what you think.
 

skylark

Senior member
Feb 24, 2001
798
0
0
I thought Netscape doesnt handle XML that well?

From what I've read on XML.. its implementation in the browsers has been quite slow??

Im having doubts that Netscape can handle XML.
 

joohang

Lifer
Oct 22, 2000
12,340
1
0
I mentioned that in my post.

Client-side XML parsing only works with IE5.x

And no, it's not slow; especially if the client installs MSXML 3.0. It just &quot;seems&quot; slow because the parsing occurs asynchronously. As of today, using XML would be the ideal way to build efficiently-loading web sites IMHO.

Netscape 4.x does not recognize XML at all, although but Netscape 6.0 does. I didn't play around enough with it yet, so can't comment whether or not this trick will work with Netscape 6.

I am not sure about the browser stats for the forum, but IE5 is probably the dominant browser.