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

Allan MacGregor:
Swiss Army Knife Syndrome
May 21, 2014 @ 10:47:12

In his latest post Allan MacGregor talks about something commonly referred to as Swiss Army Knife Syndrome, a common problem in software development where features and functionality are added "just in case" and aren't needed.

The inspiration for the "Swiss Army Knife Syndrome" came from my frustration in dealing with project managers, clients, and even other developers, that think in too much of a narrow, particular way. I call it the "Swiss Army Knife Syndrome". [...] The term 'Swiss Army Knife' is often used to describe a collection of useful items or tools that are able to perform well in multiple scenarios. While this may be useful, there are risks to be aware of as well.

He points out that not only can software with unnecessary features become cumbersome over time, it can also have the potential for being mostly useless (and unmaintainable). He suggests a few ways the syndrome can show up in your process including scope creep, early optimization and anything that assumes that "more features" is the same as "more value" in the product. In his opinion, software with a clear purpose and that does its job well is more valuable that one packed with features, especially ones no one wants to use.

0 comments voice your opinion now!
swissarmy knife syndrome features scope risk

Link: http://coderoncode.com/2014/05/20/swiss-knife-syndrome.html

Vance Lucas:
Introducing Bullet The Functional PHP Micro-Framework
December 21, 2012 @ 09:02:00

Vance Lucas has a new post to his site sharing at a project he's been working on, a micro-framework for PHP that takes a functional approach to its structure (and the structure of the apps you can make with it), Bullet.

Bullet is a new PHP micro-framework with a unique functional approach to URL routing that allows for more flexibility and requires less verbosity than the more typical full route+callback approach found in other micro-frameworks. The main problem with most micro-frameworks and even full-stack MVC frameworks that leads to code duplication is that the callback or method executed to perform the action and respond to the URL route lives fully within its own scope. This means that you are forced to repeat a lot of setup code across URL route handlers that load the same resource, authorize it, etc.

He illustrates with an example of a GET/DELETE to the same routes and having to create multiple handlers for each. He restructures this with Bullet and shows how it can nest callbacks inside of handlers to make for simpler routing. It also scopes down requests and gets more fine grained as you nest, making it easier to create reusable handlers (like in other files). If you're interested in finding out more about Bullet and its structure, you can find it in the project's main site.

0 comments voice your opinion now!
bullet microframework nested functional scope routing


Community News:
Privates - Harmful or Useful? (Discussion)
December 12, 2012 @ 09:53:57

There's been a few articles posted on various blogs in the PHP community recently about the "most correct" usage of the "private" scope in your PHP applications. As with any feature of just about any language out there, there's people on both sides of the fence. Here's the ones that have weighed in so far:

  • Brandon Savage's initial post (an excerpt from his upcoming "Do This, Not That" book)
  • A response to this from Anthony Ferrara
  • Brandon's own response to comments on his previous article
  • This new post from Larry Garfield and some of his experience from the Drupal world

Various topics come up during these posts including static coupling, using interfaces versus inheritance, wrapper classes and developer intent.

0 comments voice your opinion now!
private scope visibility harmful blog


Rob Allen's Blog:
Access view variables in another view model
April 03, 2012 @ 12:53:37

In this new post to his blog Rob Allen shows you how to access the view variables from another ViewModel.

Unlike Zend Framework 1, the view layer in Zend Framework 2 separates the variables assigned to each view model. This means that when you are in the layout view script, you don't automatically have access to variables that were assigned the the action's view model and vice versa.

He includes snippets of code with an example controller and a sample view that fetches a value from a child ViewModel instance. He also shows how to access layout and configuration values in the view.

0 comments voice your opinion now!
view model variables other scope child viewmodel zendframework2


Vance Lucas' Blog:
Protected vs Private Scope Arrogance, Fear and Handcuffs
April 05, 2011 @ 10:45:53

Vance Lucas has tossed his hat into the ring in the debate about private versus protected scope in PHP projects with this new post to his blog.

The age old private vs protected debate has been re-ignited in the PHP community recently following the decision of Doctrine2 and Symfony2 to make all class methods private until there is a very clear and proven reason to change them to protected or public. The intention is a good one - to ensure they are providing a clear and stable API through intentional and known extension points that they can better test and support. [...] The problem is that this kind of thinking is a slippery slope that kills the spirit of programming.

He suggests that, by limiting the scoping down to private, you're taking away the very thing that gets most people excited about third-party tools - the extensibility. In his opinion, it sends a strong message to other developers that they're "not welcome" to make suggestions or updates to the application/tool.

0 comments voice your opinion now!
opinion private protected scope application thirdparty


Community News:
Dutch PHP Conference - Updates to the site and the schedule
February 24, 2011 @ 13:49:39

The Dutch PHP Conference has posted an update about the conference today including changes to the schedule and how its represented on the site.

t has been about two weeks since the schedule was published and ticket sales started, but that doesn't mean we haven't done anything in the meantime! There have been a number of updates on both the site and the schedule.

There's five new talks that've been added to the schedule including Paul Matthews' presentation on Solr, Chris Jones talking about high performance PHP apps and David Soria Parra on git. The site updates mainly revolve around the classification of the different sessions - icons added to show skill level and scope of the presentation. There's also an update about the unconfernece and official conference social.

0 comments voice your opinion now!
dutch conference dpc11 speaker classification skill scope unconference social


Stefan Koopmanschap's Blog:
My privates are not public, they are protected
July 19, 2010 @ 13:58:12

Stefan Koopmanschap has spoken up in response to some of the comments about OOP design, specifically in using the private scope in your applications. Overall, Stefan agrees and thinks that this access prevents possible extension which goes against the whole point of writing open source software.

I agree with pro-private people that it is important to have a good API design and to use that to protect less experienced developers from making mistakes, however one should never assume that the developers using your libraries, especially Open Source libraries, are less than yourself. [...] I definitely am not in favor of simply opening up the complete library to every developer though. By making a clear decision on which methods are public and which methods are protected you will ensure that people simply implementing your library will use the API that you have taken the time designing.

His does note, however, that there are cases when a private scope is valid - usually when it involves a planned, architected product where it is someone's responsibility to have that access controlled.

0 comments voice your opinion now!
private protected scope access modifier opinion


Ivo Jansch's Blog:
Good use of public, private and protected in OO class design
July 19, 2010 @ 10:57:14

In a new post to his blog Ivo Jansch responds to some of the recent comments about scoping in PHP applications with some thoughts of his own (someone spurred on by the Symfony project saying that "private is evil").

I don't care much about Symfony as I'm not a user, but it turned to a discussion on OO theory when Stefan defended the position by claiming that you 'should have the right to extend a class's methods if it doesn't support the use case you have'.

He also mentions the agreeing opinions of Marco Tabini and Travis Swicegood. Ivo gives an example of a piece of code that uses all three states - public, protected and private - as a use case for his later statements. In his opinion, removing the private/protected scoping from the picture only helps those looking to make it easier to derive information from the class rather than fine-tuning what can be called.

Be sure to read the comments on this one - there's lots of great thoughts from community members in there.

0 comments voice your opinion now!
public private protected scope opinion use unittest


DevShed:
PHP 5 Helpers Calling Methods Out of Object Scope
July 27, 2009 @ 12:38:17

In this new tutorial from DevShed today they continue their series looking at making helper classes for your applications. This time they're focusing on using methods without needing to create an object first - static methods.

The methods of the class that I [just] mentioned were declared implicitly dynamic, even though it's perfectly possible to call them statically, and the PHP engine won't raise any errors about this process. However, it would be much better to declare these methods explicitly static, thus taking advantage of the functionality offered by the text helper class without having to spawn an instance of it.

They show how to define the methods with the "static" keyword so they can be called outside of the class' scope. Code for the helper class and the code to put it to use.

0 comments voice your opinion now!
method class object scope tutorial


Zend Developer Zone:
ZendCon 2009 Call for Papers is now open!
May 05, 2009 @ 07:50:49

The Zend Developer Zend has posted the announcement that the Call for Papers for this year's ZendCon - The PHP Conference has been opened.

Welcome to the Call for Papers for the 2009 edition of ZendCon '" The PHP Conference. This year's conference will be held October 19th '" 22nd at the San Jose Convention Center and is being co-presented by S&S Media. It is the largest gathering of the PHP Community and the premier PHP conference, allowing all attendees to mingle with decision makers, core developers, prominent community members, and so many more.

The scope of this year's conference has widened a bit and won't just be about PHP-related topics. Proposals for sessions about things like project lifecycle, frameworks, and performance tuning will also be accepted. There will be five different tracks this year:

  • Server/Operations
  • Lifecycle Best Practices
  • Frameworks
  • Real World PHP
  • PHP Development Topics

The Call for Papers ends May 31st, so get over and submit your proposal before time runs out!

0 comments voice your opinion now!
zendcon09 callforpapers cfp deadline may broader scope



Community Events





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


community package podcast interview zendserver language install release symfony series list api opinion laravel tips deployment update library framework introduction

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