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

Wojciech Sznapka:
Type Hinting is important
June 12, 2014 @ 09:41:51

In his latest post Wojciech Sznapka reminds us that type hinting is important in your PHP applications and can help provide more structure and better overall code practices.

One of my favorite PHP interview questions, is: what is Type Hinting and why it's important? Putting definition in one sentence, Type Hinting is a way to define type of parameter in function signature and it's a sine qua non to leverage polymorphism. [...] So given the fact, that Type Hinting is optional and we don't need to specify types of parameters passed to the method - why bother? Answer is easy: well prepared method signatures defines your model and are part of the "contract" that your code reveals to its consumers. It also prevents many silly errors and keeps codebase clean and coherent.

He talks about the best practices on using type hinting including where to put them (in an interface or base class or child class?) and some of the pros and cons of each. He also points out that some practices around type hinting, like overriding the hint and calling the method with unexpected/variable input, should be avoided (see the L in SOLID).

0 comments voice your opinion now!
typehint importance bestpractice liskov substitution principle solid

Link: http://blog.sznapka.pl/type-hinting-is-important

Brandon Savage:
Frameworks DO matter.
May 26, 2014 @ 10:51:15

In his latest post Brandon Savage follows up his previous post (about learning the language first) that points out that frameworks are important/useful but they shouldn't be the focus.

In writing about how the framework you learn doesn't matter, I hoped to advance a position that articulated the fact that among the many frameworks, picking the right one is less important than getting a solid grasp on the underlying language. In fact, frameworks have tremendous advantages to them. They take care of a great deal of things for us, things that most applications need and nobody wants to write every time they need it. Frameworks are tremendously helpful.

He points out that learning a framework first and depending on it for common functions limits your skills and hinders you from the power of the language (PHP) itself. He suggests that it's not a "language or framework" debate, but more of a "language then framework" perspective.

0 comments voice your opinion now!
framework importance language learn education

Link: http://www.brandonsavage.net/frameworks-do-matter

SitePoint PHP Blog:
Becoming a PHP Professional The Importance of Others
December 03, 2013 @ 09:59:37

The SitePoint PHP blog has a new post in the "Becoming a PHP Professional" series today from Bruno Skvorc. In this latest post he talks about the importance of other people in the process, including both learning (being mentored) and teaching (mentor).

When you work on improving your skills on your own, you'll often find yourself stuck. In fact, the experts frequently find themselves stuck more often than newbies, but it's the speed and skill with which they "unstick" themselves that makes them stand out in the cold, snowy field of identically unimpressive snowflakes.

He talks about having an "invisible friend" or another non-developer to talk to that may provide a different perspective (see rubber ducking). He covers teams and both the good and bad of being a part of them. He also looks at the mentoring/being mentored relationship and some places you can go to get more information about both in the PHP community. Finally, he looks at a tricky topic - ego in development and the inflation that can happen as your skill level grows.

Others around you - either digitally or in real life - can protect you from both inflation and deflation - a good mentor or colleague will tell you when you're steering wrong, and they'll motivate you when you're in a slump. They'll help you avoid the multi-month cooldown periods and the post-burnout lack of interest that eventually occurs.
0 comments voice your opinion now!
professional tips importance others team ego mentor

Link: http://www.sitepoint.com/becoming-php-professional-importance-others/

Sameer Borate's Blog:
Importance of logging in web development
October 04, 2010 @ 12:46:02

Sameer Borate has posted some of his thoughts about logging in PHP applications and how it can be one of the most important things you do.

Software development is an exercise in managing complexity, and the more tools and methods we have at our disposal the easier it gets. One of my favorites is logging - recording important code execution points that I think are important, especially during debugging. [...] But what information does one log and what does one keep out. This usually depends on what kind of application you are developing.

He gives an example of logging on database intensive applications - storing the query execution state - complete with a simple example of an "addUser" method that logs any issues caused by the query execution. If you're not using a framework that has it's own logger, he recommends a few: KLogger, Log4PHP and the Zend_Log component of the Zend Framework (can be used separately)

0 comments voice your opinion now!
importance logging application debug



Community Events





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


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

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