How to arrange / manage methods of different functionality in a big project

107 views Asked by At

We are working on large scale project which is having hundreds of method.

We are using Spring MVC, hibernate and DWR architecture for our Project.

Currently we are adding all methods of all functionality in Few Service Class. This Service Class are divided according to Modules (Front, Admin, Billing etc).

NOW project size is huge and so the methods in Services class are increasing. This service class contains hundreds of methods of all functionality.

MANAGING as well as UNDERSTANDING this is getting problem.

want to know that is this a proper way every one in industry do or we are going wrong.

ELSE HOW WE CAN IMPROVE THIS.

1

There are 1 answers

0
Brett On

I've noticed a few patterns in file structure between different languages and programmers. In Java, they like to make many classes, spread out. While in C/C++ they try to keep as many methods in a single file as possible (I've commonly seen 2-5k .cpp files). Either way you go with is fine, just make sure that you keep your code as clean and as documented as possible. It's nice to have a multi-line comment before each method explaining the parameters, algorithm and return.