commit
commit

Reputation: 4807

Advantages of library

I have one java file with numbers of functions around 30-40 that I use commonly, so I am thinking to make external library of it.

But I want to know what are the advantages of making library except it does not need to import like java file, is there any performance advantage of making library?

Upvotes: 0

Views: 4398

Answers (2)

johan d
johan d

Reputation: 2863

You can make a library if the API is mature enough, and robust enough.
If you always need to edit it, You may just lose you time in maintenance. One advantage: it forces you to take care of the API.

Upvotes: 0

Aaron Digulla
Aaron Digulla

Reputation: 328556

Libraries and frameworks have these advantages:

  1. Reduce the size of your class files (code can be extracted and moved elsewhere where it don't disturb anyone).
  2. Cleaner API since you can't leak internal fields
  3. You can test your library independent of your application. If the library is good, then the bug must be in your app. Reduces test and debug time.
  4. You can reuse a library in several projects.

Upvotes: 5

Related Questions