Package usage difference in Delphi/Lazarus and Java

Asked

Viewed 181 times

1

I would like to know the difference of use of packages in projects Java for use of packages in projects Delphi/Lazarus?

In the Java so I know it’s about separating the classes into folders that the existence of the same within that context makes sense. But in the Delphi/Lazarus I found some mixed opinions where in some places they said that the packages would be as reusable modules beyond some places nor show the use of them, I would like to know the opinion of someone who knows the 2 worlds.

2 answers

1

Indeed, in Delphi, normally Packages are created to be reused. Packages are treated as a framework.

This does not mean that you cannot modularize your system using Packages if you wish. But if you want to separate classes and modules, you don’t need to create a package. Can do using Unit Scope Names and Unit Namespaces.

Note that the operation is a little different of other languages.

  • Very good, your response was very informative thanks, ie even without creating packages is possible to have units associated to a common context, worse that even entering this language now I believe that few people have this care

  • @William.Andrade If you take a library like Spring4d you will see that it is widely used. It all depends on the context and size of the project you are working on.

0


In Java your concept is correct.
In Delphi the use of packages or Packages serves more specifically to modularize a system. However, the organization of classes can be done in these packages as well as in Java. Remembering whenever it is possible to work with Object Orientation in Delphi as well as in Java. Unfortunately many Delphians use the tool the wrong way (only procedural), and that ends up denigrating the image of Delphi and good Delphians.
There are several benefits to using packages in the Delphi.
Can be consulted here.

  • Thank you very much for answering, is that in the application I intend to do has about 210 models and in my head that is coming from Java not separate that would be a trespass without forgiveness kkkk

Browser other questions tagged

You are not signed in. Login or sign up in order to post.