 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Systems Architect: Performance benchmark of popular PHP frameworks
by Chris Cornutt April 24, 2013 @ 12:04:31
On his site today Lukasz Kujawa has a post that compares some performance benchmarks of several popular PHP frameworks including Slim, CodeIgniter, Laravel, Symfony2 and Zend Framework 2.
There are many assumptions around performance of different PHP frameworks. I frequently hear strong opinions about superiority X over Y in this context. There are companies writing new PHP frameworks from scratch because available solutions are too slow for them. What does it really mean? Does the framework performance matters? Before answering this questions lets check how slow is your framework!
He took the "quick start" projects provided for each of the examples and ran some tests with the Apache Benchmark (ab) tool against EC2 instances, all configured the same way. The results weren't overly surprising with Slim beating the others hands down (it's a micro-framework after all) and Kohana and CodeIgniter coming in second and third. The frameworks with more overhead like Zend Framework and Symfony ranked some of the slowest.
voice your opinion now!
benchmark framework test apachebenchmark ab results
PHPMaster.com: Simplifying Test Data Generation with Faker
by Chris Cornutt February 19, 2013 @ 12:09:02
In a new post to PHPMaster.com today, Rakhitha Nimesh takes a look at Faker, a tool that can be used to generate random test case data as a part of your workflow.
Testing is an iterative part of the development process that we carry out to ensure the quality of our code. A large portion of this entails writing test cases and testing each unit of our application using random test data. Actual data for our application comes in when we release it to production, but during the development process we need fake data similar to real data for testing purposes. The popular open source library Faker provides us with the ability to generate different data suitable for a wide range of scenarios.
Faker uses built-in data providers like "Person", "Company", "DateTime" and "UserAgent" to give you randomized output from the data sets you define. Code is included showing how to create the provider in your objects, extending the correct provider and making a request for a property. A real-world example is also included about testing an email marketing engine for address, title, name and content. There's also a little bit added at the end showing how you can increase the randomness of the results returned by "seeding" the Faker engine.
voice your opinion now!
test data generation faker library object provider tutorial
Brandon Savage: Effective Refactoring Strategies
by Chris Cornutt December 24, 2012 @ 11:24:57
In a recent post to his site, Brandon Savage has a few helpful hints to keep in mind when you're refactoring your applications to make them easier to maintain (and possibly perform better) in the future.
The downtime [of this week] provides a perfect opportunity for the aspiring software developer to do the one thing they are always told there's no time to do: make the code better for better's sake. With few deadlines and plenty of free time, most developers can get a few hours of refactoring in to their code towards the end of the year. They can rearchitect sections that were implemented with haste in September; they can write tests for sections that were untested in April. Put another way, the "lost week" can be redeemed.
He has a few recommendations, each including their own brief summary:
- Test Everything First
- One Method, One Job (Also One Class, One Job)
- Don't Be Afraid Of More Objects And Classes
- Remove Dead, Unused, Unnecessary or Old Code
- Document Your Code
Check out the full post for the summaries and links to other useful resources.
voice your opinion now!
refactoring tips test single responsibility oop documentation
Gonzalo Ayuso: Managing Windows services with Symfony/Process and PHP
by Chris Cornutt November 01, 2012 @ 10:49:09
In his recent post Gonzalo Ayuso shows how to use Symfony to work with Windows services on the server.
Sometimes I need to stop/start remote Windows services with PHP. It's quite easy to do it with net commnand. This command is a tool for administration of Samba and remote CIFS servers. [...] Today we are going to create a PHP wrapper for [net rpc service].
He uses Behat to create a feature (test) file, the code behind the features and a service class that handles the actual work of interacting with the service (with methods to do things like stop, start and list running services). Examples of its use are also included.
voice your opinion now!
windows services behat feature test class tutorial symfony
Matt Frost: Using Selenium2 with PHPUnit
by Chris Cornutt September 19, 2012 @ 11:44:20
In this new post to his site Matt Frost continues his look at using Selenium to test his applications (see the first parts here) and shows how to use the Selenium extension for PHPUnit to run all his tests from one place.
So I've taken it upon myself to do a bit of reading and messing around with the Selenium Extension for PHPUnit and I wanted to share a bit of what I learned. Looking around on the internet, I didn't find a whole lot of real good information on the Selenium2TestCase API so I want to provide a little bit of depth in some of those areas. I'm going to cover a few areas of interest and provide some code examples where relevant.
He includes the steps to get things set up to connect with the Selenium server and some of the common functions you can use to interact with its browser. He shows how to select items and interact with things like forms and links. He also includes a recommendation of using the "url()" method to jump to a point in the app instead of clicking through the same paths over and over again.
voice your opinion now!
selenium2 phpunit unittest functional test tutorial
|
Community Events
Don't see your event here? Let us know!
|