Let's assume the application is an eCommerce platform. No language preference.
I am not really a fan of MVC, since I usually use the DB model directly plus helper functions which do anything I need. Also, most of the time, I need the same controller. Only for a few special things, controllers have to be extended. That leaves me with only the view in most situations. I am working on SHPS, which, at the moment, is tailored to that kind of workflow. It hides away stuff I don't need or which should work as always. However, at the end, the MVC separation is real.
It is very important to choose and follow a design/architectural pattern while creating any application. Model-View-Controller is one type of architectural pattern used, which will decouple your UI component from the main logic as it is always advisable to not mix them up (you can have them coupled but, then, changing the UI or logic will be problematic).
Jessica Mall
Passionate about web
Mev-Rael
Executive Product Leader & Mentor for High-End Influencers and Brands @ mevrael.com
You use software architecture patterns for that. In that case it could be MVC, which is a subset of 3-tier architecture under the Multilayer architecture
Presentation (UI) should never be in the main logic. You usually have templates/views for that which only has basic control structures like ifs, loops and labels where data is inserted.
Main logic only process the request/input, then gets the data and finally returns you template with a data included.