grustamli
grustamli

Reputation: 466

multiple apps in one java project

I am creating a java project following the MVC pattern. However project contains three different desktop apps for, client , admin, and storekeeper. All of them uses the same Model, but different controllers and views. How can I organize this project?

Should I create separate projects for each and import the model as an external library or is there a better solution?

Upvotes: 2

Views: 980

Answers (2)

Subrat Thakur
Subrat Thakur

Reputation: 26

Managing separate repository for each and every project is always good and maintainable approach . As per my understanding you should just create a common project and import different module ( may be as maven child) in the parent Project .

You can create project structure like this:

  • Parent Project

    Client : This module should have all the Client module code

    Admin : This should have code related to Admin module

    Shopkeeper : Similarly this one will be responsible for Shopkeeper

    Common : And this one will contains all the common code for each module whether that is domain class or util class etc.

You should keep your module loosely coupled with each other so that it will reduce the complexity and require low maintenance .

Upvotes: 0

BIZ
BIZ

Reputation: 113

I have some projects which have same situation. From my point of view, 1 good solution is : you will have 2 kind of projects, they are :

  • Client projects (3 projects): for client, admin and storekeeper. These projects just to show the GUI to user, all action and business will call to server project, and these projects just show the response of server project on GUI

  • Server project (1 ESB project) : all business and action will be here.

This solution will reuse the source code, and easy to control each layer.

Hope it help.

Upvotes: 1

Related Questions