买易通网站设计详细说明分析.doc_第1页
买易通网站设计详细说明分析.doc_第2页
买易通网站设计详细说明分析.doc_第3页
买易通网站设计详细说明分析.doc_第4页
买易通网站设计详细说明分析.doc_第5页
已阅读5页,还剩54页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

买易通网站详细设计文档Document Version1.0AuthorModuleBill LuArchitecture & Batch ScriptHuili TangUser InterfaceJun FengDatabase & Document IntegrationWick WuLogical LayerYonghe YaoUser InterfaceCreate Date 2005-6-1Last Update Date2005-6-1文档目录1.概述(Summary)51.1文档目的(Introduction)51.2背景(Background)51.3相关文档(Related Documents)52.系统架构(System Architecture)62.1系统性能(Performance)62.2运行环境(Environment)62.3基本概念(Concepts)62.4程序模块结构(Module Structure)62.5后台脚本处理过程(Batch Process)62.6人工处理过程(Manual Process)62.7系统容错设计(Application Exceptions)63.用户界面设计(User Interface Design)74.逻辑层设计(Logic Layer Design)84.1系统类结构及关系84.1.1总述:84.1.2CategorySystem.104.1.3ProductSystem.134.1.4AccountSystem.154.1.5ReviewSystem.194.1.6StoreSystem.204.2各主要算法实现流程214.2.1Overview.214.2.2Category Related.214.2.3Product Related234.2.4Review Related.274.2.5User Related.274.2.6Store Related275.数据库设计(Database Design)285.1Database summary285.2TBL_ACCOUNT305.3TBL_ACCOUNT_LOGON325.4TBL_APPLYCHANGE335.5TBL_ARTICLE345.6TBL_ARTICLE_BODY355.7TBL_BATCH365.8TBL_CATEGORY375.9TBL_CONDITION395.10TBL_LIST405.11TBL_PRODUCT415.12TBL_PRODUCT_CHANGE435.13TBL_PROPERTY445.14TBL_PROPERTY_CHANGE455.15TBL_PROPERTY_GROUP465.16TBL_PROPERTY_LIST475.17TBL_PROPERTY_VALUE485.18TBL_RATING495.19TBL_REVIEW505.20TBL_REVIEW_BODY525.21TBL_STORE535.22TBL_STORE_LOGON555.23TBL_TOPIC565.24TMP_TRUST576.后台脚本设计(Batch Script Design)587.名词解释(Terminology)597.1关系网(Web of Trust)597.2开放式目录管理(Open Taxonomy)591. 概述(Summary)1.1 文档目的(Introduction)1.2 背景(Background)1.3 相关文档(Related Documents)2. 系统架构(System Architecture)2.1 系统性能(Performance)2.2 运行环境(Environment)2.3 基本概念(Concepts)2.4 程序模块结构(Module Structure)2.5 后台脚本处理过程(Batch Process)2.6 人工处理过程(Manual Process)2.7 系统容错设计(Application Exceptions)3. 用户界面设计(User Interface Design)4. 逻辑层设计(Logic Layer Design)4.1 系统类结构及关系4.1.1 总述:MyET里我们抽象出5个实体对象,分别是Category, Product, User, Review和Store,. 作为整个Business Faade里面的主要功能块,User Interface Layer 通过调用实体对象的功能函数完成操作。Business Faade层经过Business Rule层的数据检查,通过Data Access层以Common Layer定义的数据结构实现对数据库的访问。 Business Faade5个实体对象对应的Class名称分别是CategorySystem, ProductSystem, AccountSystem, ReviewSystem, StoreSystem. 下面是各个Class实现的主要接口列表。4.1.2 CategorySystem.Function: CreateCategoryPara: int parentID, /所在的父目录位置; string catName, /要创建的目录名称; CategoryData.CategoryType catType, /目录类型,枚举类型 NotLeaf = 0, Leaf = 1 string remark , /备注;Return: -1; /创建失败int Id ; /创建得到新的categoryid ;Description: 创建一个新的category。Function: GetCategoryByIDPara: int categoryID, /CategoryData category /out Category DataReturn: VoidDescription: 通过CategoryID得到category详细Function GetChildrenPara: int categoryID, CategoryData category /out Category Data.Return : VoidDescription: 返回目录的子目录,如果是叶子节点,返回空。Function GetParentsPara:int categoryID, CategoryData category /out 按照从Root到该categorys 的 Parent的顺序排列的目录集,Return: voidDescription: 根据CategoryID得到该Category的所有长辈,按照由高到低的顺序排列Function GetTopLevelCategoriesPara:CategoryData category /out,得到Top Level的目录集合,按照从左到右的顺序排列。Return :VoidDescription : 得到顶层目录集合,按照显示顺序排序过的。Function GetRecommendCategoriesPara:int categoryID,/指定目录的 itemCount, /推荐目录的个数CategoryData category/out 得到推荐目录的列表,并按显示顺序排列Return: voidDescription:Function UpdateCategoryPara:CategoryData category/ 要修改的Category Data.Return: Bool/True for Success, False for failed.Description:更改目录的信息。Function: SetLinkCategoryPara:int srcCategoryID,int destCategoryIDReturn: Bool/True for Success, False for failed.Description: 设定Link Category, if Linkid0 means this category was linked to Linkid. Function : GetRecommendProductsByIDPara:int categoryID, ProductData product /outReturn: voidDescription: 得到目录对应的推荐商品列表Function : GetRecommendStoresByIDPara:int categoryID, ProductData product /outReturn: voidDescription: 得到目录对应的推荐商品列表Function : GetBestReviewerByIDPara:int categoryID, AccountData account/ outReturn: VoidDescription :得到目录对应的最佳评论员。4.1.3 ProductSystem.Function CreateProductPara:ProductData productReturn: bool/ true for success; false for failed.Decription : Create Product.Function GetAllProductsInCategoryPara:int categoryID, ProductData product/out产品信息。Return: voidDescription: 得到目录下的所有产品信息列表。Function GetProductByIDPara:int productID,ProductData productReturn:voidDescription: 通过productID得到产品的信息。Fucntion GetProductReviewsPara:int accountID,int productID, ReviewData review/Review DatasetReturn: void Description: 得到产品的Review信息,该信息已经按照显示顺序排序过。不包括Review Body,Reviews written by accountid or whom accountid trusted will shown front.Function GetProductsByConditionsPara:Conditions conditions, /Marked By Wick , Contitions have not definedProductData productReturn:voidDescription: 根据Contitions, 返回product的数据集,conditions是个条件列表。Function GetProductsByKeywordPara:string keyword, int catgoryID, ProductData product /out,返回的数据集Return:voidDescription: 根据关键字返回product datasetFunction GetProductPropertiesPara:int productID,PropertyData propertyReturn: voidDescription: 得到产品的propertyData集。PropertyData 按照类型分组,先是组名称,接着是组数据。一次在页面列出。详细的数据格式等待制定。Function: UpdateProductPara:ProductData productReturn: bool /True for Success;False for failed.Description : 修改product数据。4.1.4 AccountSystem.Function: AddBlockListPara:int accountID, int blockerIDReturn: int / -1 faled ListID for success.Description: 为accountID用户Block新的blockID。Function AddTrustListPara:int accountID, int trusterIDReturn: int /-1 failedListID for this record if SucceedDescription: 为accountID用户添加新的Trust记录。Function AddWishCategoryPara:int accountID, int categoryIDReturn: int /-1 for failedListID for Success.Description:用户添加新的Wish Category.Function: AddWishProductPara:int accountID,int productIDReturn: int/ -1 for failedListID for success.Description: 用户添加收藏的产品。Function: CreateAccountPara:string logonname, string passwordReturn: bool / True for success; False for failed.Description: 创建新用户Function: GetAccountByIDPara: int accountID,AccountData account /outReturn: VoidDescription: 通过id得到用户的数据.Function : AccountLogonPara : string logon,string passwdReturn: bool / true for Login Successfully False for login failedDescription: 用户登陆验证Function : GetAccountReviewsPara:int accountID, ReviewData review /outSorted Review DataReturn: voidDescription: 得到指定用户的Reviews.Function : GetTrusteesListPara :int accountID, ListData list/outReturn : voidDescription: 得到制定用户信任的用户数据。Function: GetTrustersListPara: int accountID,ListData list /outReturn : voidDescription: 得到信任该用户的用户数据Function :GetWishCategoriesPara:int accountID,ListData list /outReturn: voidDescription: 得到用户收藏的目录信息列表。Function :GetWishProductsPara:int accountID,ListData list/outReturn: voidDescription: 得到用户收藏的商品信息Function :RemoveListPara:int listID /列表项, trust,block,or wish category,wish products.Return: bool / True for succeed False for failed.Description: 从list表里删除选项。Function: UpdateAccountPara:AccountData accountReturn: bool / True for succeed, False for failed.Description:修改帐号的参数信息。Function : ChangePasswordPara:int accountID,string oldPassword,string newPasswordReturn: bool:/True for succeed; False for failed.Description:修改密码。 4.1.5 ReviewSystem.Function: CreateReviewPara: ReviewData reviewReturn:bool / True for success; False for failed.Description:创建新的Review.Function :GetReivewRatingsParaint reviewIDReturn: ReviewData / 返回Review的详细评价。Description: 得到Review的评论和rating信息列表。Function: GetReviewByIDPara :int reviewID /Return: ReviewData /Description: 根据某个Review的ID返回该Review的信息包括Review BodyFunction: UpdateReviewPara:ReviewData reviewReturn: bool / True for success, False for failed;Description: Update Review的信息。4.1.6 StoreSystem.function CreateStorePara:StoreData storeReturn:bool / True for success, False for fail.Description: 创建store. Function GetStoreByIDPara :int storeIDReturn: StoreData / Description:通过storeid得到store的信息。Function : GetStoreByLogonPara:string logon,string passwdReturn: StoreDataDescription: 根据商店登录名和密码获取商店信息Function: GetStoreReviewsPara:int storeIDReturn: ReviewData Description: 不包括ReviewBody.Function: UpdateStorePara:StoreData storeReturn:bool / True for success, False for failed.Description:update Store Info.Business Rules4.2 各主要算法实现流程4.2.1 Overview.4.2.2 Category Related. 1.1 Category List非叶子Category伪代码算法:If not login statusBeginIf Cached(Page)BeginshowCachePage. /Public View 使用缓存Return;End;End;/显示非叶子节点的层次目录结构CategoryData category1 = GetChildren(CurrentCategoryID)For each category1 BeginShowCategoryTitle(category1.row);SubCategoryID = category1.CategoryIDCategoryData category2 = GetChildren(SubCategoryID);For each category2BeginShowCategoryTitle(category2.row);End; End;Cache(Page);叶子节点If publicView Status = trueBeginIf Cached(page) then BeginshowCachePage.Exit;End;End;ListRefineFilter() / Refer to 2.2 Refine Results By Filter;ListProducts() / Refer to 2.1 List Products. 1.2 Text Navigation/Actually is function GetParents in CategorySystem;DataTable dt;CategoryData category = GetCategoryByID(categoryid);String path = category.row.CATEGORYCODE;For each 4 chars in pathBeginID = strtoint(4chars);CategoryData row = GetCategoryByID(ID);dt.addrow(row)End;Return dt; 1.3 / 得到Category对应的Properties列表GetCategoryProperties(categoryID)BeginSql = select p.*,g.groupname, from TBL_Property p, TBL_Property_Group g where p.categoryid = categoryID and g.categoryid=categoryID and case p.groupid: when p.goupid0 then g.groupid=p.groupid; Result = execute(Sql);Return(Result);End; 1.4 /得到Product的Property和value GetProductProperty(productID)BeginEnd;1.5 4.2.3 Product Related2.1 List Products./伪代码CheckCachePageForPublicView();RefineResultsByFilter(); /Refer to 2.2ProductData product = GetAllProductsInCategory(catgoryID)Foreach ProductShowProductInfo;2.2 Refine Results by filterStep A.B.CStep A: Get Contitions Properties./得到要列出的Property Name, 如品牌,价格,厂家 PropertyArr GetConditionTitles(categoryID) BeginSql = select distinct pertyid, pertyName from TBL_Condition con, Tbl_Property p where categoryid=categoryIDResult = Execute(Sql); Return (Result); End;SelectedPropertyArr= GetSelectedFromLinkParam.ShowPropertyArr = PropertyArr SelectedPropertyArr;StepB:Show conditions from Step A;Foreach ShowPropertyArr doBeginShowConditionTitleListArr = GetConditionListItems(categoryID, ShowPropertyArrpropertyID)ShowConditionsOfListArr;End;/得到要显示的属性的列表,如价格列表。GetConditionListItems(categoryID, propertyID)BeginSql = select * from TBL_Condition where categoryid=CategoryID and propertyid=propertyID order by displayOrder;End;StepC: GetProductsListByConditions. Sql = select * from product where For each SelectConditionsArrBeginSql= sql + and +SelectConditionsArrEnd;ProductData product = Execute(Sql);ListProducts();2.3 List Product Reviews.2.3.1 ShowReviewsList2.4 Rate Product.2.5 Search Product TBD4.2.4 Review Related.3.1 Read Review3.2 Write Review3.3 Rate Review4.2.5 User Related.4.1 Registration4.2 Member Page (self);4.3 Member Page(other)4.3 Role and Rank4.2.6 Store Related5. 数据库设计(Database Design)5.1 Database summaryNumber of tables:23Number of views:0Number of columns:231Number of indexes:23Number of foreign keys:0TablesColumnsIndexesNotesTMP_TRUST41TBL_TOPIC101TBL_STORE_LOGON41TBL_STORE251TBL_REVIEW_BODY21TBL_REVIEW191TBL_RATING81TBL_PROPERTY_VALUE61TBL_PROPERTY_LIST51TBL_PROPERTY_GROUP41TBL_PROPERTY_CHANGE61TBL_PROPERTY81TBL_PRODUCT_CHANGE81TBL_PRODUCT211TBL_LIST71TBL_CONDITION61TBL_CATEGORY181TBL_BATCH101TBL_ARTICLE_BODY21TBL_ARTICLE131TBL_APPLYCHANGE71TBL_ACCOUNT_LOGON41TBL_ACCOUNT3415.2 TBL_ACCOUNTColumnsData typeAllow NULLsNotesAccountId (I1)INTEGERNot allowedDisplayNameCHAR(32)AllowedRealNameCHAR(32)AllowedBirthdayCHAR(8)AllowedEmailCHAR(32)AllowedCountryKeyCHAR(4)AllowedProvinceKeyCHAR(4)AllowedAddressCHAR(64)AllowedZipCodeCHAR(8)AllowedTelephoneCHAR(16)AllowedMobilephoneCHAR(16)AllowedRankSMALLINTAllowedTrustScoreINTEGERAllowedReviewCountINTEGERAllowedImageURLCHAR(128)AllowedBiographyCHAR(128)AllowedReferCodeCHAR(16)AllowedCreateDateTIMESTAMPAllowedUpdateDateTIMESTAMPAllowedLastLogonDateTIMESTAMPAllowedIsShowTrustBOOLAllowedIsAlertBOOLAllowedIsShowReview1BOOLAllowedIsShowReview2BOOLAllowedIsShowReview3BOOLAllowedIsShowReview4BOOLAllowedIsShowReview5BOOLAllowedIsShowReview6BOOLAllowedIsShowReview7BOOLAllowedIsShowNameBOOLAllowedIntReserved1INTEGERAllowedIntReserved2INTEGERAllowedStringReserved1CHAR(32)AllowedStringReserved2CHAR(32)AllowedIndexesColumnsSort orderPK_TBL_ACCOUNT (I1)AccountIdAscending5.3 TBL_ACCOUNT_LOGONColumnsData typeAllow NULLsValue/RangeAccountID (I1)INTEGERNot allowedLogonCHAR(20)Not allowedPasswordCHAR(20)Not allowedStatusSMALLINTNot allowedIndexesColumnsSort orderPK_TBL_ACCOUNT_LOGON (I1)AccountIDAscending5.4 TBL_APPLYCHANGEColumnsData typeAllow NULLsNotesApplyID (I1)INTEGERNot allowedApplicantINTEGERNot allowedChangeTypeSMALLINTAllowedItemIDSMALLINTAllowedRatingScoreSMALLINTAllowedStatusSMALLINTAllowedApplyDateTIMESTAMPAllowedIndexesColumnsSort orderPK_TBL_APPLYCHANGE (I1)ApplyIDAscending5.5 TBL_ARTICLEColumnsData typeAllow NULLsNotesArticleID (I1)INTEGERNot allowedTitleCHAR(64)Not allowedArticleTypeSMALLINTNot allowedAuthorTypeSMALLINTNot allowedAuthorIDINTEGERNot allowedDisplayOrderSMALLINTAllowedCreateDateTIMESTAMPAllowedUpdateDateTIMESTAMPAllowedExpireDateTIMESTAMPAllowedCategoryID1INTEGERAllowedCategoryID2INTEGERAllowedCategoryID3INTEGERAllowedStatusSMALLINTAllowedIndexesColumnsSort orderPK_TBL_ARTICLE (I1)ArticleIDAscending5.6 TBL_ARTICLE_BODYColumnsData typeAllow NULLsNotesArticleID (I1)INTEGERNot allowedBodyCHAR(32767)AllowedIndexesColumnsSort orderPK_TBL_ARTICLE_BODY (I1)ArticleIDAscending5.7 TBL_BATCHColumnsData typeAllow NULLsNotesBatchID (I1)INTEGERNot allowedBatchTypeSMALLINTNot allowedFileNameCHAR(64)Not allowedTotalCountINTEGERAllowedSuccessCountINTEGERAllowedFailCountINTEGERAllowedStatusSMALLINTAllowedBeginDateTIMESTAMPAllowedEndDateTIMESTAMPAllowedRemarkCHAR(64)AllowedIndexesColumnsSort orderPK_TBL_BATCH (I1)BatchIDAscending5.8 TBL_CATEGORYColumnsData typeAllow NULLsNotesCategoryID (I1)INTEGERNot allowedCategoryCodeCHAR(16)Not allowedCategoryNameCHAR(32)Not allowedParentIDINTEGERNot allowedCategoryTypeSMALLINTNot allowedLinkIDINTEGERAllowedImageUrlCHAR(128)AllowedRatingName1CHAR(16)AllowedRatingName2CHAR(16)AllowedRatingName3CHAR(16)AllowedRatingName4CHAR(16)AllowedRatingName5CHAR(16)AllowedProductCountINTEGERAllowedStatusSMALLINTAllowedDisplayOrderSMALLINTAllowedCreateDateTIMESTAMPAllowedUpdateDateTIMESTAMPAllowedRemarkCHAR(128)AllowedIndexesColumnsSort orderPK_TBL_CATEGORY (I1)CategoryIDAscending5.9 TBL_CONDITIONColumnsData typeAllow NULLsNotesConditionID (I1)INTEGERNot allowedPropertyIDINTEGERNot allowedCategoryIDINTEGERAllowedExpressionCHAR(64)AllowedDisplayOrderSMALLINTAllowedRemarkCHAR(64)AllowedIndexesColumnsSort orderPK_TBL_CONDITION (I1)ConditionIDAscending5.10 TBL_LISTColumnsData typeAllow NULLsNotesListID (I1)INTEGERNot allowedAccountIdINTEGERNot allowedItemTypeSMALLINTNot allowedItemIDINTEGERNot allowedStatusSMALLINTAllowedCreateDateTIMESTAMPAllowedUpdateDateTIMESTAMPAllowedIndexesColumnsSort orderPK_TBL_LIST (I1)ListIDAscending5

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论