Jump to content

Recommended Posts

Hello Guys, good afternoon, it's still 4:25 pm where I live,

I already know a lot about Delphi related to OOP, but I have one subject that I still have doubts about, which is the interface issue.

 

My questions would be,

when should I use an interface?

To create my interface factory, should I create just the factory class or the class and a factory interface as well?

 

How should I develop this knowledge and understand this concept once and for all.

Share this post


Link to post
13 hours ago, xStingEucliffexxx said:

To create my interface factory, should I create just the factory class or the class and a factory interface as well?

if you are trying to implement the Abstract Factory Pattern then you will need to develop factory classes.

 

A more common case is where you will simply sub-class from TInterfacedObject and implement 1 or more interfaces.

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×