News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

CodeSnipers.com:
HTML Helpers - Ruby Wannabes in PHP
December 07, 2005 @ 07:15:00

On CodeSnipers.com today, there's a look at Nola's creation of HTML helpers based off of the same types of objects in Ruby.

I've gone back and forth on the idea of using ALL html generation functions to hammering it all out in a template like Smarty. Templates are nice, It sure is nice to use functions. I was looking at RoR and saw these HTML helper functions. I thought, hey I can write them in php. (Yeah to all you php hating ruby folks, this may be an effort in futility, but thinking how to implement some of these things in PHP helps me understand the concept, like my MVC articles).

Her examples include the creation of text fields, text areas, and opening/closing tags for a form. The two field functions also take in values and attributes to specify in the outputed HTML.

0 comments voice your opinion now!
HTML helper Ruby form fields HTML helper Ruby form fields


blog comments powered by Disqus

Similar Posts

DevShed: Enhancing a URL Handling Helper Class in PHP 5

DevShed: Handling Entries for a Blogger Built with PHP

Content with Style Blog: Quick helper script for ZF view translations

CodeSnipers.com: HTML Helpers - Ruby Wannabes in PHP

O'Reilly Ruby Blog: 7 reasons I switched back to PHP after 2 years on Rails


Community Events





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


laravel opinion introduction release security application voicesoftheelephpant series symfony framework podcast version language install interview community composer update package library

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