-1

MVC アーキテクチャを持つアプリを開発しています。各コンポーネント (モデル、ビュー、コントロール) のパッケージを作成する方法を教えてください。

Web ページのパッケージですか、EJB と DAO のパッケージですか? そしてもちろん、3 つのプロジェクトすべてを含む EAR

助けてくれてありがとう。

4

1 に答える 1

0

First I think you need to understand MVC (Model, View, Controller).

A model is a class that will manipulate data. For example, a model at a very basic level could be a class that will only keep track of how many dogs you have.

A view is the part of the application that the user interfaces with. In our dog application, this would be the graphical user interface or the command line interace that the user types into, or interacts with buttons.

The Controller is the code in the project that after the view is interacted with, then tells the data where to go, for instance tell the model to increment or decrement the amount of dogs that you have. The controller would also be button listeners in the application.

You're structure for your application should be like this:

/
 main file
 model/
 view/
 controller/

You should try this link: what is Model in MVC pattern

于 2013-03-01T19:32:05.347 に答える