Object Calisthenics
- Details
Object Calisthenics are programming exercises, formalized as a set of 9 rules invented by Jeff Bay in his book The ThoughtWorks Anthology. The word Object is related to Object-Oriented Programming. The word Calisthenics is derived from greek, and means exercises under the context of gymnastics. By trying to follow these rules as much as possible, you will naturally change how you write code. It doesn’t mean you have to follow all these rules, all the time. Find your balance with these rules, use some of them only if you feel comfortable with them.
Only One Level Of Indentation Per Method Don’t Use The ELSE Keyword Wrap All Primitives And Strings First Class Collections One Dot Per Line Don’t Abbreviate Keep All Entities Small No Classes With More Than Two Instance Variables No Getters/ Setters/ Properties
Ref:
Using Composer in Joomla and Other Content Management Systems
- Details
In the context of the Joomlashack conference, I presented the topic of Composer usage on Joomla and in general for any Content Management Systems.
Composer is the leading application-level package manager for PHP. It has been designed for situations where the development team has full control of the environment. In multi-user systems, where independent developers create packages, the Composer usage is not recommended due to the possible conflicts. In this session, we reviewed several techniques to use Composer on Joomla and an innovative new development tool to simplify PHP prefixed code implementation at the application level.
A close encounter with PHP Xdebug 3 on Lando, Docker and VSCode
- Details
After my last encounter with PHP Xdebug 2.9, I read the news in Laravel News about the release of Xdebug 3, the great new features ... and breaking changes. Almost at the same, Lando users started to report that the new builds of the docker container were coming with the new Xdebug 3. So, it's time to update my recipes for Lando - Docker containers, battle-tested for Lamp, Joomla, WordPress, PrestaShop, Laravel, etc. In the same movement, I've confirmed the required changes to make it work for Visual Studio Code and felixfbecker/vscode-php-debug.
The required php.ini configuration:
A close encounter with PHP Xdebug
- Details
Xdebug is an extension for PHP to assist with debugging and development. It works based on the DBGP protocol. The magic of the debugging starts when the PHP development IDE (in my case VSCode) calls the Xdebug service, and it calls back to the client establishing the two-way channel. In most cases, the configuration between the IDE and Xdebug is solved with a few tweaks of both components. I have contributed to maintaining this page with the instructions to configure Visual Studio Code for Joomla and integrate it with Xdebug: Visual Studio Code. Besides all these notes, there is always one more twist. This week, on Wednesday afternoon, all the sudden Xdebug stopped working, and none of the usual suspects was the cause. If you face a similar issue, these are my notes about the process to find out why the IDE and Xdebug stopped working.
The Xdebug boot process is clearly shown in this graph:
Page 2 of 12
Aníbal Sánchez
- PHP-Prefixer / Product Manager
- PHP-Prefixer is an automated online service powered by a complex rule-based system to apply prefixes to Composer dependencies.
- Extly Tech / Team Leader
- Empower your project with our web solutions. Today, working on Laravel, Amazon AWS, and Ionic. A Joomla Volunteer.
- linkedin.com/in/anibalsanchez
- github.com/anibalsanchez
- @anibal_sanchez
- facebook/anibal.sanchez
- stackexchange/anibal