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

The ChangeLog Podcast:
#129 Facebook's Sara Golemon and the PHP Language Specification
November 11, 2014 @ 10:06:53

On The Changelog podcast today hosts Adam and Jerod talk with Sara Golemon (of Facebook) about the PHP specification that was released a bit back by a group, largely at Facebook, to help define how the PHP language functions.

Some of the topics mentioned in this episode include:

You can listen to this episode either through their in page audio player or by downloading the mp3. If you enjoy it, be sure to subscribe to their feed and get the latest updates as they're released.

0 comments voice your opinion now!
thechangelog podcast saragolemon facebook specification language

Link: http://thechangelog.com/129/

Inviqa techPortal:
My top ten favourite PhpSpec limitations
September 11, 2014 @ 11:15:31

On the Inviqua techPortal today Marcello Duarte lists out his top ten favorite limitations with the PhpSpec testing tool. PhpSpec is a tool where the tests are driven by specifications, focusing on the "how".

PhpSpec is enjoying a growth in popularity lately, probably related to the recent release of 2.0. Lots of people have been playing with it and trying to get to grips with what it can do. Naturally they try to do the same things they would with other testing tools. Soon they find out they can't. "Oh! This PhpSpec has some many limitations… I can't do this… I can't do that…". Ironically, other people make positive comments about the same "limitations". So I decided to publish a list of my top ten favourite limitations of PhpSpec, and why I love them so much.

His limitations list includes things like:

  • I can't test private methods
  • You can't have code coverage
  • I can't use a data provider
  • My tests can't follow a code standard

Check out the full article for more of his list and some code examples ot help clarify each topic.

0 comments voice your opinion now!
phpspec testing behavior specification limitations top10 list

Link: http://techportal.inviqa.com/2014/09/11/my-top-ten-favourite-phpspec-limitations/

Marc Morera:
Bye Bye Symfony
September 04, 2014 @ 12:41:00

In his most recent post Marc Morera says bye bye to Symfony and "hello to PHP". Confused? His point is that using the Symfony components as a whole in the framework isn't the only option anymore. You can use them just as effectively as pieces of a larger PHP project, puling them in as needed.

The reason of this post is just to tell you, with a simple example, how to say Bye Bye, Symfony! and say Hi PHP!. This really means uncouple from Symfony Components and still use them as the default implementation, while we can securely remove, from the composer require block, our Symfony dependencies.

He starts off with a simple example showing how to use Symfony's "UrlGeneratorInterface" to create a URL output class that can be injected to use in the route handling of the application. He then moves on to a more real-life example (a metaphor) using a USB connection and the adapters/cables that could be involved to connect various devices. He then shifts back over to the world of code and describes a specification interface that can be used with the URL generation and remove the Symfony dependency from it. On top of this he builds an adapter object that brings the Symfony component back into the picture and abstracts it out a level to make for more flexibility and testability in the long run.

We win maximum implementation flexibility and minimum coupling. Would be wise to say that a PHP project should tend to this thought, but once again, it depends on many factors. [...] Using ports and adapters is really a great tool for those who want to uncouple from implementations and a great pattern if you develop open source. Open source should satisfy as people as possible, so remember, specify and then implement.
0 comments voice your opinion now!
symfony component abstract tutorial interface specification

Link: http://mmoreram.com/blog/2014/09/01/bye-bye-symfony/

Community News:
PHP Specification in Development
July 30, 2014 @ 11:54:25

In a recent message to the PHP internals mailing list Sara Golemon has announced the development of a PHP specification, a document formally defining the interfaces and structure of the functionality of the language. The effort is being spearheaded by a group at Facebook.

We (As in PHP) have been talking about making a spec for the PHP language for a LONG time. With PHPNG around the corner, the need for a formal spec is even more important so that we can reliably ensure that PHP.Next matches PHP 5.6's behavior as much as possible. Meanwhile, other implementations of PHP (like HHVM) should be as spec compliant as possible so that we don't see the language bifurcate. To that end, we (as in Facebook), have been putting together a formal language spec for PHP (using PHP 5.6 as the source of truth) along with an additional conformance test suite (which compliments Zend/tests).

An initial version (a "sneak peek") has already been posted providing a great start to the effort. There's already been a lot of support for the project in the community and some of the concerns around workflow and maintenance are already starting to be addressed.

0 comments voice your opinion now!
language specification facebook earlyrelease

Link: http://grokbase.com/t/php/php-internals/147p423vvz/php-language-specification

Evert Pot:
HTTP/1.1 just got a major update.
June 10, 2014 @ 11:23:57

While not specific to PHP, the HTTP specification that defines how web applications talk has gotten a major update in its latest version. In his latest post Evert Pot summarizes some of these changes and how they'll impact the work you're doing.

The IETF just published several new RFCs that update HTTP/1.1 [...] These documents make the original specification for HTTP/1.1 obsolete. As a HTTP geek, this is a big deal.

These new RFCs include definitions of standards around message syntax and routing, conditional requests, authentication, the 308 status code and the forwarded HTTP extension. Evert gets into the details of some of the changes, pointing out the major changes first and places where ambiguity has been resolved. He also includes a list of other "interesting things that have changed" in these new specs including clarifications around dealing with unexpected whitespace, the removal of the default charset of ISO-8859-1 and that the 204, 404, 405, 414 and 501 status codes are now cacheable.

0 comments voice your opinion now!
http11 http specification rfc update summary

Link: http://evertpot.com/http-11-updated/

Anthony Ferrara:
Beyond Inheritance
November 05, 2013 @ 13:08:24

In a previous post Anthony Ferrara looked at design patterns and their use (and usefulness) in modern applications. in this new post he continues the series but focuses more on a strategy to move past them related to inheritance.

In my last post, I talked about revisiting the concept of Design Patterns and questioned how useful it is to "learn" them. The conclusion that I came to was that you are better served by focusing on how objects communicate rather than traditional patterns. Well, that's not the only "traditional concept" that I think we should move beyond. So, let's talk about inheritance...

He starts with a bit of definition about what inheritance actually is (for a little context) related to classes, not traits or interfaces. He compares two ideas around this inheritance - the actual implementation of it in the code and the specification of it, the planning a "promise" the structure defines. He discusses the separation of these two ideas and that what matters is that the specification is implemented - how doesn't matter as much. He gets down to the most basic concept behind the idea of inheritance, the idea of a "contract", that defines the "agreement" the implementation puts into practice.

Finally, he gets down to what he calls "the key" behind inheritance and encapsulation of functionality into desecrate parts - behaviors. These allow you to know what kind of functionality comes from which class/object without having to guess. Methods have behaviors and objects are collections of these, combining to make a larger object-centric behavior.

Object Oriented Programming is all about abstraction. Each layer is an abstraction of code below it. Using "types" makes this difficult, because often we don't have real-world analogs to represent each layer. After all, an abstraction is specifically not a type. It's the concept behind it. With behaviors, this comes naturally.
0 comments voice your opinion now!
inheritance specification implementation contract behavior oop

Link: http://blog.ircmaxell.com/2013/11/beyond-inheritance.html

Chris Hartjes:
PHPSpec and the New Wave of Testing
October 19, 2012 @ 08:42:18

Chris Hartjes, a big proponent of testing in web applications (mostly in the PHP realm so far) has a new post to his site with some of his thoughts about PHPSpec, the specification-driven testing tool recently released by the same folks who made Behat.

I think that we are witnessing the first wave of new testing tools in the PHP community that allow developers to wrap their applications in automated tests. I am familiar with the BDD-style that is being promoted in PHPSpec, through my work with Behat to create automated user acceptance tests. I think if you want a tl;dr version of PHPSpec I would tell you "write hybrid unit/integration tests using plain language".

He notes that writing code to match a specification has similar concepts to using unit testing for TDD (with something like PHPUnit). He points out a few interesting things like the use of mock objects and the fact that you'll still need to write some code to make tests work - that's unavoidable right now.

0 comments voice your opinion now!
phpspec testing functional unit specification tdd


Konstantin Kudryashov:
phpspec2 SUS and collaborators
October 09, 2012 @ 08:32:55

Following the release of the phpspec SpecBDD tool, Konstantin Kudryashov has posted this new article talking about SUSes ("Subject Under Specification") and how they relate to the functionality phpspec offers.

First of all, phpspec2 is not a testing framework. It's a SpecBDD tool. It means, testing is not our primary aim. Tool's job is to enforce and make SpecBDD in project flawless and phpspec2 uses all available methods to do that - state of the artformatters, class and method generators and lot of othe fancy buzzwords :) Today, i want to explain you the heart of phpspec2 - SUS, collaborators and prophets.

He starts off defining specifications as a list of behaviors about how an object should behave and the abilities that come with them (like "getTitle"). He shows assertions, like "shouldReturn", and how you can use Collaborators to evaluate the interfaces between objects.

0 comments voice your opinion now!
phpspc specbdd specification object collaborator sus subject


Keith Casey's Blog:
Where Open Source Fails
September 30, 2010 @ 12:12:01

In a new post to his blog today Keith Casey has voiced some of his opinions on where he thinks most Open Source software efforts fail in their goals of making good, quality software that's well-developed and useful.

Earlier this week, I unsubscribed from the mailing lists of a pair of Open Source projects. About two years ago when I found the projects, they involved fascinating topics in under served niches. One of those niches - the one customer/user-facing - is still there and under served, but that's not relevant in the current discussion. In reviewing the activity on the mailing list, I noticed some interesting things: activity was very high, there were some smart people involved in the discussions and there was a lot of discussion on what should be done but nothing actually getting done.

He notes that without a codebase to work from, there can't be any direction because no one knows where things are headed or what can be done to improve it. Writing up a spec to guide the development can help, but then you still have the pitfall of who should write that spec.

0 comments voice your opinion now!
opensource software fail opinion specification


php|architect Blog:
Goodies for PHPers in Internet Explorer 9
April 13, 2010 @ 10:08:07

On the php|architect blog today Orlando Medina points out a few goodies in Internet Explorer 9 that could be useful for PHP developers out there.

Microsoft has some catching up to do in terms of standards compatibility, but they are also doing some good things with this browser. They are bringing some much needed web-standards compatibility, in addition to some JavaScript performance enhancements.

Handy new features include better HTML5 support, CSS3 support, XHTML parsing, Javascript compilation and an overall trend towards a more standards-based approach that Microsoft hasn't worried about in a good while now. He also mentions the OData toolkit that lets your web applications speak the same "language" according to Microsoft's more unified specification.

0 comments voice your opinion now!
internetexplorer web standards odata specification



Community Events





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


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

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