Pcf control tutorial. It also defines the behavior of the code component.