SIMB BLOG
At SIMB Digital we operate an agile development environment. Our requirements and solutions are nurtured through collaborative technologies between cross-functional teams and our clients. Projects are broken into tasks and this ensures we are flexible and responsive to meet our client’s needs.
Changes to Laravel Release Cycle - 07/12/2016
Laravel’s official release cycle includes two releases per year. The first in June and the second in December.
Laravel have announced that this is going to be changing to a January and July cycle, pushing each release out a month from its current schedule.
This has two primary advantages for the development team and the first is it allows more time for testing after Symfony’s release. The second advantage is it’ll better coincide with Laracon, the yearly Laravel conference.
For most of the users of Laravel, this will not affect much, Laravel 5.4 will be pushed out one month to launch in January. Then it’ll be back to the normal six-month release cycle with the next one coming in July.
Welcome to the new SIMB website - 18/01/2016
We’ve decided to shine a spotlight on the SIMB PHP Ninja. For too long he (or is it a she…?) has been operating by stealth, cleaning up poor php code and building exciting new digital applications across all industry sectors both large and small.
So now we are out and proud about our love for PHP code development… and our nerdy love for the PHP Ninja. Our new site better tells our story and how we help our clients achieve their digital dreams on a daily basis. We’d love your feedback!
So finally, if your site and or digital application requires the PHP Ninja treatment, please give us a call to find out how we can help.
Why we love PHP & How to write good PHP code - 18/01/2016
It seems like every day there’s a new article from either the .Net or the Ruby on Rails camp about how wonderful their environments are, and how PHP is a language for “the lowest common denominator”. Essentially the proponents of this school of thought are saying that PHP is so simplistic and “dumbed down” that it’s only used by idiots. To a certain extent I agree, PHP is a very simple language and its semantics can be easily learned. However, saying that something is rubbish because it’s simple is foolish. Simplicity is something we should strive for in everything we do. To quote some smart people: ”The ability to simplify means to eliminate the unnecessary so that the necessary may speak.” Hans Hofmann (A German who could paint rather well). ”Everything should be made as simple as possible, but not simpler.” Albert Einstein (Another German – I’m sensing a trend).
PHP does eliminate all of the unnecessary things that can make programming long and tedious. There are no headaches due to memory allocation or pointers (like in C/C++), there are few data type declarations to worry about, and the language was built from day one to make building web pages as simple as possible. The sheer richness of the in-built PHP library makes common tasks like accessing databases, reading and writing XML, communicating with web services and creating PDF documents so easy that it’s criminal.
Another important thing about PHP is the freedom that it gives you: PHP does not tell force you into programming in a certain way and it let’s you choose whatever IDE, operating system and architecture your heart desires. I recently danced with ASP.Net and quite honestly I hated it. Whilst C# is a very expressive language, ASP.Net tries to re-educate you on how to build a web page. For example, you are encouraged to use “master pages” instead of CSS to alter the presentation of a page. Moreover, Microsoft has tried to bring the desktop application style “event” architecture to the web; often this simply doesn’t correlate to how a web page truly works and it’s ugly.
In the dark ages before PHP V5 was released, writing good object oriented code in PHP was difficult if not impossible due to the limitations of the language. For example, PHP V4 had no private/protected/public data hiding declarations, had no support for abstract classes or interfaces, and had no knowledge of static and final methods. However, these days PHP supports all of the important object oriented paradigms and there has been a wealth of diverse PHP classes written and released for free on places like phpclasses.org. If you want a solution for a given problem, type it into Google and odds are good that the code has already been written for you.
It’s true that PHP’s simplicity makes writing bad code easy: in the hands of a novice you can end up with nasty spaghetti code that is difficult to read. However, if you build a structured and well-engineered framework around PHP’s simplicity, what you end up with is simplicity that “just works” and is highly maintainable and easily understood. Several excellent frameworks have been designed by the PHP community and released for free, such as CakePHP, CodeIgniter, Smarty and the Zend framework.
Writing good PHP code
Writing good PHP code requires discipline; it’s often tempting to write things the quickest way without giving much thought to extensibility and maintainability; this is a mistake, especially for larger projects! If you take the time to build reusable objects that are well commented and consistent in design, development will get much faster later on. Moreover, if you test each object thoroughly as you go, you will have fewer bugs and a far easier maintenance job. Developers who work with your code down the track will thank you!
Finally, in order to write good PHP code it’s worth knowing the most common design patterns, like “Model View Controller” (used to separate display logic from data and control logic), “Adapter” (used to provide a common interface to other incompatible interfaces), and Active Record (used to provide a read/write access to a single database row). The whole point of design patterns is to provide tried and tested solutions to common problems in software design – they are about not re-inventing the wheel and using what is known to work well.
Here are some important facts about PHP:
- PHP is used by over 20 million web sites and 1 million servers (php.net/usage.php).
- PHP supports both procedural programming and object oriented programming.
- PHP is amazingly flexible and allows you do crazy but useful things like passing functions as parameters and invoking object methods named dynamically.
- PHP is completely free – you do not have to pay anything to use it and the source code is always available. Any developer can extend the language if required.
- PHP runs on all popular operating systems and web servers.
- PHP has been around for over 13 years and have been consistently supported, extended and enhanced.
- Rasmus Lerdorf wrote the original version of PHP in 1995 – for a full history click here.