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

Improve app

Angus Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 246
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
Ranch Hand

Joined: Sep 13, 2007
Posts: 1222

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
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 4761
    
    7

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?
Angus Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 246
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
Bartender

Joined: Aug 16, 2005
Posts: 12929
    
    3

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 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Improve app
 
Similar Threads
Local Interface for EJB 1.1
Smooth ticker in IE8: impossible?
Need help in Java Class
Trying hard to make a basic String Class
CPU usage monitoring