Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to implement MVC into a server/client/DB application
    primarykey
    data
    text
    <p>I'm writing an application consisting of a gui interface, a client, a server and a database.</p> <p>However, after countless hours I still haven't figured out how to organize it all. </p> <p>The GUI is built up by several rather different swing components, so I thought about having a separate model for each of them.</p> <p>The information flow is currently like this:</p> <ol> <li>User inserts some info in the GUI. </li> <li>GUI tells the controller something happened by giving the controller an event. </li> <li>Controller sends the event to the server </li> <li>Server evaluates the event and sends the appropriate query to the DB.</li> <li>Results from the DB are then attached to the event, and sent back to the client.</li> <li>Controller picks up the event and updates the appropriate model with the new information</li> <li>The model then updates the corresponding view.</li> </ol> <p>A possible scenario could be the user searching for entries through the GUI, and having the results returned.</p> <p>Does this architecture sound sane at all?</p> <p>Should all the different views have their own model? If yes, should they have their own controller as well? If no, then what?</p> <p>I thought about sending the entire model to the server, and having the server manipulating the information in the model, then send it back to the client. When the client then receives it, the controller makes sure the new model info is getting attached to the view. This solution eliminates the need for separate events classes, but it doesn't seem right to do this.</p> <p>I guess what I'm asking is what is the best way to organize a server/client/db application following the MVC-pattern?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload