Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Improve app

 
Isaac Ferguson
Ranch Hand
Posts: 837
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3401
13
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Winston Gutkowski
Bartender
Pie
Posts: 10254
59
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Isaac Ferguson
Ranch Hand
Posts: 837
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are tools to automatically check if your code adheres to coding standards. See for example Checkstyle and PMD.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic