Larry Masters will join us and welcome you to CakeFest 2021!
Passbolt Keynote - How does your Cake test?
Juan Pablo Ramirez
How does your Cake test?
Any software ought to be automatically tested. This ensures the application's integrity over time and evolution.
Testing with CakePHP has recently evolved with three significant features co-developed with Nicolas Masson, easing the test driven development experience:
- Migration-managed test databases,
- Trigger-based test database cleaning to speed up the suite,
- Fixture factories to generate complex test fixtures in no time.
At Passbolt, we grabbed the opportunity to refactor our code base and enhance the quality of our tests.
In this presentation, I will describe the test code-base and the continuous integration cycles of the Passbolt API with code examples, from unit to integration tests and dummy data generation.
In a second part, I will explain how to efficiently use the fixture factories plugin, with extensive insights into the plugin's code-base.
CakePHP implements a way to reuse code in controllers called Components. Creating components keeps controller code clean.
However, components are not the only mechanism to reuse code in controllers. We can also reuse code by using Traits. Furthermore, we can use Dependency Injection in CakePHP 4.2 and later. Which do you use better Components, Traits or Dependency Injection?
In this talk, I will introduce the each of the three mechanisms and consider what use cases each of them is suitable for.
Automatically Distributing Reference Queries to Read Replica in CakePHP4
In order to handle large amounts of accesses and large amounts of data, it is essential to have a mechanism to distribute reference queries to Replica.
CakePHP does not have distributing reference queries to Replica, but it can be done with a plugin.
cakephp-master-replica is a great plugin to do this.
This can be achieved by implementing a process to switch to Replica before executing a reference query, but if it is simply implemented, it will be cumbersome to write the switching process every time.
In this proposal, I will introduce the cakephp-master-replica plugin and show an example implementation in CakePHP4 that automatically switches to Replica when a reference query is issued.
Leverage the IDE in CakePHP development
How to make development not only fun, interesting and fast, but also how to write future proof code and refactorability.
We check out different must-have tools and showcase a few best practice approaches.
You will definitely be able to take a few useful things away from this for your own app dev.
Fighting COVID-19 with Contact Tracing in Czech Republic
*) How does the contact tracing work in Czech Republic
*) How the system was built to support 4000 concurrent users with realtime operations (calls, SMS messages etc.)
*) How does the system integrate with multiple government information systems of Ministry of Health and Interior Ministry
*) How does CakePHP 4 support all these business processes from a technological point-of-view
Our Standards and Why We Use Them
Here at Jump Twenty Four, We adhere to some strict standards for our code. We look at the questions of Why we use the standards we use, What coding standards we apply, The benefits of applying coding standards, and an example of using the coding standards across projects.
In Laravel we apply PHP Linter, PHPStan, ECS, Englightn and Test Driven Development.
In CakePHP the only one we cant apply is Enlightn as that is Laravel specific.
Using a simplified blogging application as an example of how we apply the packages we need to the project, how we use those packages, how to fix things those packages suggest to us, and the reason we apply certain standards are all covered.
How to re-use code - Utility Classes and PHP Namespaces
Sometimes you need to re-use some functionality in multiple places like commands, controller functions or other specific events.
Instead of copying the code and producing duplicate code a good solution are Utility Classes.
In this talk I will go more in depth in the following topics:
* Why we need PHP Namespaces
* How are PHP Namespaces set up in CakePHP
* How do I use PHP Namespaces
Distribute private plugins with Satis
I'd like to do a presentation on how to develop private plugins and how to distribute them with Satis..
In Centerdata we use a couple of inhouse plugins, which we re-use in several projects.
In CakePHP2 we used the Git Submodule approach, but since the switch to CakePHP4 we're using Satis; a private composer repository tool.
During the presentation i'll:
* Setup Satis
* Create a CakePHP project
* Bake a plugin
* Push that plugin to GitLab
* Add plugin to Satis
* Open another Cakephp project and include the plugin with Composer
Here Be Dragons: Finding the Joy in Software Development
There's a strong tendency toward "gate keeping" right now in the 2020s. Senior developers warn "there be dragons" while announcing a "hands off" policy toward the crucial areas of the code base. You and I need to get past that. Where's the fun when you can't touch the dragons? The joy's in _experiencing_ software development, dragons and all. Our industry experiences remarkably high rates of burnout. Looking back across the decades, this is my experience--how to have fun. We look at "the guru", mentoring, imposter syndrome, the need for continuously learning, and thoughts on how we extend the craft of software development.
A Grumpy Programmer's Guide To Being A Senior Developer
So you're a "Senior Developer" now? What does that even mean? Is it a title you get for being the last one standing in a difficult environment? Is it a label you get for being older than your peers? If you want to become a "senior developer" what are some things that can help you get there?
In this talk I share my experiences of being a "senior developer" on different projects across different companies across different programming languages. Some of the things discussed include:
* problem isolation
* tooling support
* domain knowledge
While sometimes it just takes time to get to be "senior", these tips can help apply structure to a job that often comes with less coding and more problem solving.
A CakeFest giveaway & short break
Modern Infrastructure as Code with Ansible
Join us as we dive into Ansible, the server management tool designed to help developers keep servers configured properly and running smoothly. We’ll cover the basics and dive into some in-depth configuration options so you can stop treating your servers like pets: which you constantly have to feed and water. Join us as we learn how to turn those pets into cattle in your server farm and turn your infrastructure into code!
Ansible is an agentless server configuration manager which performs tasks over an SSH connection. There is nothing to install on your systems. We’ll cover examples of how to leverage Ansible modules to add users, configure services, set up configuration files, and deploy code to remote systems. Instead of manually performing these tasks, join us as we learn how to write Ansible playbooks to accomplish these tasks and turn our infrastructure into infrastructure as code!
Intro to Ansible
What Ansible is good for
What Ansible isn’t good for
Configuring Inventory & Environments
Running & Debugging Playbooks
Reuse other playbooks for your needs
Where to get help & other fantastic learning resources
NGINX Unit - Modernise your CakePHP deployments
Using NGINX with PHP-FPM has been the standard to run your Cake-PHP Applications for the last years! But what if I tell you there is something else. Something new from NGINX you can use to power your Cake-PHP Applications? Something you can use to run multiple Applications at the same time and something that can be used to control the number of PHP processes, the certificates used for TLS encryption and the PHP User and Admin options just an API call away. If you are curious what this something is and how I used it to modernise my PHP Deployment strategy and ecosystem join me and learn more about NGINX Unit!
Creating Reusable ETL Utilities using Phinx
ETL = Extract, Transform, Load.
This is something that has to happen for any project working off of a legacy database, especially one that is not already in "Cake" format. Seeds only get you so far, eventually you have to pull in that legacy data.
With a little architecture and some clever coding, it's possible to create a reusable ETL utility using Phinx migrations, which are already baked into CakePHP. In this talk, I will explain the classes and components required to bolt-on to the existing migration infrastructure to create a reusable ETL utility that can be run again and again to import data from any external source into a normalized CakePHP database.
Closing / Cake Ceremony
Join us for the famous cutting of the Cake(PHP).
We ask all virtual attendees to have their own cake ready to enjoy with the community.