Project phase 3
Note: Deadline for phase3 part 2
has been extened to March 11th, Friday 11:59 p.m.
Also due to the large number of invalid xml files, you are only
required to import 4 sets of valid xml files into your database (ignore
the rest).
A consortium of companies agrees to form a partnership, and offer
their customers products from all companies in the consortium. Every
company in class needs to participate in the consortium: you cannot
opt out.
In part 1 every company will export its data about products and
shipping methods in a common, standardized schema: the result will be
a file called company-name.xml
In part 2 every company will import the data of all its partners in
the consortium into its own database. Then will offer their clients
products from all the partner companies (and apply a markup). After
each purchase from a partner company, an Order document is generated
and sent somehow to the other company (we will not implement shipping
the order document). The Order is also in XML format.
Detail
You will be working in the same group as you were in phase 2, and...
Part 1
You will export the data in your group's databases into an xml file
(like what you did in hw 3), following this DTD
Keep in mind that the DTD is for exchanging data between groups
only.... how you display the data you got to the users is another thing
(which has nothing to do with the dtd)
some notes on the attributes:
<author> if you do not have first name last name separated in
your database, break it up (somehow) into first name and last name when
you export it.
<price> original selling price.
<discountPrice> the actual selling price after discount (same as
price if no discount), do the conversion by yourself if you have a
different format in your database.
for the <price> under <shipping>...
<flat> means price for the "fixed price" pricing option
<perUnit> means price for the "per item" pricing option
<perPound> means price per pound for the price by weight pricing
option. If you had it in per kg please convert it.
if the tag is missing it means that option is unavailable. however, at
least one of those 3 tags must be present under each <price>
element.
finally, even though some of the elements are optional, please export
your xml to reflect the actual data in your database. Say if your
shipping methods have restrictions, please export them.
Part 2
You will import all the xml files from
allllll other group's into your
relational databases (again like what you did in hw3...). You may
modify your database to store the groups that generated the data (also
you
may modify the keys of the tables, in case that the other groups got a
book that has the same isbn as some book in your inventory). Then, you
need to modify your web-shopping app in phase 2 to support these
additional data. A user should be able to purchase products from other
companies through your website, but with 10% additional charge. When a
user made such a purchase, you system needs to generate an xml order
file following this DTD. In short, required
extensions to the web app are...
- Browsing - you need to display information about all other
companies products (except what company did they come from). All
browsing methods (find by title, find by artist / author, and show all
products) should support this.
- Shopping cart management - The user can add products from other
companies to the shopping cart (except the price displayed would be 10%
higher than what you imported from the xmls)
- Transaction - If the user purchases a product from other
companies, you display some message like "this prodcut will be shipped
by our partner, company xyz", and you let your customer to choose a
shipping option from those provided by that partner company. Then you
need to generate an xml order file following this DTD.
For destination, it should be you customer's address (just forget about
the customer information privacy thing). create a directory named
"orders" under your web app folder and store the xml files there.
- You still need to take one shipping restriction - destination
cities into
account when displaying your partner's shipping methods. (I guess you
can ignore the max weights or max items in a package if you want to coz
they weren't exported into the xmls in part1)
- Note that your user can buy products from several different
companies at the same time and he will have to choose shipping methods
for each company
- You can assume all the products from a same partner company is
shipped as one single package (ignoring all the packing stuff) (and
products from N different partner
companies will generate N packages), and you can ignore the warehouse
of origin when displaying your partners' shipping methods.
The "orders" xml files generated should be stored under a folder
"orders" under your webapp directory. To do so....
- First create the orders directory
- change the security options and give "Internet Guest Account"
permissions to write in that folder
- string file = Server.MapPath(".\\orders\\") + "whatever your output
filename is.xml"
- Stream output = new StreamWriter(file);
- ..... something like that
Rules and restrictions
- no new databases.
- new tables allowed
- you may modify your tables to store which company originated that
piece of data.
Turnin
part 1: put your xml file in
your phase 3 turnin folder by Mar 2nd Wed midnight.
part 2: A runnable version of
your modified web app in your phase 3 turnin folder by Mar 11th Wed
midnight.