DesignandimplementationoftheMVCpatternpersonalfinancialmanagementsystembasedon_第1页
DesignandimplementationoftheMVCpatternpersonalfinancialmanagementsystembasedon_第2页
DesignandimplementationoftheMVCpatternpersonalfinancialmanagementsystembasedon_第3页
DesignandimplementationoftheMVCpatternpersonalfinancialmanagementsystembasedon_第4页
DesignandimplementationoftheMVCpatternpersonalfinancialmanagementsystembasedon_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

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

文档简介

1、Design and implementation of the MVCpattern personal financial managementsystem based onPaper Introduction: MVC model has become a classic of software architecture, which uses a divide and conqueridea to make the application of the mandatory input, processing and output separately, the system is div

2、ided into three major categories: model (Model ), view (View) and the controller (Controller). Personal financial management system to record details of everyday life in the balance of payments program, and be able to analyze charts, financial planning, unified management of various assets, data sea

3、rch, and export data to an Excel spreadsheet.Keywords: MVC pattern, financial management systems1, MVC design pattern Introduction to MVC (Model-View-Controller) proposed by Trygve Reenskaug, was first used in SmallTalk-80 environment, constitute the basis of many interactive interface system. Paper

4、 format. MVC model has become a classic of software architecture, which uses a divide and conquer mentality, forcibly enter theapplication, processing and output separately, the system is divided into three major categories: model (Model), view (View) and the controller (Controller).s re1.1 Views Vi

5、ews are users see and interact with the interface, the model data, logic and status information presented to the user in a specific format. It displays information obtained from the model, for the same information can have several different display form or view. MVC design pattern for dealing with a

6、 limited view on the view data acquisition and processing, as well as the user and not included in the view of the business process handling.View output data and only as a way to allow the user to manipulate.1.2 Models is where all the business logic code fragments1 . It indicates that the data and

7、business rules, encapsulates the core data computing problems, logical and functional relationship management application domain behavior and data, has the largest number of processing tasks. It is independent of the specific expression of the interface and I / O operations, the data returned by the

8、 model is neutral, that is independent of the model and the data format, such a model can provide data for a plurality of views.1.3 Controller The controller is handling user interaction with the software, so that the model and the view to coordinate efforts to ensure that the user interface compone

9、nts corresponding to the contact between the model. It accepts user input, the feedback input to the model, thus achieving control of the computational model. Meanwhile, update and modify the model will also be used to notify the view through the controller to maintain consistency with the model of

10、each view.Processing 1.4MVC First, the controlle r accepts the user s request, and to decide which models should be called to deal with. Then, the model with the business logic to handle user requests and return data. Finally, the controller model with the corresponding view formatted data returned

11、and presented to the user through the presentation layer. Model, view, the relationship among the controller and each main function (see Figure 1).Figure 1 MVC components and features two types of relationships, personal financial management system design and implementation of personal financial man

12、agement system to record details of everyday life in the balance of payments program, and be able to analyze charts, financialplanning, unified management of various assets for data search, and export data to Excel spreadsheet. Personal financial management system design using the MVC pattern, the u

13、se of the database is SQL Server 2000, the .NET platform implementation of the system, which involves JQuery, AJAX, ADO.NET technology.In Visual Studio 2008, and by creatinga ASP.NET MVC WEB APLICATION, the system will automatically generate an MVC framework, which includes Views, Controllers and Mo

14、dels, began to realize the system on this basis.2.1 Database Design Database Accout personal financial management system contains three data tables:(1) The user table (Users) by user number, user name, real name, password, gender, occupation components.(2) a statement of accounts (Accounts)accounts

15、by type,user, expenditure / income, amount, project name, date of composition. Paper format.(3) the type of accounts table (AccountsTypes) from the accounts of type number, account type names.2.2 Build VisualStudio.NET view layer provides data in the View Designer toolbox, Web Forms, Components, HTM

16、L, and other controls, while also providing user control. Through the above various controls, such as the development of the Windows interface can be the same way in WYSIWYG visual design. In ASP.NET development environment designed to achieve the aspx page view.The user interface consists of the fo

17、llowing main pages:(1) Home display information: About.aspx, Index.aspx.(2) Registration and login screen: Register.aspx, Logon.aspx, Error.aspx.(3) After you log into the main interface: TitleContent.aspx, mainContent.aspx.(4) accounting, edit, delete accounts interface information: AccountEdit.asp

18、x, AccountDel.aspx, AccountUpdate.aspx so on.(5) View account information interface: AccountView.aspx like.(6) user interface to change the password: ChangePassword.aspx.Design and implementation of the model layer of 2.3 (1) database connection model: definition and use ADO.NET technology database

19、connection, close the database methods.(2) The type of business model: this system IdbADO.cs and DbADO.cs business models are abstract database of common operations: query, add, delete, modify the interface and implementation class interface. All operations in the future as long as the class that im

20、plements the interface or inherit it. interface ICriteria.cs abstract complex query, class Order.cs, Criteria.cs complex query. interface IUserService, IAccountService, IAccountTypeService abstract service model layer to the control layer (Controller) provided by the class UserService, AccountServic

21、e, AccountTypeService achieve these three interfaces.(3) physical layer model: Create a physical layer for each data table, a data field as a property, each property has its own get and set methods. There User.cs, Account.cs, AccountType.cs, EntityFactory.cs four physical layer model in this system,

22、 which is used to generate EntityFactory.cs class entities.2.4 Building Controller ASP.NET code separation mechanism allows the code with the Model View Controller code and can be easily separated.Each aspx file correspondsto a back-end code files through the back-end code to implement Controller fu

23、nctions. Paper format.The system controller: AccountController, HomeController, testController, UserController more. These controllers are based on the user s request to determine which call action,the use of which models and views to complete the appropriate action. User requests are: login, entry,

24、 query, accounts list, edit, save, analyze, and delete.These requestsare entered by the view layer, the control layer is passed to the model for processing.Design will be business logic of the system, and database connectivity and interactive public operations encapsulated in a separate class, with

25、a special class to handle the business logic and data logic, thereby increasing the reusability of the code.3, the conclusion of this article on the .NET platform as the design and implementation of the MVC pattern standard personal financial management system, effectively safeguarding the complexity of the system, and personal financial manageme

温馨提示

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

评论

0/150

提交评论