Reputation: 2162
I am currently working on a login system for a site using the Zend Framework for its MVC architecture.
Which design makes more sense
registration and login each gets its own set of model, views and controllers.
both the registration and login is implemented within the same model, view and controller.
Would love to hear the arguments for and against both design patterns so i can better understand the "preferred" or "best" way to implement a program using the MVC architecture.
Upvotes: 0
Views: 353
Reputation: 42093
I think separate controllers
and views
should be used for Login(Authentication) and Registration but same database Model
, DbTable
and Mapper
classes can be used for both.
For Example:
Login Controller:
index action (Show login form)
process action (Process login form)
Access URL: projectname.com/login
Registration Controller:
index action (Show registration form)
process action (Process registration form)
Access URL: projectname.com/registration
BUT same:
Model class
Mapper class
DbTable class
Upvotes: 3