This article is first in the 3 part series of
Testing with selenium, Jenkins and PHP Unit. Series include three posts:
- Headless selenium testing, setting Cent OS minimal.
- Understanding and setting selenium, composer and PHP Unit.
- Understanding Jenkins, Phing and automate test build.
Black box testing is one of the important testing approach for any web based product. In black box testing, a tester do not know internal working of the software but only care about input (enter URL, fill forms etc) and confirm we get expected output.
As the product functionality and pages increases, black box testing needs more and more time to test everything. Obviously it is a human nature that a person gets bored if (s)he need to do same task over and over again and soon some test cases start slipping.
There is no thing best in the world. If something is best, it means, others simply wont exist and if exist, won’t survive.
Same is true for PHP frameworks. Presence of multiple frameworks is proof that no framework is best. So how will we select right framework for our next project?
I am Kapil Sharma, Technical Architect at Eastern Enterprise, with 10.5 years of professional experience in web application development, using different programming languages, CMS & frameworks. This article mainly shows how do I select framework for my next project. Personally I have worked with Zend Framework 1 (not 2), Symfony 1 & 2, Code Ignitor (not working any more), and Laravel 4 & 5. So I might not be the right person to compare all frameworks but it doesn’t stops me selecting right framework for next project, does it?
Please note, this article list down my points for considering framework for next project. There could be many who might not agree with me, and I respect their views.
To keep article short, I am assuming we already selected PHP as programming language and ruled out CMS. So only PHP frameworks are considered in this article.
One of the common questions that a developer have, how to upgrade next technical level? Well everyone have their own ways but one common thing that includes in nearly every answer, upgrade yourself.
How do we upgrade ourself? Simple way is to read as much as possible. Follow some good programmer/speaker and read what they say. Still reading take some time and many of us complain we are out of time, are we really? How much time do you waste while waiting in queues, for a meeting, ready to go out but waiting for family/team to get ready. There are lot of example when we wait 10-15 minutes, utilize that time to read?
To utilize that time, I generally collect contents on my mobile/tablet using different tools like pocket, flip board etc. Recently I started collecting them as PHP Reboot monthly magazine on flip board. Install flipboard on your android/Iphone/kindle and subscribe the magazine, which contains many important blog for current month and (planned to) publish monthly. Here is October issue.
Following well defined coding guidelines is very important for a team (two or more developers). Proper coding guidelines help team members to understand the code written by other developers and thus improve efficiency of the team.
Although all teams develop their own coding guidelines, there is some basics that will always stick. You can define if you want to use camelCase or snake_case but many times, developers find it difficult to understand the meaning of different cases. So in this article, we are going to define different cases used in programming.
It have all the words in lower case and different words are separated by underscore (_). It is mainly used used and popular in wordpress and old PHP projects. Examples:
Spinal-case or kebab-case or lisp-case
I am Kapil Sharma, Technical Architect at Eastern Enterprise and working on web technologies since last 10 years. You can find more about me on my personal website kapilsharma.info or contact me through twitter @kapilsharmainfo or contact us from on website.
I am publishing my notes I made for personal reference while learning laravel. Although I do not include very basics of language in my personal notes but since I’m publishing these notes, I’ll add some more basics here for those trying to learn laravel using my notes.
Today, we are going to discuss basics of:
Views are the part of MVC architecture so if you are not familiar with MVC architecture, please look it on google. MVC basics are out of scope for these notes. (more…)
Welcome to the first blog post under Laravel learning notes.
In these notes, I’m going to cover all the basics of laravel but I do expect readers have moderate to good understanding of PHP. Knowing any other MVC framework is not essential but good to have as I’m not going to cover basics of MVC design pattern. If you don’t know or understand MVC, just google it a bit.
First step while learning anything new is to install the tool, in our case, laravel. We will install laravel through composer. Using laravel (or probably any other PHP project) using homestead or custom vagrant box is recommended in professional development environment but that is currently out of scope for this post.
We mostly use composer to install laravel. Composer is the dependency management tool for PHP. Dependency management tool basically read a configuration file to identify all the project dependencies and install them. Assuming you do not have composer installed, lets first install composer. (more…)
On Friday, I posted a tweet.
That was just casual tweet followed after some other instances. But when I reviewed my week’s tasks (it include nearly everything I did over weekend) I realize I’m complaining. I immediately replied to myself:
That mean either I should try to fix it or just keep quite. This is the starting point to think how I can help to fix this problem. There are many huddles like:
- PHP frameworks lie in three categories; Micro framework, Full fledges framework and component based.
- Their target audience is different, some framework provide basic features and target small to medium projects while other target enterprise applications. How a common solution is provided for such a wide targets.
- There are many kind of people, some like to go through theories first and someone prefer to start doing things first and prefer learning by doing things. There are others who go for mixed approach. There are many who prefer to go through any available project example and learn by going through existing code. Symfony really made it easier through jobeet project and frankly I’m impressed by that approach.
Obviously no one can give one common solution. Still after considering quite a few facts, I personally feel if we have one example project implementation with us, learning become easier. So my Fix is:
Please note, I mean no disrespect to anyone, anything. Whatever I said was my thinking from my view point. I don’t feel everyone should/will agree with me. Everyone view is based on multiple factors. This post is about my view, my thoughts and I’m not claiming my thought is correct but yes, they will not change soon.
Why I’m writing this? I recently posted a tweet, tweet was:
While writing it my target audience was just few friends who follow me and occasionally reply. However I was surprised when my mailbox filled with quite a few mail like @xyz replied, @abc retweeted etc. One reply was from Taylor Otwell. His reply was:
Those who don’t know him, he is author and lead developer of Laravel; One of the most popular and probably one of the best PHP frameworks right now. I follow Taylor, his site, blogs, twitter; I’m his fan and wanted to be like him. Still Taylor, sorry but it was not typo. I mean worse case. Please, let me explain.
There were few other replies as well, few of them were:
Learning Laravel is the best case scenario. I came from CI and Zend. Laravel is much better.
Coming from CI myself I must agree
worst case? That’s upgrading mate…
Yes I agree with everyone. Developer within me agrees. Professionally I’m Technical Architect in a software company, I as Technical architect agree. This month only, I’d taken few official sessions about Coding standards, Code Sniffer and Test driven development. Laravel, as I read at many places, is one of the best examples of TDD. How can I disagree with anyone of you? Yes, I agree with everyone.
But after office hours, I’ve one more personality. I’m weekend developer. As weekend developer, I work on quite a few personal client projects, some personal projects. These projects are not enterprise apps, but apps that are targeted to be finished during 1-3 weekends. Weekend developer within me does not agree with any of you.
In this part, we are going to setup following:
XDebug: XDebug is used to debug PHP code and easily integrates with leading IDE like Netbeans.
Phing: Phing is PHP project build tool, based on Apache ANT.
Composer: Composer is new dependency management tool in PHP world.
(Edit) Code Sniffer: Check if your code is following standards. You can define your own standards.
Again to remind, this is not tutorial for given tools, we are just setting up the environment with these tools. Respective website is the good start point if you want to learn more about these tools. In future, I’ve plans to make a simple kick start tutorial for these tools but till then, go through official documents and Google for tutorials on these tools. (more…)
I regularly visit forums, stack overflow, IRC channels to ask questions and giving back open source community whatever possible for me. Obviously I learned much from those places and owe them. One of the common questions asked on community how to setup development environment. Obviously not basic one but advanced like how to setup Pear, Composer, XDebug, PHP Unit etc. All these are vital tools for development. So I’m trying to cover all these common questions on one single post.
Please note here I’m setting advanced PHP development environment on Windows 7.