Rex 在 2004-11-02 23:10:13 说:
Eportal with readme and source code下面的英文readme其实是偶写给TA（好像就是lecturer本人）看的……懒得翻译成中文以及做修改了，其实，只是要求写几行字而已……我无聊，所以写了这么多出来……
I am using ts2.
So, the all the source files are in
my pages, can be viewed at
My implementation of the project is different from the others. I try to create a "portal" that provides webshop services for companies. I somehow decided to called it "Eportal", this has no specific meaning.
I implemented the project using ASP.Net in VB.Net and used MS SQL as the database.
The account of "cs3266ta" has been created.
The webshop of "cs3266ta" is at http://ts01/u0307203/cs3266ta
You may login from http://ts01/u0307203. And, the administration page will be open. Decription of the administration page is given later.
Customer Administration Page
Customers can login to the administration page from the navigation bar the the top of most of the pages in webshop.
The account of "cs3266ta" as an customer has also been created. (I have made up its informations.)
Customer could edit their infomation like address and view the status (including pending/confirmed/rejected) in it.
The tables are in server ts04, database cs3266_01.
All the table name started with the "Wuvist_", like "Wuvist_Companies".
And, all the stored procedures in the database cs3266_01, seems that no one else are using stored procedures in cs3266_01, at least up the the moment 0:06 2004-11-2.
Wuvist_Companies: It stores infomation of the "companies" have applied webshop from "Eportal". Each company will have its own webshop. A company with CompanyID "XXX" will have its webshop at http://ts02/u0307203/XXX".
Wuvist_Category: Stores category information of all company.
Wuvist_CompanyNews: Stores News of all company.
Wuvist_Customer: Stores information the buyers of eportal, I use email as their login ID for simplicity.
Wuvist_msg: Stores the message on each company's Guestbook
Wuvist_Orders: Stores the essential infomation of an order, like payment/shipment information/customer/company.
Wuvist_Orderdetail: Stores the details of each order, including products/quantity/order status.
Wuvist_Product: Stores Product information
Wuvist_Picture: Stores product image information, including the path of the image.
Wuvist_Stock: Stores the stock changes information of all the products.
A few temporay tables will be created during execution of the stored procedures. For example, the stored procedure "insert_order" will create a temporay table called "tempc" when it is executed, "tempc" is dropped at the end of execution. I didn't use default temporay tables with table name startd with "#", because I can't control their life span explicitly.
I basically follows the N - Tier design pattern, though try to use MVC at the begining.
The aspx files as one tier,
The code-behind files, few independent class as one tier,
The stored procedures as one tier,
The datebase as one tier.
This enable "eportal" to support webshop services for mulitple users. Though, each webshop may have different layout ( Skin/Template for each webshop, however, I only impletement one template due to time constrain. ), but they all use the same code-behind class.
Furthermore, I created quite a few user web controls to modularize "eportal". For example, the navigation bar on every page.
I ceated a independent class: conn.vb to provide MS SQL access for all the other classes. Thus, instead of importing System.Data.SqlClient, other class create an "conn" obejct. As a result, all the code-behind classes are somewhat "database independent", they only deal with DataTable, SqlCommamd, etc. I foresee the possibility to implement "eportal" on database other than MS SQL by overiding the class conn.vb. However, I have no time to prove that. This design is inspired by the Provider Pattern illustrated in DotNetNuke.
Database nullities are handled with the class Null.vb. Again, this class is inspired by the nullity handling of DotNetNuke.
I also thougth of MVC at the beginning. This is why I created a class: companyDB.vb to treat each Company as one model. However, it is partly done, as I later find MVC doesn't increase coding efficiency in my case. I didn't implement the shopping cart as an model, though it should be. This is because I only started coding it on 30th Oct! Thus, the code behind class of buy.aspx.vb, rebuy.aspx.vb and confirm.asxp.vb are poorly written. A lot of repeated codes can be eliminated if I model the shopping cart.
I used stored procedures extensively, which make them into one tier in some sense. As a result, the possibility of implementation of "eportal" is not possible for database doesn't support stored procedures, for example, MySQL. And, even it is possible to implement "eportal" on Database like Oracle, the stored procedures must be modified.
Description of Companies Administration Page:
The Options are:
--- This link is for changing the "company" -- "cs3266ta"'s company profile, including Name, address, company description etc.
--- Click here if you want to change the password from 'cs3266ta' to others.
--- Company News are listed at the frontpage of the webshop. I haved copied some "News" from CS3266's homepage. The editor that I used here is not my work. It is a free asp.net control called FreeTextBox available from http://www.freetextbox.com/. I purposely use it to show ASP.Net's ability to integrate controls programmed in different language: FreeTextBox is coded in C#, whereas I am using VB.Net for "eportal". Indeed, I could use a simple text box to replace this fancy editor.
-- The page will list out all the company's news. And, the news could be edited/deleted in this page.
-- A page that list out all the orders that the company has received. Click on the the order id, the details of the selected order will be shown, and you can change the Order status to "pending", "confirmed" or "rejected", changing of order status will affects the stock of the orderred product repectively.
--You can add/edit/delete product categories in this page. Categories that has items(products) are not allowed to be deleted.
-- You can add new products here. Please make sure that all fields are entered and selectd. Sorry that I forget to implemente input validation at this page. An error will occur when adding product without any category. Ignore the Imges field when adding products.
-- When the products has been added, a link of adding product images will appear. You may click it to upload product images. The images must be in jpg or gif format and the width should not exceed 1024px, the height should not exceed 768px. The saved file name of uploaded images are generated by the system occuring to the uploading time. This is to avoid flle name collission. A thumbnail of the uploaded images will also be generated. I add in the phrase "Powered by Eportal" in all the thumbnails.
--- This will list out all the products. You can directly delete product from the page.
--- Click on the ProductID to view/edit product details(including product iamges)
--- Click on the stock number to view the reports required in 3a). The page will show all the transections and stock changes of the selected product in a certain range of date and time graphically. You may move the cursor to the green bar to view the event that course the change of stock.
--- edit/delete all uploaed products.
--- Logout from the administration page. The Session used for login will be destroyed.
Finally, sorry for this wordy readme file.
问天 @ 2004-11-02 02:53:06
Rex 在 2004-11-02 23:10:13 说: