Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Location and responsibilities of Main class in MVC pattern

I am trying to build a simple currency converter using SWING and MVC. My question is: in an MVC pattern where should be the Main class generally located? Should it be in a separate package initializing the model, view, controller and setting up the connections etc.? or should the Main class be in the View package? In other words, whose responsibility is to build the whole system?

like image 395
Cemre Mengü Avatar asked Jan 02 '12 12:01

Cemre Mengü


1 Answers

where should be the Main class generally located ?

Main class should just act as initilizer of the app, you can place it in a package called

com.yourcompany.currencyconverter.app.main

Should it be in a separate package initializing the model, view, controller and setting up the connections etc. ?

Yes, it would be nice to have it separated from the rest.

like image 112
jmj Avatar answered Nov 06 '22 08:11

jmj