- Member | 18
I have being reading about components and controls but am not sure about the
best practices of using them for widgets. Could someone please guide me ?
I am planning to develop following basic widgets for a site … please help me
Sidebar and Header Login,
Service Status – Will automatically refresh data every 5 seconds,
Drag and Drop
Thanks for looking at this post,
Last edited by unagi2020 (2011-02-14 20:29)
- Jan Tvrdík
- Nette guru | 2566
I'm not sure what you already know about components, so I start with the basic.
A component is every class which implements the interface
IComponent. The default implementation of this interface is the
A control is every class which extends
Nette\Application\Control, which is a special type of component
designed for direct usage in presenters (has for example method
link and supports signals [interface ISignalReceiver])
with support for normal rendering (has template
factory) and partial rendering (interface IPartiallyRenderable,
used for AJAX).
So all the “widgets” you have mentioned should be instance of
Feel free to ask me additional questions.