Hi,
If you want to develop web parts as described in
Developing web parts, you need to inherit from that class.
You can also create fully custom controls, but then you need to add them to the page using the "User control" web part, where you will specify the path to the control file, and then the life cycle of the control should be ensured.
Best Regards,
Juraj Ondrus