 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Ralph Schindler's Blog: PHP Constructor Best Practices And The Prototype Pattern
by Chris Cornutt March 12, 2012 @ 11:26:10
In this new post Ralph Schindler takes a look at the Prototype design pattern and uses it to illustrate some best practices in using constructors in PHP.
If your knowledge of constructors ends with "the place where I put my object initialization code," read on. While this is mostly what a constructor is, the way a developer crafts their class constructor greatly impacts the initial API of a particular class/object; which ultimately affects usability and extensibility. After all, the constructor is the first impression a particular class can make.
He starts at ground level, reintroducing what a constructor is and what it should (and shouldn't) be used for. He talks about constructor overloading, constructor injection, dynamic class extension and using the Prototype pattern to create "an unlimited number of objects of a particular type, with dependencies in tact, each with slight variations." He gives an example with a "DbAdapter" class, showing dynamic class instantiation and how to, using the Prototype method, inject a DbAdapter object and have your class use that instead.
voice your opinion now!
constructor best practice prototype design pattern
Kevin Schroeder's Blog: The best developers hit F5
by Chris Cornutt August 26, 2011 @ 10:42:50
Kevin Schroeder has a suggestion for developers out there - you should hit F5 more often:
The best developers hit "Refresh"? No. Well, yes, but that's not what I was referring to. F5 is what you hit in Zend Studio/PDT to "Step Into" during a debug session. A LOT of developers just look at an API, or code completion, write to it, commit, deploy and they're done. I have found that the best developers not only build to the API, whatever it is, but also watch the API at work.
In his opinion, he's never met "the smartest PHP developer", someone who couldn't learn something from stepping through someone else's code. You don't even need to fully know what's going on to catch helpful bits of code or new ideas you may not have thought of along the way. He also suggests conferences (like ZendCon) are an excellent place to pick these same things up, just in person.
Having been asked what people can do to become better programmers, I would respond by saying that hitting F5 would be pretty high on my list.
voice your opinion now!
opinion best developer stepthrough code debug
LearnComputer.com: Best PHP Books My Top 5 Choices
by Chris Cornutt March 31, 2011 @ 09:57:32
On LearnComputer.com there's a new post with their top five choices of PHP books they see as good resources for any developer wanting to improve their grasp of the language.
Continuing with our best-five-book series, today we are introducing our pick of the top 5 PHP books. Obviously, PHP has been around much longer than our other review subjects such as Android or HTML5, and there is a greater general variety of books to choose from.
Their list of top five covers a pretty good range of skillsets, but leans more towards the introductory level:
- Professional PHP6 (and yes, they mention that the title is "blatant false advertising" since PHP6 is nowhere to be found)
- Learning PHP, MySQL, and JavaScript: A Step-by-Step Guide to Creating Dynamic Websites
- PHP Solutions: Dynamic Web Design Made Easy
- Beginning PHP and MySQL: From Novice To Professional
- Head First PHP & MySQL
voice your opinion now!
top choice book introductory advanced best opinion
Adminx Web: 15 Best Ever PHP Frameworks
by Chris Cornutt October 08, 2010 @ 10:13:24
Adminx Web has posted a list that, in their opinion, contains the fifteen frameworks that should be considered the "best ever" in PHP development. Some of them you might not have heard of, but give it a read and see if you agree.
Frameworks are the streamlined flow of PHP codes meshed up and baked for you to just use and implement. PHP frameworks are the result of codes written by many talented developers around the world. In other words, PHP frameworks help to promote rapid application development (RAD), which saves you time, helps build more stable applications, and reduces the amount of repetitive coding for developers. Today, in this article, we present before you 15 best PHP frameworks that are both light and easy to implement.
The frameworks mentioned cover more than just your typical MVC application environment. There's a few that touch on other technologies like REST, microframeworks and Ajax integration. Here's some of the list:
voice your opinion now!
opinion best framework rest ajax mvc
Mike Bernat's Blog: My PHP Best Practices
by Chris Cornutt October 08, 2008 @ 11:17:54
Mike Bernat has come up with a list of (eight things) his best practices when it comes to PHP development:
I suggest a more retro-active approach [than trial and error]. Studying, surrounding, and forcing yourself to abide by best-practice coding standards will yield surprising results in your applications despite the fact that it may seem like more work than it's worth.
Topics included in his list are things like:
- Always develop with error reporting set at E_ALL and E_STRICT
- Portability, Portability, Portability!
- Don't over-think!
- Validate & Sanitize your Inputs!
Check out the rest of the post for more suggestions and explainations.
voice your opinion now!
best practices suggestion trial error
|
Community Events
Don't see your event here? Let us know!
|