MVC çerçeveler, sık sık bu soruyu yollar çok sayıda cevap bulacaksınız. İşte bu getirmedi, yaşamak için girişim iki ilke vardır.
1) Seperate business logic from presentation logic.
If the function in question takes input from another source, and simply does some formatting on it, then it is similar to the view helpers used in most MVC frameworks, and thus is seperated from any business logic that processed the input to the function. However, if the function itself is doing logic based upon its input to determine other things about the data, other then simply how to display it, you wind up with a situation where if you have more then one case down the road, this function will begin to grow substantially, and eventually may become impossible to understand, or inefficient.
2) sistem tarafından işlenen veriler çeşitli biçimlerde kullanılabilir olmalıdır. Veri diğer kullanımlar için gerekli olabilir Eğer, ekran ötesinde, o daha sonra kendinizi size ihtiyacınız olduğunu fark, 'Ted Geliştirici, Geliştirici Ted' in, 'Ted Geliştirici' Refactor, hatta kod çoğaltmak zorunda bulabilirsiniz 've' Ted 'formları, ve işlev sadece üçünden birini döndürür.