ebook img

Smarty PHP Template Programming and Applications by Lucian Gheorghe PDF

254 Pages·2006·9.83 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Smarty PHP Template Programming and Applications by Lucian Gheorghe

Smarty PHP Template Programming and Applications A step-by-step guide to building PHP web sites and applications using the Smarty templating engine João Prado Maia Hasin Hayder Lucian Gheorghe BIRMINGHAM - MUMBAI Download at Boykma.Com Smarty PHP Template Programming and Applications Copyright © 2006 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: April 2006 Production Reference: 1050406 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 1-904811-40-X www.packtpub.com Cover Design by www.visionwt.com Download at Boykma.Com Credits Authors Development Editor João Prado Maia David Barnes Hasin Hayder Lucian Gheorghe Indexer Ashutosh Pande Reviewer Mizanur Rahman Proofreader Chris Smith Technical Editor Rushabh Sanghavi Production Coordinator Manjiri Nadkarni Editorial Manager Dipali Chittar Cover Designer Helen Wood Download at Boykma.Com About the Authors João Prado Maia is Lead Software Developer with Alert Logic, Inc. and was previously with MySQL AB as the lead developer behind Eventum, an issue tracking system, and MySQL Network, a subscription product for everything related to MySQL services. He has been working with PHP, Smarty, and PEAR for several years, and maintains phpbrasil.com, one of the most popular PHP-related community sites in Brazil. He is also interested in fostering a community of PHP developers in Houston by organizing the Houston PHP Users Group at http://houstonphp.org. I would like to thank my wife for her encouragement and patience while I was writing chapters for this book. I dedicate my work to you, Juliana. Hasin Hayder graduated in Civil Engineering from Rajshahi University of Engineering and Technology (RUET). He is an open-source enthusiast who has been programming since early 2001. He maintains phpXperts, the largest PHP user group in Bangladesh, and Zephyr, an open-source AJAX-based MVC framework for PHP5 developers. He is currently working as a web application developer in a Norwegian software development company, "Somewhere In...". You can reach him at [email protected]. I would like to thank my editors from Packt Publishing, David Barnes, Rushabh Sanghavi, and Patricia Weir for this book. Without them I doubt I would have completed my chapters so easily. I would also like to thank Damian and Arnab in Packt Publishing for their help. Thanks also go to Mom, Dad, all my family members, Mahbub bhai, Rashidul Hasan and all my friends for supporting me. And finally I would like to thank Ashikuzzaman Fahim and Arild Klokkerhaug, who inspire me a lot. I would like to dedicate this book to my wife and my best friend Ayesha. I know I could not live here without you. Download at Boykma.Com Lucian Gheorghe is currently working as a senior network engineer for Globtel Internet, a significant Internet and Telephony Services Provider to the Romanian market. Even if it's not his main activity, He has been programming in PHP for over 5 years building billing interfaces, industrial software interfaces, e-commerce sites, and so on. He had a lot of help from a friend called Smarty in his programming experiences. Lucian got his first taste of writing when he contributed a few chapters to the book Beginning PHP 5 and MySQL E-Commerce by Cristian Darie and Mihai Bucica, Apress, 2004, with his appendix for Project Management added to the book Beginning ASP.NET 2.0 E-Commerce in C# 2005 by Cristian Darie and Karli Watson, Apress, 2005. I would like to thank you for buying this book, my parents for everything they did for me, my girlfriend who stood by me, the team at Globtel, which is like a second family for me and last, but not least a very good friend, the greatest technical author alive—Cristian Darie. Download at Boykma.Com About the Reviewer Mizanur Rahman is a Computer Science graduate from North South University, Bangladesh. He has 7 years of programming experience and vast knowledge on open-source technologies. He has more than 5 years of experience on working with PHP and PHP-related tools and technologies. Currently he is working as a full time senior software engineer in a USA-based software company located in Dhaka. Download at Boykma.Com Download at Boykma.Com Table of Contents Preface 1 Chapter 1: Introduction to Smarty 5 Templating Systems 5 Why Use a Templating System? 6 The Smartness of Smarty 7 Smarty Alternatives 8 A Rough Guide to the Software Design Process 8 Working in Teams: Layers and Separation of Concerns 9 Smarty—The Ultimate Templating System for PHP 10 Is Smarty Fast? 11 Is Smarty Secure? 11 Smarty's Main Features 12 Variable Modifiers 12 Template Functions 12 Debugging 13 Plug-ins 13 Filters 14 Smarty Internals 14 Installing and Configuring Smarty 15 Step 1: Obtaining Smarty 15 Step 2: Configure PHP to Find the Smarty Libraries 16 On Windows 16 On Linux 16 An Alternative to Step 2: Using Smarty without Having Full Access to the System 16 Step 3: Set Up Smarty for Your Application 17 Step 4: Verifying the Installation 17 Smarty Development Versions on CVS 18 Upgrading a Smarty Site 19 Summary 19 Download at Boykma.Com Table of Contents Chapter 2: Smarty Site Architecture 21 Separation of Concerns 22 What Does Concern Mean? 22 A Problem-Solving Perspective 22 Cross-cutting Concerns 23 Roles Involved in Building and Maintaining a Website 23 Starting a Smarty Project 24 Directory Structure 24 Securing our Smarty Project 25 The Data Access Layer 25 How it Works 27 The Business Logic Layer 27 How it Works 28 The Presentation Layer 29 How it Works 30 The Result 31 Summary 32 Smarty for Designers Chapter 3: What Designers Need to Know 33 Development Team Problems: Common Scenarios 33 Roles of a Template Designer and a Programmer 34 Definitions and Concepts for Designers 35 Concept of Reusability and Components 36 Splitting into Components 38 How to Design Table-less Layouts? 41 Handy Built-in Tags 43 Choosing an Editor for Template Design 44 Collaborating with Programmers 46 Summary 47 Chapter 4: Creating a Template 49 Design Concepts, from HTML to TPL 49 Introduction to Smarty Variables 52 Starting Templates 53 Non-associative Array 54 Associative Array 54 ii Download at Boykma.Com

Description:
PHP 5 and MySQL E-Commerce by Cristian Darie and Mihai Bucica, Apress, 2004, appendix for Project Management added to the book Beginning ASP. lacks security, while other template engines have only some parts of the
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.