aspose file tools*
The moose likes Java in General and the fly likes Improve app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Improve app" Watch "Improve app" New topic
Author

Improve app

Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 419
Hi,

I have created an app, it is working it has around 30 classes. The code is dirty and maybe bad done. I am interested in improve the code. Put all the classes in the the correct structure, etc.

Could you give me some advices about what way do it in a standard way, please?

Thanks
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2615
    
    9

Hi Angus

30 classes seem big app. There are several ways to restructure the files. Putting java files in packages according to say features/functions, purpose, tiers can be options.

It really depends on what your app do and whether it's web/enterprise app or standard Java app.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8427
    
  23

Angus Ferguson wrote:I have created an app, it is working it has around 30 classes. The code is dirty and maybe bad done. I am interested in improve the code. Put all the classes in the the correct structure, etc.

Could you give me some advices about what way do it in a standard way, please?

Ooof. That's an awfully broad question. Whole books have been written on the subject, so don't expect to get a full answer in a forum like this.

About the only advice I can give you is this:
1. Before you start changing anything, write out a detailed description of WHAT the app is supposed to do (Note: WHAT it does; not HOW it does it). And write it in English (or your native language).
2. When you do start changing, tackle one class at a time.

HIH

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 419
And what about check if the code adheres to the Java coding standards and best practices and if not how to improve it?

Thanks
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14432
    
  23

There are tools to automatically check if your code adheres to coding standards. See for example Checkstyle and PMD.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Improve app