News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

Ivo Jansch's Blog:
PHP as a template language
February 15, 2010 @ 08:12:04

Ivo Jansch has a recent post to his blog talking about one of the great debates in the world of PHP - is the language by itself a good templating language (versus using something like Smarty)?

I think I've said it before. The tool you use should depend on the job you're trying to do. So to say that Smarty is wrong just because it is, does not feel right. I agree that in many cases PHP can be used as a template language just fine, but there are situations where a Smarty template (or any other templating engine) is just that more pleasant.

He's comparing them on aesthetics alone, showing two snippets of code - one templated via PHP and the other in the format that Smarty uses to generate a simple chunk of XML. For more examples of the Smarty format, check out their documentation.

0 comments voice your opinion now!
template language opinion smarty



PHPBuilder.com:
Build an MVC Framework with PHP
December 18, 2009 @ 07:50:52

On PHPBuilder.com today there's a new tutorial that walks you through the process of creating a simple MVC framework in PHP based on Smarty, PostgreSQL and the PEAR XML_Serializer package.

PHP now enables you to build robust, manageable, and beautiful enterprise web applications. The best way to do that is to divide the application into three components: model, view, and controller. In other words, you need to separate the presentation, the database, and the business logic from each other. The most common approach for achieving this design goal is to adhere to a strict Model-View-Controller (MVC) framework.

He uses the example of creating an application (a feed reader) to show how the parts of the MVC will fit together as a whole. You won't find any code examples in the article, just an explanation of how everything works together. You can, however, dowload the source and follow along.

0 comments voice your opinion now!
mvc framework tutorial smarty postgresql pear


PHPEveryday.com:
Smarty Template Engine Tutorial
November 09, 2009 @ 07:56:31

On the PHPEveryday.com site there's a recent tutorial with an introduction to Smarty, a popular PHP-based templating engine.

When doing web application development, it is important to make the separation between display design (presentation) work and creating application. Simply, you can create content before without having to consider display (presentation layer). Or, you can design the look without the care of application code. This is role that Smarty Templates want to play.

They look at getting it installed, some of the basics you'll need to know and a few more complex features like arrays, objects and variable modifiers.

0 comments voice your opinion now!
smarty template tutorial


RawSEO Blog:
Using smarty templates
July 09, 2009 @ 14:33:41

On the RawSEO blog today Justin looks at templates in Smarty and how they can help you make more reusable sections of the page.

At its most basic function, the application code collects content, assigns it to the template engine and displays it. The content might be something like the headline, tagline, author and body of a newspaper article. The application code has no concern how this content will be presented in the template.

Smarty templates can not only be used to increase the overall speed of your php scripts through caching (more about caching can be found ere), but make it easier to develop large-scale applications through the separation of HTML code and php script.

0 comments voice your opinion now!
introduction template smarty


Quinton Parker's Blog:
Smarty. Solving the wrong problem since 2001
February 06, 2009 @ 12:09:31

On the heels of some previous comments concerning the Smarty PHP templating engine, Quinton Parker has posted some of his own thoughts concerning the past and future of the tool.

Today's rant is about the Smarty templating system for PHP. A recent blog post by Paul M. Jones has rekindled my strong feelings against Smarty. Honestly its nothing personal. Its just I can't believe developers are still using Smarty or that they ever started using it. Unthinkable.

Quinton talks about when he first discovered patterns and N-tier including the Model-View-Controller pattern. This naturally lead to needing a templating engine for the views, but from everything he could tell about Smarty it "solved the wrong problem" (he chose phpsavant instead). He even points out an author who, despite writing a book on Smarty, still came back and said that there's no need to use something like that in an application.

0 comments voice your opinion now!
smarty template engine modelviewcontroller mvc phpsavant problem


Paul Jones' Blog:
Say "No" To Smarty!
February 05, 2009 @ 07:57:48

Looking for a PHP template engine to sit on top of the business logic of your site? Well, Paul Jones suggests you say "no" to Smarty:

I just discovered nosmarty.net in my Solar referer logs. I have little love for Smarty, so it's nice to see this [comment about the current state of the engine].

Be sure to check out some of the comments to the post - they range from opposition to Paul's opinions ("Way to encourage respect for other people's work") to comments on the nosmarty.net site itself.

0 comments voice your opinion now!
smarty template engine opinion savant


WebResourcesDepot.com:
19 Promising PHP Template Engines
January 16, 2009 @ 12:08:20

Looking for a good templating engine for your next PHP application? Be sure to check out this great list on the WebResourcesDepot site for a pretty comprehensive list.

PHP template engines are used widely to seperate the code & the layout. PHP makes a website easier to maintain/update & creates a better development environment by enabling developers & designers to work together easier. It sure has some drawbacks which is generally the performance (most libraries offer great solutions there) & need to learn a new syntax (not always).

Some of the engines included in the list are:

0 comments voice your opinion now!
template engine list smarty savant pear dwoo


ProDevTips.com:
PHP Doctrine - adding automatic, simple CRUD
October 28, 2008 @ 11:14:27

The ProDevTips site continues their look at using Doctrine in PHP with this latest article in the series that adds in a simple, automatic CRUD system to the application.

I just found myself wishing for automatic CRUD, for quick and simple administrative tasks, as it turned out a very easy thing to add.

They create a model for their Company table and a new controller to handle the admin requests. Throw in some fetching functions, a bit of form handling and a bit of Smarty login and you have a simple admin form that automatically creates itself based on the columns in the table.

0 comments voice your opinion now!
doctrine crud simple tutorial controller model smarty


SitePoint PHP Blog:
DOM vs. Template
September 25, 2008 @ 11:18:25

In this new post to the SitePoint PHP Blog there's a look at using a small templating engine recently released by Fredrik Holmstrom that takes a different tack on working with template files - it parses them into a DOM structure.

The main difference to traditional template engines (Such as Smarty), is that the template it self doesn't have any imperatives within. In fact, the template doesn't even have to be written to the template engine, to be used - Any markup can be used as a source.

The templating system uses Domlings, bits of HTML to match against and replace with the bound information. A few examples are included - a simple binding, how to switch out a block of HTML, pushing it back in and looping over a block of information to do some search and replace.

0 comments voice your opinion now!
dom template smarty domlings html replace


ProDevTips.com:
Table of contents for Working with Doctrine
August 08, 2008 @ 15:10:03

Henrik has posted the second part of his look at using Doctrine, this time in combining it with Smarty. (Check out part one here).

We are creating an MVC setup where M is Doctrine, V is Smarty and C is our own stuff we do here. The Zend Framework has been reduced to just another component library for me now, I will pick goodies when I need them.

He shows how to be "empowered, not stifled" by the framework and to combine the two technologies in a flexible, lightweight platform. His example is a simple signup form that, on submit, saves the information to the database via the Doctrine layer.

0 comments voice your opinion now!
zendframework smarty doctrine framework mvc tutorial



Community Events









Don't see your event here?
Let us know!


feature zendframework podcast hiphop job opinion framework facebook microsoft windows conference joomla drupal codeigniter developer wordpress release extension symfony apache

All content copyright, 2010 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework