#1462 remove init methods
Closed: Fixed None Opened 12 years ago by admiyo.

The init methods have a subtle problem with them. typically, init means to perform any intialization that needs to be delayed until after all dependencies are resolved. However,m there is no guarantee that the dependencies themselves have had init called.

Additionally, using init means that we have objects that are not yet valid. The constructor function is supposed to be a contract that the object you get back is a valid object of the type requested. init violates that contract.

Removing init is going to be trickiest in the relationship betwen entities and widgets, as a widget needs an entity name in order to be valid. We have a circular dependency; either the widget needs to be valid without the entity, or the entity needs to be valid without the widget. However, the entity can be valid enough for the widgets to use before all widgets are initialize.


Metadata Update from @admiyo:
- Issue assigned to admiyo
- Issue set to the milestone: FreeIPA 2.1 - 2011/07

7 years ago

Login to comment on this ticket.

Metadata