Code in Controller and Model?

Hello all

I find some codings in Model class and Controller class.

What is the methodology of choosing model or controller to write the codings?

Thanks
Daniel