depending your current requirement, you may find some already built one fore few bucks. i don't think they even need to be design in most case.

Most company have some SMPS controller IC as well. worth to have a look there.