News Feed
Sections




News Archive
feed this:

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

NetTuts.com:
Creating Reusable Forms in Symfony 2
May 28, 2014 @ 12:53:55

NetTuts.com continues their series covering some of the basics of using the Symfony2 framework with this new screencast looking at creating reusable forms.

In this video, we'll build upon our existing knowledge of Symfony 2 to learn how to create reusable forms. We'll learn how to create a separate form class to house our form logic, build the form in a controller and then render it to the browser, from a template.

In the previous parts of the series they built up knowledge on the basics, routing, controllers and templates. In this screencast they use their DemoBundle to create the Person object, make a form populated with its data (name) and the Twig template to render the form.

0 comments voice your opinion now!
symfony2 series tutorial screencast reusable forms

Link: http://code.tutsplus.com/tutorials/creating-reusable-forms-in-symfony-2--cms-21244

DZone.com:
The Wheel Symfony Console
March 13, 2013 @ 11:22:31

In this new post to DZone.com, Giorgio Sironi kicks off a series that looks at reusable components in the PHP development world. In this first post of that series he looks at the Symfony console component .

Symfony is one of the most popular open source PHP frameworks on the market. The Symfony Components, however, are loosely coupled projects that can be reused as a library outside of an application based on Symfony. The component this article explores is Console (symfony/console on Packagist and GitHub), dedicated to quickly build console applications.

He goes on to talk about some of the "pros" of using the component (including built-in argument/input handing and multiple "commands") and some of the "cons" of is use (including its size and some of the built-in features you can't really work around).

0 comments voice your opinion now!
symfony console reusable component pro con commandline


Chris Hartjes' Blog:
Creating Usable Forms With Zend Framework
January 28, 2010 @ 10:48:16

Chris Hartjes has a new post to his blog today looking at how to make forms in a Zend Framework application in a bit more reusable fashion.

After searching around online for some examples of building simple forms, I was dismayed to discover there were two different ways of building the form. I could (a) do it the long way and create specific instances of the form elements using Zend_Form_Element_X or (b) do it the short way and add them to the form by use of Zend_Form::addElement() and pass it the type of form element I want via an array. For reasons I cannot explain initially, I decided to do things the long way. Later on, I found out that doing it this way saved me from rewriting.

He includes the code for his sample form that lives in a file outside the controller so he could use it for both the "add" and "edit" actions. He shows how to plug that into the controllers, the views to show the end result and a few decorators to get rid of the default form formatting and customize it how he needed.

0 comments voice your opinion now!
zendframework form zendform reusable tutorial


DevCentral Blog:
Why Is Reusable Code So Hard to Secure?
January 08, 2010 @ 10:28:42

In this recent post to the DevCentral blog (from f5.com) they ask why reusable code, one of the foundations of good development (especially in PHP) is so hard to secure.

Being an efficient developer often means abstracting functionality such that a single function can be applied to a variety of uses across an application. Even as this decreases risk of errors, time to develop, and the attack surface necessary to secure the application it also makes implementing security more difficult.

The article talks about a project the author was working on and how, when he came across a need for a component and found one that worked, they were surprised to see how difficult it would be to secure it without adding on extra code bloat. He describes some of the issue and talks about how the development of the component must not have included any thought into things like input validation or filtering. One suggestion is to employ a firewall to sit in front of the entire application and handle all of these things without changes to the code.

2 comments voice your opinion now!
reusable code security filter firewall


Mike Willbanks' Blog:
E-Commerce Framework Part 2
August 03, 2007 @ 08:44:00

Following up from a previous entry, Mike Willbanks has posted some clarifications on points previously made and the highlights on what he thinks a good framework should entail.

I decided to clarify and also explain some of my thoughts and ideas that an e-commerce framework should hold. These thoughts and ideas may be a little rough around the edges but I wanted to give a definition to the meaning of what I feel a framework is in this case as well as items that would potentially be a part of this framework.

Some of his requirements are things like reusable design, useful/easy to use components, functionality for both payment processing and courier handling as well as a catalog system to help manage items.

0 comments voice your opinion now!
ecommerce framework part2 reusable library payment courier ecommerce framework part2 reusable library payment courier



Community Events





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


list unittest language opinion configure release interview threedevsandamaybe refactor framework series developer community testing laravel install podcast introduction wordpress code

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