[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Application Design

  • From: Michael Rys <mrys@m...>
  • To: Al Snell <alaric@a...>, fpgomez@r...
  • Date: Thu, 09 Aug 2001 18:51:32 -0700

asp application design
Our own tests with SQLServer 2000, its XML support and having MSXML 3.0
or later on the midtier, we get up to an order of magnitude better
performance (measured in req/s) than ASP based solutions for serving
data-driven webpages where business logic is not required on the midtier
by using the XML support of the database and have the XSLT applied on it
on the server. Not to count the simpler maintenance, faster development
cycle and less bugs. 

Best regards
Michael
--
Program Manager, SQL Server XML Technologies
mrys@m..., rys@a...
We store the Web and more...


> -----Original Message-----
> From: Al Snell [mailto:alaric@a...] 
> Sent: Thursday, August 09, 2001 5:53 PM
> To: fpgomez@r...
> Cc: xml-dev@l...
> Subject: Re: Application Design
> 
> 
> On Thu, 9 Aug 2001 fpgomez@r... wrote:
> 
> > I am looking at using XML for this.
> 
> > 3) Does anybody see any potential problems with this approach?
> 
> Yes... I'm not sure it's worth using XML here. What will it 
> gain you as opposed to a set of PHP pages that talk directly 
> to the database? Unless you have particular programming 
> experience with XSLT and not PHP/ASP/CGIs/whatever, I find it 
> easier to set up PHP under Apache than to set up an XSLT 
> engine and put things in place to make a web server invoke it 
> against XML pulled from an SQL database.
> 
> <table>
> <tr>
> 	<th>Name</th>
> 	<th>Description</th>
> </tr>
> <?
> 
> 	mysql_connect(...);
> 	$q = mysql_query(
> 		"SELECT * FROM Documents WHERE name LIKE '" .
> 		addslashes($HTTP_GET_VARS["id"]) .
> 		"'");
> 
> 	while($row = mysql_fetch_row($q)) {
> 		?>
> 		<tr>
> 			<td><a href="/documents/<?= 
> $row["filename"] ?>"><?= $row["name"] ?></a></td>
> 			<td><?= $row["description"] ?></td>
> 		</tr>
> 		<?
> 	}
> ?>
> </table>
> 
> One neat feature of PHP/ASP/whatever over XSLT is that:
> 
> 1) It's a real programming language. It can access databases, 
> the filesystem, various networking APIs, .dbm files, etc
> 
> 2) It's imperative, which means that it can not only format 
> data into an output, but it can update the database too.
> 
> If you're planning on writing PHP/ASP/whatever that outputs 
> XML elements and then transforms them with XSLT to produce 
> HTML, that's a bit more sensible, but a lot more work than 
> just emitting HTML in the first place. Seperate content from 
> formatting by putting all the SQL calls in a PHP function 
> library in a seperate file, and have .php files in the web 
> space directory that are just HTML templates with holes cut 
> in them to call the database functions.
> 
> This is a lot simpler to set up (only one language is needed, 
> you don't need to install an XML parser and an XSLT engine, 
> and all the data flow from back end to front end is done via 
> function call interfaces rather than an XML document with a 
> DTD/schema/informal prose description). And the resulting 
> programming model is just the difference between:
> 
> <html><head><title>
>  <xsl:value-of select="/page/title" />
> </title>...
> <xsl:for-each select="/page/results">
> 	<tr>...</tr>
> </xsl:for-each>
> 
> and:
> 
> <? include "../backend.inc" ?>
> <title><?= $title ?></title>...
> <? while($row=nextResult()) { ?>
> 	<tr>...</tr>
> <? } ?>
> 
> ...there's no real difference between the two, you just use 
> different sequences of magic symbols.
> 
> > Fred Gomez
> 
> ABS
> 
> -- 
>                                Alaric B. Snell  
> http://www.alaric-snell.com/  http://RFC.net/  
http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software


------------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: xml-dev-request@l...

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.