In this workshop, we'll be building an API endpoint and using the new content-type negotiation. We'll implement a custom response type that can support multiple API format versions. We will cover how to build it so that we can parse requests and update our state using our custom content-type as well.
CakePHP's bake feature greatly improves development efficiency, especially in the early phases of development.
However, the longer maintenance continues, the more the initially generated code will need to be changed.
As the developed service enters a phase of successful and continuous enhancement, the database structure is frequently updated.
The Model source code generated in the early stages of development must be updated to new sources each time the database table structure is changed.
If there is a mechanism to reflect only changes in the table structure in the Model with the bake function while maintaining the original implementation, the maintenance phase can also benefit from bake.
The design pattern that achieves this mechanism is generally called the Generation Gap pattern.
We have implemented this mechanism with a plug-in.
This proposal will show how to realize the Generation Gap pattern in CakePHP4 and the plug-ins that make it possible.
When refactoring legacy code, it’s can be useful to apply design patterns; abstracting business logic to make your code scalable.
In this talk we’ll be looking at the Factory Design Pattern, and refactor a rather lengthy switch statement into small, reusable, readable code.
The following techniques will be used: inherentance, traits, collections and factories.
Resulting in an CakePHP ORM entity that will parse CSV files from various formats.
Legacy code is side effect of any successful company. The longer your grow, the older your code is.
How can we deal with it? Rewrite? Gradual refactoring? Hire external developer team with legacy skills?
In 2022 there are tools that can handle like composer updates your dependencies. Any company or developer can refactor their huge legacy code in a couple of weeks. Switch framework? Bump PHP 5.3 to PHP 8.1? From PHPUnit 4 to 10? CakePHP 2 to 4?
You don't have to know a thing about the BC breaks and how-to-chagen it. I will show you, how you can become master of change with simple command line.
While PHP compatibility is a classic quest, CakePHP compatibility is an uncharted new territory. With each version of the platform, new classes, methods and arguments appears, while other fade away: this is the pace of modern evolution. And it is a lot easier to keep up with an automated tool.
We introduce the PDFF archive. PHP Document File Format is an open source format, built from the very source of CakePHP. It provides an encyclopedic description of the OOP API. Static analysis tool take full advantage of this knowledge to audit the code and identify discrepancies, both at PHP and CakePHP level.
Best of all, PDFF is both machine and human friendly : it serves as documentation, by listing all structural evolutions, and help cross the versions gap : including the upcoming ones.
During this presentation, we’ll describe what are PDFF files, how they are used with static analysis and automated documentation, and what other usage are planned for the future.
PHP is constantly evolving and brings a lot of new features. However, not everyone has the time to keep track of all the new features. Fortunately, you don’t have to. This talk will allow you to catch up very quickly!
In the end, you will understand all the new and exciting features that are now part of the PHP language.
GraphQL is a great way to built your Client-Server Communication. It allows you to query just the data you need while being flexible and completely typed.
CakePHP has the best ORM in the PHP-Ecosystem - so why not pair them up?
Nobody complains when the database is fast. But when it slows down, you may try using an index. But then you add another and things are even slower than before. This session covers how MySQL uses the two most popular ways to increase query speed - indexes and histograms -- so that you understand how they are really used, why the query optimizer does what it does, how to test your queries to see if your changes really improve things, and some other tricks. You will learn why histograms are not for data with high churn rates, why functional indexes can help with complex queries, and how to use multi-value indexes on JSON arrays. This session assume that you have little or no experience with MySQL query tuning, indexes, or database administration.
Together, we look at some questions that you can ask about your code to ensure that everyone - you, colleagues, customers, and your future self - can benefit from well written, clean, concise, collaborative code, no matter what your experience level, your choice of language, or the size of the team.
Beginning with some code that isn’t helpful to anyone, we work through the 6 steps of going from terrible code, to good code, building a base of knowledge that would help anyone to generate good code regardless of language, experience or the size of the team. The process looks at the six steps of planning, testing, abstraction, encapsulation, documentation and clarity for non developers.
Working through the steps, we discover why each is important, how each can be implemented, and what to do when the step seems difficult.
The slides are not available yet!
The video is not available yet!
Strategic Domain-Driven Design in CakePHP: How to Get Organized and Get Started
I joined the USA Clay Target League's software team with the intent of becoming transformational within a year. It took three. In the PHP world, three years is far too long! Our software had "hit the wall" and needed a rewrite - or something. We weren't sure what. We had a patchwork of spreadsheets and PHP scripts that grew along with us. We considered Domain-Driven Design, DDD.
DDD is scary because of the difficult learning curve. It's not that we are scared to learn; it's that we rarely have time to learn. Few PHP teams can afford to take on a multi-month or even multi-year experiment.
I learned that Strategic DDD is about communication and collaboration. That's great, but once you have strategized, communicated, and collaborated, where do you put the code you write? This talk provides you that precise starting point. You'll be able to immediately begin gaining your own hands-on Strategic DDD experience in your own project.
This talk is aimed at intermediate PHP, senior, and master software developers who've had some exposure to DDD but not necessarily any hands-on experience (that's why we're here).
Galley is used to dockerize a local development environment. Let's get it up and running, then go over how to use and extend it.
This talk will cover how to install and configure Galley. Then, go into a few use cases and examples. Finally, it will cover how to add Docker services a CakePHP project might require that aren't included by default.