| Autor |
Mensagem |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/02/2005 10:11:45
|
diogoaclPJ
GUJ Master
![[Avatar]](/images/avatar/0)
Membro desde: 04/05/2004 00:00:00
Mensagens: 1028
Offline
|
Galera sempre que leio alguns artigos ou tutoriais vejo a expressão MVC e/ou MVC-2.
Mas a diferença entre estes padrões exatamente não sei especificar..
Alguém ai sabe quais as principais diferenças entre eles?
Abraços
|
http://www.portaljava.com.br |
|
|
 |
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/02/2005 10:15:07
|
darkseidPJ
GUJ Master
![[Avatar]](/images/avatar/1)
Membro desde: 10/05/2004 00:00:00
Mensagens: 1334
Localização: 14921366
Offline
|
Me pegou nessa heim Diogo....
|
http://www.rafaelmanoel.pro.br |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/02/2005 10:21:17
|
diogoaclPJ
GUJ Master
![[Avatar]](/images/avatar/0)
Membro desde: 04/05/2004 00:00:00
Mensagens: 1028
Offline
|
hehehhe, pois é..
há diferença nisso, já li, mas sempre acho que é "quase" a mesma coisa..
mas o porque da diferença ainda não sei! Vamos esperar..
|
http://www.portaljava.com.br |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/02/2005 10:34:51
|
Guilherme MelloPJ
JWizard
![[Avatar]](/images/avatar/1)
Membro desde: 25/04/2004 00:00:00
Mensagens: 2994
Offline
|
eu já li que não existe MVC/MVC2... existe sim model 1 e model 2!
model 1 seria a programação sem separação das camadas, parecido com ASP, PHP...
já o model 2 seria o MVC propriamente dito!
mas ainda estou meio perdido em relação aos MVC(s)...
|
http://blog.guilhermemello.com |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/02/2005 10:41:13
|
CarneiroPJ
JWizard
![[Avatar]](/images/avatar/0)
Membro desde: 14/08/2004 00:00:00
Mensagens: 2202
Offline
|
Diogo, tens algum tutorial legal sobre MVC ou MVC2???
|
http://www.rafaelcarneiro.net |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/02/2005 10:47:01
|
Guilherme MelloPJ
JWizard
![[Avatar]](/images/avatar/1)
Membro desde: 25/04/2004 00:00:00
Mensagens: 2994
Offline
|
estava lendo as blueprints MVC e encontrei o seguinte trecho que esplica muito bem essa diferença:
Sun BluePrints wrote:Structuring the Web Tier
A Model 1 architecture consists of a Web browser directly accessing Web-tier JSP pages. The JSP pages access Web-tier JavaBeans that represent the application model, and the next view to display (JSP page, servlet, HTML page, and so on) is determined either by hyperlinks selected in the source document or by request parameters. A Model 1 application control is decentralized, because the current page being displayed determines the next page to display. In addition, each JSP page or servlet processes its own inputs (parameters from GET or POST). In some Model 1 architectures, choosing the next page to display occurs in scriptlet code, but this usage is considered poor form. (See the design guideline Section 4.2.6.8 on page 89.)
A Model 2 architecture introduces a controller servlet between the browser and the JSP pages or servlet content being delivered. The controller centralizes the logic for dispatching requests to the next view based on the request URL, input parameters, and application state. The controller also handles view selection, which decouples JSP pages and servlets from one another. Model 2 applications are easier to maintain and extend, because views do not refer to each other directly. The Model 2 controller servlet provides a single point of control for security and logging, and often encapsulates incoming data into a form usable by the back-end MVC model. For these reasons, the Model 2 architecture is recommended for most interactive applications.
An MVC application framework can greatly simplify implementing a Model 2 application. Application frameworks such as Apache Struts and JavaServer FacesTM (see Section 4.4.5 on page 114) include a configurable front controller servlet, and provide abstract classes that can be extended to handle request dispatches. Some frameworks include macro languages or other tools that simplify application construction.
The Model 1 architecture can provide a more lightweight design for small, static applications. Model 1 architecture is suitable for applications that have very simple page flow, have little need for centralized security control or logging, and change little over time. Model 1 applications can often be refactored to Model 2 when application requirements change.
Rafael, dê uma lida nas blueprints da Sun... são muito legais!
|
http://blog.guilhermemello.com |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/02/2005 11:03:02
|
CarneiroPJ
JWizard
![[Avatar]](/images/avatar/0)
Membro desde: 14/08/2004 00:00:00
Mensagens: 2202
Offline
|
Tem em portugol mesmo não?! :yv:
|
http://www.rafaelcarneiro.net |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/02/2005 11:50:04
|
Guilherme MelloPJ
JWizard
![[Avatar]](/images/avatar/1)
Membro desde: 25/04/2004 00:00:00
Mensagens: 2994
Offline
|
Reifel wrote:Tem em portugol mesmo não?! :yv:
Rafel, aqui no PJ tem um tutorial sobre Design Patterns J2EE que aborda MVC...
|
http://blog.guilhermemello.com |
|
|
 |
|
|