ASP.NET website news management system management system design and realization.doc
Aug4,2005JournalofChinaUniversityofMining&TechnologyVol3,No21-©1994-1996JournalofChinaUniversityofMining&Technologyhttp/isedj.org/3/21/:ASP.NETwebsitenewsmanagementsystemmanagementsystemdesignandrealizationLiangCheeWeeLutherCollegeDecorah,IA52101,USAAbstractusesASP.NETandADO.TheNETtechnologydevelopmentwebsitenewsmanagementsystemmanagementsystem,hasrealizedthewebsitenewsdynamicmanagement,evenmorepromptlycausedtotheinformationmanagement,tobehighlyeffective,enhancedtheworkingefficiency.Meanwhiletothesystemdevelopmentprinciple,thesystemfunctioncharacteristicandthedesignproposalhascarriedontheintroduction.KeywordASP.NETADO.NETnewsmanagementdatabaseAlongwiththeInternetpopularization,moreandmoremanyenterprisesestablishedownWWWwebsite,theenterprisehavebeenpossibletodemonstratetheproductthroughthewebsite,issuedthenewesttendency,carriedontheexchangeandthecommunicationwiththeuser,withpartnerestablishmentrelation,aswellasdevelopmentelectroniccommerceandsoon.Newsmanagementsystemmanagementsystemisconstitutestheenterprisewebsiteanimportantconstituent,itisshoulderingthedouble-deckedfunction,ontheonehandmayuseforthedynamicissuerelatednewproductorthenewdevelopmentproject,ontheotherhandmaypromptlytothecustomerannouncetheenterprisemanagestheachievement,thetechnologyandtheresearchanddevelopmentprogresses,recommendsorthepreferentialbenefitengineeringproject,theproductandtheservicespecially,thustheattractioncustomer,expandsthecustomergroup.Thetraditionalwebsitenewsmanagementwayhastwokinds,oneisthestaticHTMLpage,renewswhentheinformationneedsretomanufacturethepagethenontopassonthepageandtherevisioncorrespondinglink,thiswaybecausetheefficiencytooislownotnotmultipurposealready.Two,basedonASPandthescriptlanguage,thedynamichomepageandthedatabaseunion,processesthroughtheapplicationprocedurethenews,thisisapresentmorepopularprocedure.ButbecausetheASPitselflimitationenablesthesystemtohavesomeinsurmountableflaws,buthasadoptedASP.IntheNETtechnologysystemperformancehadtheverybigimprovement,itmainlydisplaysinfollowingseveralaspects:After1.becausetheASPpageeachtimeopenstheprocesswhichallmustpassthroughtranslatesfirstexplained,thereforethepageisopeningrepeatedlytimespeednotanypromotion,butASP.AftertheNETpageonlyneedsatimeoftranslationnottoneedretotranslate,isreviseduntilthispageortheWebapplicationprocedurerestarts.Thisenabledwhenvisitedmanytimesthespeedtohavetheenormouspromotion.2.becauseASPhasnotprovidedanyoutputdataforthecontentpart,thereforewhenusesASPcomposesthedatabasepageonlycandrawsupportfromADOtheRecordSetobjectreadingtherecordbythepen,butASP.NETpassesADO.NETprovidesdatabasepartandsoonDataGridmaydirectlywiththedatabaserelation.3.ASP.NETsupportapplicationprocedureASP.NETwebsitenewsmanagementsystemmanagementsystemdesignandrealization115-©1994-1996JournalofChinaUniversityofMining&Technologyhttp/isedj.org/3/21/:real-timerenewal.Themanagerdoesnotneedtoswitchoffthenetworkserverornottoevenneedtostoptheapplicationprocedurethemovementbeingpossibletorenewtheapplicationdocument.Theapplicationproceduredocumentnevercanlock,thereforeeveninproceduremovementtimethedocumentmaycover.Afterthefileupdating,thesystemcantemperatelytransformtothenewedition.4.ASP.NETadopted"code-behindthe"waycompilationcodetocausethecodetochangeinthecompilation,thestructureisclearer,reducedthesystemdevelopmentandthemaintenanceorderofcomplexityandtheexpense.1systemdevelopmentprinciple1.1basedonASP.NETtechnologysystemstructuralmodelASP.TheNETstructureisthreesystems:UIlevel,servicelogiclevelanddatalevel.TheUIlevelisresponsiblewiththeuserinteractive,thereceiveusersinputandthedatawhichtransmitstheserverendpresentsforthecustomer.Theservicelogiclevelwillberesponsiblefortherequestwhichwillreceivethebrowsertotransmitandrequestedwillbequeaththedatalevel,atthesametimerequestedtheprocessingresultwillissuethebrowser.ItbytheWebform,XMLtheWebserviceandthemoduleserviceiscomposed.WebformisASP.TheNETapplicationprocedurecoreisat,itispresentsthedataandtheinformationfoundationtothecustomer,alsoistheinformationandthedatafoundationwhichtheresponseandtheprocessingcustomerandthedemonstrationWebformproducesalternately.ThedatalevelpassesADO.TheNEToperationdataprovidesthedigitaldataserviceforbusinesslogiclevel,likethestoreddatumoperatingresult,returnstothedataretrievalresultandsoon.1.2ADO.NETvisitdatabaseprincipleIsconnectedwiththedatabase,ADO.NEThasprovidedfollowing3ways:IsconnectedthroughODBC;IsconnectedthroughOLEDB;DirectandSQLServerisconnected.3waysasaresultoftheapplicationleveldifference,causetheefficiency由低到高,independencefromGaoDaodi.Regardingconnecteddatabasedataprocessing,alsosome2ways,namelyonekindisisolatesisomerismthroughDataSetthedatapool,anotherkindisbyflowsthewayreading(theDataReaderway)fromthedatapool.Thetraditionalapplicationprocedureisthroughestablishesfirsttothedatabaseconnection,maintainstheconnectionintheprocedureentiremovementprocessthewaytodesign.ASP.NEThasadoptedtheseparationconnectionwayconstructionofdata.WhenbrowsertoWebserverrequesthomepage,theserverprocessesthisrequest,andrequestedthehomepagetransmissionforthebrowser,thentheconnectionisseparated,sendsoutthenextrequestuntilthebrowser.ADO.TheNETanotherinnovationwashasintroducedthedataset(Dataset).Adatasetisinthememoryprovidesthedatarelationalgraphthehighspeedbuffer.Thedatasetknowsnothingabouttothedatapool,theymayorthroughcallinthedatabytheprocedurefromthedatawarehousebuttoproduce,thepacking.Nomatterthedatafromwheregain,thedatasetallisbutisoperatedthroughtheusesimilarproceduretemplate,anditusesthesamelatentdatabuffer.2systemsfunctionaldesigns2.1systemsfunctionstructuresThisnewsmanagementsystemmanagementsystemmayoperatingsystemplatformmoveinWindowsin2,000Server,theWebserverisIIS,thedatabaseserverisMicrosoftSQLServer2000,MicrosoftVisualStudiowhichthedevelopmentkituses.NETandDreamWeaver.Chart2producesthesystemthefunctionstructuredrawing.Itsworkflowis:Theuserregistersthroughthejurisdictionjudgment,theaverageconsumeronlycanglanceover,readingandtheinquirynews,theregistrationuserbesidesmaycompletetheaverageconsumertheoperation,butalsomayenterthenewsadministrationmoduletocarryonthenewsinput,Aug4,2005JournalofChinaUniversityofMining&TechnologyVol3,No21-©1994-1996JournalofChinaUniversityofMining&Technologyhttp/isedj.org/3/21/:therevisionandthedeletionoperation.Theregistrationusereliminatessystemadministrationsupernumeraryofficialonlytobeablethenewswhichinputstooneselftocarryonthedeletionoperation.2.2systemsfunctioncharacteristics(1)operates,thecontactsurfacesimplyfriendly:Controlsthe-likepagelayoutcompletely,causesthenewstheinputworktobesimpler;Manyoptionsincludingthenewscategory,theorigindepartmentandsoononlyneedtoclickonthemousetobepossibletocomplete;Moreover,thetrackappearsthepromptinformationalsoletstheuserasnecessaryclearownoperationsituation.(2)immediatelyobviously:Tothenewsprocessing(includinginput,revision,deletion)immediatelydemonstratedinthemainpagecorrespondingcolumn,achievesthe"immediateissue,theimmediateeffective"function.(3)functionperfect:Includingcommonwebsitenewsmanagementeachaspect:Thenewsinput,thebrowsing,thedeletion,therevision,theretrievalandsooneachaspect,completelyhasrealizedthewebsitetotheimmediatenewsmanagementrequest.(4)facilitatesthetransplant:Inviewofthedifferententerprise,onlyneedstomaketherevisiontobepossibleslightlytodevelopsuitsthisenterprisecharacteristicthewebsitenewsmanagementsystemmanagementsystem!3systemsdetaileddesignsThesystemmainfunctionisrealizesthroughseveralfunctionsmodules.Concretedesignprocessasfollows:(1)systemregisters:Thismoduleisresponsibletheusertodivideintotheaverageconsumerandtheregistrationuserrealizestheuserjurisdictionmanagement.(2)newsbrowsing:Thismodulenegativedutiesandresponsibilitiespageliststhewebsiteallnewsinformation,includingthetitle,thetype,theorigindepartmentfieldandtheissuedate,eachnewstitleismadeanultralink,clicksonthemtobeabletojumptransfersthepagetocarryonnewsreading.(3)Newsreading:Clicksonthetitlelinkinotherpagesnamelytoenterthenewsreadingpage,eachnewsdetailedinformationistakenthistimeout,includingthecontent,thetitle,thekeywordsandsoon,anddeferstotherelativelyfixedformtolayasideinthepagedifferentregion,allnewsusesamepagelayout,onlywillbeapproximatelyvariousfieldscorrespondencecontentisdifferent,moreover,thepageotherpositions,maythedynamiclayingasideotherparts,thecriss-crossedstationsymbolizelogo,linkpictureandsoonpageadvertisementbanner,mayveryeasilyrealizetheabundantandelegantreadingeffectlikethis.(4)newsinquiry:Thismoduleprovidedthenewsinquiryfunction,theinputhastreatedthesearchthecontentandthedesignationclassificationinformationmayfastfindconformstotheconditionnews,andoutputinquiryresult.(5)Newsmanagement:Thismodulenegativedutiesandresponsibilitiespagedisplayedtheregistrationuserwhichregistersoncetoissuealsothedeletionnewsinformation,theuserhasnotbeenpossibletocarryonthedeletion,therevisiontothisnews.Thenon-newsissueeliminatessystemadministrationsupernumeraryofficialnottohavetothisnewsprocessingjurisdiction,thereforethedifferentuserwillenterthispagetodemonstratethedifferentcontent.(6)newsinputandrevision:Theregistrationuserinputsthecontentwhichanewsneeds,containsthetitle,thekeywords,thetype,theorigindepartment,theissuedateandsoon,atthesametimefromregistersthemoduletoobtainuser,theseinformationarereadinthedatabasetopreserve.Thismodulealsoisresponsibletoeditundertheconditiontherenewal,bynow,itwillactaccordingtotheTitlefieldvaluewhichobtainedtothepagetocontrolaninitialization.Underregistersthepagetakethesystemthecompilationtoproducethemaineventandthefunctionastheexample,explainsthissystemtheperformancehistory.ASP.NETwebsitenewsmanagementsystemmanagementsystemdesignandrealization117-©1994-1996JournalofChinaUniversityofMining&Technologyhttp/isedj.org/3/21/:/IsRegUserOkfunction:WhetherthejudgmentuseralreadydidregisterandthepasswordwaswhethercorrectPublicboolIsRegUserOk()Stringname=TextBoxName.Text.Trim();Stringpwd=TextBoxPassword.Text.Trim();/Establishment/OpensthedatabaseconnectionSqlConnectionconn=newSqlConnection();Conn.ConnectionString="server=(local);Uid=sa;Pwd=;Database=jxdb";Conn.Open();/EstablishesthesqlstringofcharacterStringsql="select*fromregwherename="name"";SqlDataReaderdr;SqlCommandcmd=newSqlCommand(sql,Conn);Dr=cmd.ExecuteReader();/RetentionuserregistrationornotinformationBoolisRegUserExist=dr.Read();/ClosesDataReaderDr.Close();/ObtainsauserpasswordStringsqlBoth="select*fromregwherename="name"";SqlBoth="andpwd="pwd"";SqlCommandcmdBoth=newSqlCommand(sqlBoth,Conn);SqlDataReaderdrBoth;DrBoth=cmdBoth.ExecuteReader();/AtthesametimeretentionuserfamouspasswordexistenceinformationBoolisBothExist=drBoth.Read();/ClosesDataReaderDrBoth.Close();Conn.Close();/WhetherthejudgmentuserdoesregisterIf(!IsRegUserExist)Response.Write("<script>alert(thisusernotyetregisters!)");Returnfalse;/Judgmentusernameandpasswordarewhetherconsistentelseif(!isBothExist)Response.Write("<script>alert(!)");returnfalse;elsereturntrue;Finallyproducesbehindthesystemthedatastorageplan:UsingMicrosoftSQLServer2,000establishmentsdatabasesanditsmemoryprocess.Hereproducestwoessentialdatasheets,oneisthefieldwhichdatasheetNewscontainsincludes:Serialnumber,name,title,keywords,content,type,origindepartmentanddate