News Feed
Jobs Feed
Sections




News Archive
feed this:

Reddit.com:
May 22, 2013 @ 11:52:52

Over on Reddit.com recently a discussion was kicked off asking people what framework they used for REST - their tool of choice for making API creation simple.

I was wondering what people here preferred for setting up REST APIs. Specifically if they had a preferred PHP framework for setting them up. in the past I had used CodeIngiter but am looking at Laravel some recently. I don't anticipate extremely heavy usage but I'd like to easily update the framework when it has new releases without a real pain working around my models and controllers.

Several different options were mentioned in the comments including:

Do you have a favorite you use for your REST APIs? share it here!

0 comments voice your opinion now!
opinion preferred framework rest api

Link: http://www.reddit.com/r/PHP/comments/1em2ne/preferred_framework_for_rest_usage

Anthony Ferrara:
Our Failure As An Industry
May 07, 2013 @ 09:19:34

Anthony Ferrara has a new post to his site today describing what he sees as a failure in our industry - letting security become an after-thought to the development process.

In the April issue of the PHPArch magazine (also published on her blog), Elizabeth Tucker Long wrote a really interesting editorial piece coining a concept she called Security-Driven-Development. She (quite correctly) identified a problem in the current development community where security has become an after-thought (if it's thought of at all). This isn't a new concept, in fact it's a concept that I and many others have been preaching for quite a while now. However I've been coming to realize that I've had it wrong the whole time. And I think the entire industry is getting it wrong today.

He talks some about the current state of web application development and how, even with more powerful technologies than ever, we still fall short in security testing. He suggests that the current way of doing things - treating security testing as a "throw it over the wall" or "someone else's job" problem - needs to stop. Security needs to be integrated with development and he suggests that managers and developers of open source projects should take the lead.

0 comments voice your opinion now!
failure industry security testing development opinion

Link: http://www.lornajane.net/posts/2013/setting-multiple-headers-in-a-php-stream-context

Reddit.com:
Zend2 vs Symfony2
May 03, 2013 @ 12:57:56

On Reddit.com there's a discussion happening comparing two popular and prominent PHP frameworks - Zend Framework 2 and Symfony 2.

For those that have used both frameworks, what one do you feel is a better overall framework? I tried ZF2 in beta and it seemed overly complicated to symfony but I don't know if its gotten better since then.

Opinions shared in the comments of the post include things like:

  • "So if you are learning for job prospects, go Zend. I love Symfony 2 though, its a joy to work with."
  • "It doesn't matter. Each has a strength and a weakness, and neither will go away. Pick one and use it, you'll be fine."
  • "I don't think there is such thing as a best framework as you should use the best tool for the job. I don't think MVC is the solution to all problems."
  • "Both are quite bloated but they have to be considering their target markets."

On the whole, the views are of the "best tool for the job" mentality - a good sign for the community and these two frameworks.

0 comments voice your opinion now!
zendframework2 symfony2 versus opinion community

Link: http://www.reddit.com/r/PHP/comments/1dcqst/zend2_vs_symfony2

Reddit.com:
How to progress my PHP skills?
April 29, 2013 @ 10:22:47

On Reddit.com a reader has asked the community what they think he needs to do to progress his PHP skills past the "little bit" he's learned so far.

Last summer I started learning a little bit of PHP, knowing HTML and CSS drove me towards wanting to learn some PHP for fun. I went through a pretty simple book, and made some simple websites (registration and message system, user submitted data, file uploads) using mostly tutorials which I tweaked a little bit. Since last summer I haven't learned anything new, but now that summer is coming along again I might be a bit bored, so I have been thinking of attempting to learn even more.

Suggestions included in the comments are things like:

  • Learn about software architecture.
  • Understand your environment.
  • I very highly suggest learning a PHP framework.
  • http://www.phptherightway.com
  • Start learning industry tools for PHP. It will all influence your coding style, and illustrate why some styles are considered best practices.
  • To add to the other suggestions, I recommend becoming a regular contributor to one or more open source projects.
  • What helped me a lot was to write my own micro framework using OOP that I can now use for future websites and web applications.
  • Come up with a 'complex' web site/application idea and get to it. Bonus points if you can launch it and make money off it (half kidding).

You can read the full set of comments for more good suggestions here.

0 comments voice your opinion now!
skills suggestion opinion advance learn tools

Link: http://www.reddit.com/r/PHP/comments/1d32dr/how_to_progress_my_php_skills

Samuel Levy:
PHP is the right tool for the job (for all the wrong reasons)
April 24, 2013 @ 13:15:08

About a month back Samuel Levy wrote up a post sharing some of his thoughts on PHP, mostly centered around one idea - that PHP is the right tool for the job (for all the wrong reasons).

When people complain about PHP being a horrible language, not fit for human consumption, they will often talk about how the features of their favourite language are far more refined; have been designed with elegance in mind; are consistent and secure. And you know what? They're right. But PHP is still a better tool. [...] And it shouldn't be. It really shouldn't. I want another language to knock PHP out of the way. [...] I can't, though, because PHP does one thing really well that no other language seems capable of doing. It works, out of the box, for people who don't know what they're doing.

He goes on to talk about the "installation" required with running PHP scripts and how it makes it mostly "idiot-proof" to use. He points out that PHP has a definite niche in the world of web development languages - one that has a larger need that some others.

This is the challenge for all the people who want to complain about PHP - if your chosen language is so much better (and I have no doubt that in many ways, it objectively is), then make it accessible in the way that PHP is. Until then, keep that double-clawed hammer in your shed in case you want to make... burgers...
0 comments voice your opinion now!
opinion right tool wrong reasons niche

Link: http://blog.samuellevy.com/post/41-php-is-the-right-tool-for-the-job-for-all-the-wrong-reasons.html

MaltBlue.com:
Why Testing Makes a Project Successful and You Can't Afford to Deny It
April 24, 2013 @ 10:48:15

Matthew Setter has a new article on his MaltBlue site today that suggests that one of the reasons a project is successful is because of effective testing.

Like many of us, despite being told repeatedly how great testing is, the benefits it will bring, the time it will save and how it will improve the quality of my applications, I too considered testing a second-thought. I saw it as something which was both expensive and time-consuming. If I was genuine with you, I'd say I believed it be be nothing more than a "nice to have", after the application was written. If you also feel (or have felt) this way - know that you're not alone.

He realized, though, that the usual false assumptions about testing were just that and starteed getting into testing, TDD and BDD on recent projects. He talks some about some general thoughts around testing like "testing can't be an after-thought" and the fact that it's no always easy. He includes a way of thinking about testing in your application and the confidence good, solid tests can bring.

0 comments voice your opinion now!
testing project success unittest tdd bdd opinion

Link: http://www.maltblue.com/software-development/testing/why-successful-software-includes-testing

Phil Sturgeon:
Is PSR-0 Shortsighted, or are you?
April 17, 2013 @ 09:14:42

In a response to this previous post about the PSR-0 standard and why it might be "shortsighted", Phil Sturgeon has posted some of his own thoughts on the matter as a participant (and supporter) in the PHP-FIG group.

One of the fun things about trying to support the PHP-FIG and all the good its doing, is seeing blog posts written complaining about it by people that just don't know what they're talking about. I get involved in conversations on Reddit (dangerous I know) on a mission to understand the problems with its perception throughout the community, and try to make more knowledge readily available to avoid confusion. I put together the PHP-FIG FAQ and the rest of the group voted it in, which I believe helped a lot. Sadly some blog posts are sent out by people with a whole bunch of odd opinions that you just can't do anything about, so instead I'm going to respond with a play-by-play approach.

He goes through several of the points Tom made in his original post, pointing out places where the information was either misconceptions or just completely incorrect. He relates some of the autoloading suggestions Tom made back to things Composer can do and how this is different from "magic" on the part of the library user.

PSR-0 has its problems, but they are the two that I have pointed out and they are rather trivial. [...] If you'd like to add custom autoloaders to your Composer packages then go ahead. If you'd like to build your own custom autoloaders for all of your packages then you can do that too, but it ruins the entire purpose of what PSR-0 is meant to do. That's fine, because you don't need to use it, but I am happy as hell that PSR-0 exists and I wouldn't make drastic changes to it for anything.
0 comments voice your opinion now!
psr0 autoload opinion response phpfig composer

Link: http://philsturgeon.co.uk/blog/2013/04/is-psr0-shortsighted-or-are-you

Tom Butler:
PHP PSR-0 Pretty Shortsighted, Really
April 16, 2013 @ 13:12:14

In a new post to his site Tom Butler gives some reasoning as to why he thinks PSR-0 is shortsighted and some examples of a possible better alternative.

A little background for those unaware of what PSR-0 is: There's a self-declared PHP "standards" group called PHP-FIG attempting to push several "standards" throughout the PHP community. [...] I have little interest in debating the politics behind pushing standards or whether small groups of developers trying to make decisions that affect the entire community is good or not, but I do object to the PSR-0 standard itself. My issues are purely practical, PSR-0 reduces flexibility and makes life more difficult for developers

While he likes the idea of a standard way to be able to include third-party libraries that can be reused in multiple systems, he suggests that it answers the wrong question. In his view, it should be up to the library/tool developers to ensure the structure of their code to work with a standard, not the other way around. He points out that a "standard" is something that should apply to all situations and some of the workarounds that are needed for PSR-0 negate this idea.

In his alternative method, he suggests an "Autloadable" interface that can be implemented by the library/tool that includes a "load" method to handle the actual class loading. Then this autoloader would be registered via a json configuration file for the package. This allows the developer to control the loading and place any exceptions they might need into their own logic instead of trying to work around possible issues with the PSR-0 loading scheme.

PSR-0 is a bad solution to a good problem. If you take anything from reading this post, remember this: If the standard defined how autoloaders could be extended, rather than how autoloaders worked, then each library or vendor could provide its own extension to the autoloader and everyone would be happy.
0 comments voice your opinion now!
psr0 autoload standard opinion shortsighted alternative

Link: http://r.je/php-psr-0-pretty-shortsighted-really.html

Learn Computer:
Is LAMP Pack Still Strong?
April 01, 2013 @ 12:55:09

On the "Learn Computer" site there's a recent post that wonders if the web development standard of the LAMP (Linux, Apache, MySQL and PHP) stack is "still strong" and will still stand up with new technologies.

This year in tech (like almost every other year) has been filled with buzzwords. Many of them this year, however, are based around big data processing and web content: NoSQL, Hadoop, BigTable - the list goes on. With all the fuss around these new technologies, one might be tempted into thinking that these are the technologies of the future, and that from now on our servers and websites will be built upon, leaving technologies like LAMP in the dust.

They talk about some of the things the LAMP stack doesn't do well like difficulties with scalability on both the web server and database side. There's also mention of the things that it does do well, like getting things up and running quickly and with a solid structure.

That being the case, the LAMP stack is still going very strong, and it's definitely still extremely viable in small and medium-sized deployments; there are no signs of it waning in that regard, and I'd expect it to be a standard deployment for many companies and organizations for quite some time to come.
0 comments voice your opinion now!
lamp opinion strength platform linux apache mysql


Larry Garfield:
On empty return values
March 29, 2013 @ 09:15:59

Larry Garfield has posted some of his thoughts on return values and reminds you about consistent return types, regardless of the result.

Earlier today, I posted a brief tweet (isn't that redundant?) about return values in PHP (or really, any language). Originally it was about return values from functions (such an exciting topic, I know), but it ended up generating a fair bit of lively conversation, as well as a patch against Drupal 8. So lively, in fact, that I think it deserves more than 140 characters.

He proposes a new rule of thumb: "If your function returns a collection, its null value return must also be a collection." A more broad version of this might be: "make your return types consistent." It's all about predictability and the contracts you have between different parts of your code. If a user calls your method expecting to be able to loop over the results, they'll be disappointed with a "false". He talks some about using and throwing exceptions more effectively for error handling and answers several "but wait..." arguments for his return strategy.

0 comments voice your opinion now!
empty return values opinion contract exception expected



Community Events











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


framework opinion code development introduction language example series composer zendframework2 interview phpunit release community api testing functional application podcast database

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