Developing Widgets for Wordpress
Important function to developing new widgets: widget(), update(), and form()
widget()
To display the widget, this function always require two parameters, $args and $instance.
update()
To save the widgets settings. The update() function takes two different parameters, $new_instance and $old_instance.
form()
To create the edit form for the widget(Admin)
Reference: http://jessealtman.com/2009/06/08/tutorial-wordpress-28-widget-api/