• Post Reply Bookmark Topic Watch Topic
  • New Topic

MVC in swing Model Save

 
Georgios Chatziefstratiou
Ranch Hand
Posts: 106
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there i try to create one Mvc Application with swing.And i am confused with the implementation and how thinks should be.What i mean is.

1)I have the Gui which is the view all the logic send to a class named controller and i have a model where i have model properties.(i have read MVC is like that)

2)I create some codes in view with input of how many codes i want and transfer this with ActionListener to a Class Named Controller.There i have a method when i press the GenerateButton that i create the random codes.

The random codes are generated and then i want to save them on a database.

I am confused how to save the generated codes on the database.

Should i create a method in the Class Named Controller so that i can save them from there? Or another different class with save update find.......... methods?If Yes then why i have create the Model class with Model properties? And how can i use the Model class.

what is only left to understand how to use the Model class if i have to use it or if i just have to have this class so that is there .What is the use of Model class if it's only to be there with the properties and do save some where else?

What approach is usually used so that i am ok with MVC pattern ?I am confused ?Any help

I forget to tell that i use Hibernate.

thanks
 
Georgios Chatziefstratiou
Ranch Hand
Posts: 106
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone ?Nothing?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!