In the previous chapters you learned about the basic concepts and setting up of Smarty. As a Smarty developer, you have to understand some basic procedures and know how. This chapter will guide you through the necessary steps to kick start template designing. Before starting template design, you should always be aware of the main objective of Smarty. Let me repeat again for you that the main goal of Smarty is to separate the presentation layer from business logic. This chapter will show you the best way to develop templates while keeping this goal in perspective, and at the same time satisfying your programmers, helping you to co-operate with them, minimizing their task, and increasing the reusability of your final output.
One more thing you should be aware of is that you shouldn’t mix up identities. Most often, the designers are to some extent programmers and vice versa. While designing you must totally forget that you are also a programmer and look at things only from a designer’s perspective. If you mix up your identities, there will be a great risk of non-standard designs.
Do you remember those days when you hard coded your business logic into your HTML pages? To some developers, this embedding capability brought an extra level of satisfaction. You designed (let’s read hard coded—we are still in your old days) a lot of pages for your extremely beautiful site and delivered it to the customer. Only to be faced with problems when even a small change needed to be made to the site. Now let’s look at common problems faced during those days by designers, managers, and developers, and their possible solutions (with and without Smarty):
Do these scenarios make any sense to you? Well, these two scenarios are enough to illustrate the situation of a designer and a manager. Which one do you relate to? This chapter and the upcoming chapters will help you to solve problems like these in a more effective way by using the Smarty templating engine.
18.118.2.15