-
Building a client-side product configurator in XML
Recently, we have got a business requirement to convert a product configurator
from dynamic server side ASP - querying a SQL dbase - to a configurator that
can run off a CD.
Perfect I thought a chance to use XML - bacause on the CD we can contsrain
the browser type & have full control over the client environement !
So far I have worked out how to dump out SQL data tables to XML files that
could be stored on the CD.
I have also worked out how to do simple scripting with the data - using data
islands etc.
However, I am now running at the limits of my understanding. Can anyone help?
To explain further, the website version of the product configurator currently
works like:
Option 1 = select a type of product. This is the core family of products
--user selects--
Option 2 = select an appropriate child option. Note: the choices available
here are constrained by the selection of option1
--user selects--
Option 3
user selects etc.
[Thus, in many ways it is like configuring a car - Volvo - estate - 2.4 diesel
- green etc. etc.]
In the online version we use form posting and active re-querying of the SQL
tables based on user input.
So, my question is how could I emulate this on the offline CD version.
Any pointers you can provide, links to sites that may explain how to do this
[with examples] would be greatly appreciated.
Many thanks & happy Christmas
Stephen Anderson
-
Re: Building a client-side product configurator in XML
It depends on how your XML is set up, and also, to some degree, how much
data you need to process.
For example, you might have the product list in one XML file and the data
for each option in some other file, in which case, when the user selects a
product, you would need to load the option file and select the appropriate
items for that product, based on a ProductID of some kind.
Alternatively, you may have set the XML up in a single hierarchical file, in
which case you can simply query the already-loaded file with a different
query, limiting the results to options appropriate to the selected product.
If there's a lot of data for each product, you may have arranged the
products as individual XML files.
In the first case, you can use XSLT stylesheets with parameters. For
example, the options XSLT stylesheet would have one parameter that accepts a
ProductID, and would return a select list containing the options appropriate
to that ProductID.
In the second case (the single document case), you'll build a longer and
more specific query each time the user selects more specific options.
Finally, if you put things in separate files arranged by product, your
biggest problem would be extracting the list of product names. However you
should be able to pre-process all the files and create one XML file
containing the list of products. After selecting a product (which identifies
a product file) the process would be the same as the single-document case.
If there's too much data to fit in memory, you should investigate using SAX
instead.
Obviously, there are numerous other possibilities I haven't discussed. You
need to post some more info if you want specific answers.
"Stephen Anderson" <stephen.anderson@renishaw.com> wrote in message
news:3c0d0745$1@147.208.176.211...
>
> Recently, we have got a business requirement to convert a product
configurator
> from dynamic server side ASP - querying a SQL dbase - to a configurator
that
> can run off a CD.
>
> Perfect I thought a chance to use XML - bacause on the CD we can contsrain
> the browser type & have full control over the client environement !
>
> So far I have worked out how to dump out SQL data tables to XML files that
> could be stored on the CD.
> I have also worked out how to do simple scripting with the data - using
data
> islands etc.
>
> However, I am now running at the limits of my understanding. Can anyone
help?
>
> To explain further, the website version of the product configurator
currently
> works like:
>
> Option 1 = select a type of product. This is the core family of products
> --user selects--
> Option 2 = select an appropriate child option. Note: the choices available
> here are constrained by the selection of option1
> --user selects--
> Option 3
> user selects etc.
>
> [Thus, in many ways it is like configuring a car - Volvo - estate - 2.4
diesel
> - green etc. etc.]
>
> In the online version we use form posting and active re-querying of the
SQL
> tables based on user input.
>
> So, my question is how could I emulate this on the offline CD version.
>
> Any pointers you can provide, links to sites that may explain how to do
this
> [with examples] would be greatly appreciated.
>
> Many thanks & happy Christmas
>
> Stephen Anderson
>
-
Re: Building a client-side product configurator in XML
Russell,
Thanks very much for your reply. To answer your questions we have set up
the XML up in a single hierarchical file. Thus, your line "in
which case you can simply query the already-loaded file with a different
query, limiting the results to options appropriate to the selected product."
seems to be the answer. The trouble is I do not really know how to do this.
So to provide more info. (and to hope you can help)
On the web (online)
Our single SQL data table is set up so that every single combination of the
product exists as 1 record. We select and group by on the first column so
that the user makes a selection on A,B,C, etc. Once the user has selected
('A') we requery & return only records of type 'A'. We then present the user
with the select and group by on the second column X,Y,Z. etc.
On the CD (TOTALLY offline)
We have the table represented as one complete XML file - e.g:
[1 record]
<EPCRecord>
<ESRID>46905</ESRID>
<IDStr>RGH22</IDStr>
<MainProductId>7</MainProductId>
<MainProductIdStr>Overall length</MainProductIdStr>
<var1>A</var1>
<var1ID>46814</var1ID>
<Var1IDStr>1Vpp dual limit analogue</Var1IDStr>
<var2>05</var2>
<var2ID>46797</var2ID>
<Var2IDStr>0.5m length cable </Var2IDStr>
<var3>L</var3>
<var3ID>46811</var3ID>
<Var3IDStr>15-way D-type plug</Var3IDStr>
<var4>00</var4>
<var4ID>46871</var4ID>
<Var4IDStr>Standard option</Var4IDStr>
<var5>A</var5>
<var5ID>46847</var5ID>
<Var5IDStr>No adaptor</Var5IDStr>
<var6></var6>
<var6ID></var6ID>
<Var6IDStr></Var6IDStr>
<var7></var7>
<var7ID></var7ID>
<Var7IDStr></Var7IDStr>
<var8></var8>
<var8ID></var8ID>
<Var8IDStr></Var8IDStr>
<var9></var9>
<var9ID></var9ID>
<Var9IDStr></Var9IDStr>
<var10></var10>
<var10ID></var10ID>
<Var10IDStr></Var10IDStr>
<var11></var11>
<var11ID></var11ID>
<Var11IDStr></Var11IDStr>
<var12></var12>
<var12ID></var12ID>
<Var12IDStr></Var12IDStr>
<var13></var13>
<var13ID></var13ID>
<Var13IDStr></Var13IDStr>
<var14></var14>
<var14ID></var14ID>
<Var14IDStr></Var14IDStr>
<var15></var15>
<var15ID></var15ID>
<Var15IDStr></Var15IDStr>
<status>2</status>
<statusStr>Built to order</statusStr>
</EPCRecord>
The question I have then is how do I do the query to return a subset AND
THEN take a user choice based on this output to drive another query. This
is the bit I find totally mystifying.
If you could help at all I would be really grateful.
Many thanks
SA
"Russell Jones" <arj1@northstate.net> wrote:
>It depends on how your XML is set up, and also, to some degree, how much
>data you need to process.
>
>For example, you might have the product list in one XML file and the data
>for each option in some other file, in which case, when the user selects
a
>product, you would need to load the option file and select the appropriate
>items for that product, based on a ProductID of some kind.
>
>Alternatively, you may have set the XML up in a single hierarchical file,
in
>which case you can simply query the already-loaded file with a different
>query, limiting the results to options appropriate to the selected product.
>
>If there's a lot of data for each product, you may have arranged the
>products as individual XML files.
>
>In the first case, you can use XSLT stylesheets with parameters. For
>example, the options XSLT stylesheet would have one parameter that accepts
a
>ProductID, and would return a select list containing the options appropriate
>to that ProductID.
>
>In the second case (the single document case), you'll build a longer and
>more specific query each time the user selects more specific options.
>
>Finally, if you put things in separate files arranged by product, your
>biggest problem would be extracting the list of product names. However you
>should be able to pre-process all the files and create one XML file
>containing the list of products. After selecting a product (which identifies
>a product file) the process would be the same as the single-document case.
>
>If there's too much data to fit in memory, you should investigate using
SAX
>instead.
>
>Obviously, there are numerous other possibilities I haven't discussed. You
>need to post some more info if you want specific answers.
>
>"Stephen Anderson" <stephen.anderson@renishaw.com> wrote in message
>news:3c0d0745$1@147.208.176.211...
>>
>> Recently, we have got a business requirement to convert a product
>configurator
>> from dynamic server side ASP - querying a SQL dbase - to a configurator
>that
>> can run off a CD.
>>
>> Perfect I thought a chance to use XML - bacause on the CD we can contsrain
>> the browser type & have full control over the client environement !
>>
>> So far I have worked out how to dump out SQL data tables to XML files
that
>> could be stored on the CD.
>> I have also worked out how to do simple scripting with the data - using
>data
>> islands etc.
>>
>> However, I am now running at the limits of my understanding. Can anyone
>help?
>>
>> To explain further, the website version of the product configurator
>currently
>> works like:
>>
>> Option 1 = select a type of product. This is the core family of products
>> --user selects--
>> Option 2 = select an appropriate child option. Note: the choices available
>> here are constrained by the selection of option1
>> --user selects--
>> Option 3
>> user selects etc.
>>
>> [Thus, in many ways it is like configuring a car - Volvo - estate - 2.4
>diesel
>> - green etc. etc.]
>>
>> In the online version we use form posting and active re-querying of the
>SQL
>> tables based on user input.
>>
>> So, my question is how could I emulate this on the offline CD version.
>>
>> Any pointers you can provide, links to sites that may explain how to do
>this
>> [with examples] would be greatly appreciated.
>>
>> Many thanks & happy Christmas
>>
>> Stephen Anderson
>>
>
>
-
Re: Building a client-side product configurator in XML
I can help if u want but i need more detailed information. You can use for
example XMLHTTP over a off-line connection instead of using form post or
get. Everything is absolutelly possible to implement in client-side, I've
just finished an application that runs almost all features in this kind of
environment. I do want to help u just let me know what and how.
Jorge
"Stephen Anderson" <stephen.anderson@renishaw.com> wrote:
>
>Recently, we have got a business requirement to convert a product configurator
>from dynamic server side ASP - querying a SQL dbase - to a configurator
that
>can run off a CD.
>
>Perfect I thought a chance to use XML - bacause on the CD we can contsrain
>the browser type & have full control over the client environement !
>
>So far I have worked out how to dump out SQL data tables to XML files that
>could be stored on the CD.
>I have also worked out how to do simple scripting with the data - using
data
>islands etc.
>
>However, I am now running at the limits of my understanding. Can anyone
help?
>
>To explain further, the website version of the product configurator currently
>works like:
>
>Option 1 = select a type of product. This is the core family of products
>--user selects--
>Option 2 = select an appropriate child option. Note: the choices available
>here are constrained by the selection of option1
>--user selects--
>Option 3
>user selects etc.
>
>[Thus, in many ways it is like configuring a car - Volvo - estate - 2.4
diesel
>- green etc. etc.]
>
>In the online version we use form posting and active re-querying of the
SQL
>tables based on user input.
>
>So, my question is how could I emulate this on the offline CD version.
>
>Any pointers you can provide, links to sites that may explain how to do
this
>[with examples] would be greatly appreciated.
>
>Many thanks & happy Christmas
>
>Stephen Anderson
>
-
Re: Building a client-side product configurator in XML
Thanks Jorge - have mailed you separately.
SA
"Jorge Luis Ribeiro" <jribeiro@bsamail.com.br> wrote:
>
>I can help if u want but i need more detailed information. You can use for
>example XMLHTTP over a off-line connection instead of using form post or
>get. Everything is absolutelly possible to implement in client-side, I've
>just finished an application that runs almost all features in this kind
of
>environment. I do want to help u just let me know what and how.
>
>Jorge
>
>"Stephen Anderson" <stephen.anderson@renishaw.com> wrote:
>>
>>Recently, we have got a business requirement to convert a product configurator
>>from dynamic server side ASP - querying a SQL dbase - to a configurator
>that
>>can run off a CD.
>>
>>Perfect I thought a chance to use XML - bacause on the CD we can contsrain
>>the browser type & have full control over the client environement !
>>
>>So far I have worked out how to dump out SQL data tables to XML files that
>>could be stored on the CD.
>>I have also worked out how to do simple scripting with the data - using
>data
>>islands etc.
>>
>>However, I am now running at the limits of my understanding. Can anyone
>help?
>>
>>To explain further, the website version of the product configurator currently
>>works like:
>>
>>Option 1 = select a type of product. This is the core family of products
>>--user selects--
>>Option 2 = select an appropriate child option. Note: the choices available
>>here are constrained by the selection of option1
>>--user selects--
>>Option 3
>>user selects etc.
>>
>>[Thus, in many ways it is like configuring a car - Volvo - estate - 2.4
>diesel
>>- green etc. etc.]
>>
>>In the online version we use form posting and active re-querying of the
>SQL
>>tables based on user input.
>>
>>So, my question is how could I emulate this on the offline CD version.
>>
>>Any pointers you can provide, links to sites that may explain how to do
>this
>>[with examples] would be greatly appreciated.
>>
>>Many thanks & happy Christmas
>>
>>Stephen Anderson
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks