Jump to content
Registration disabled at the moment Read more... ×
xStingEucliffexxx

Questions about Interface

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×