Posts Tagged ‘ekino’
[PHPForumParis2022] Exploring DDD and Functional Programming Practices – Benjamin Rambaud
Benjamin Rambaud, an accomplished PHP engineer at ekino, delivered an engaging presentation at PHP Forum Paris 2022, inviting developers to explore Domain-Driven Design (DDD) and functional programming to enhance their craft. With a nod to the collaborative spirit of the event, Benjamin adopted a market-like metaphor, encouraging attendees to “pick and choose” principles from DDD and functional programming to enrich their PHP projects. His talk, informed by his role as a co-organizer of AFUP Bordeaux, offered practical insights into improving code quality and project communication, drawing from established methodologies while urging developers to adapt them thoughtfully.
Foundations of Domain-Driven Design
Benjamin opened by demystifying DDD, a methodology focused on modeling complex business domains with precision. He emphasized the Ubiquitous Language, a shared vocabulary that aligns developers, stakeholders, and domain experts, fostering clearer communication. By prioritizing domain logic over technical details, DDD isolates business rules, making code more maintainable and expressive. Benjamin illustrated this with examples from his work at ekino, showing how DDD’s strategic patterns, like bounded contexts, help developers encapsulate business logic effectively, reducing framework dependency.
Leveraging Functional Programming
Shifting to functional programming, Benjamin highlighted its synergy with PHP’s multi-paradigm nature. He introduced concepts like pure functions, immutability, and value objects, which enhance testability and predictability. By integrating these principles, developers can create robust, error-resistant codebases. Benjamin drew from his experience with Drupal, demonstrating how functional programming complements DDD by isolating domain logic from framework-specific code, allowing for greater flexibility and maintainability in PHP projects.
Practical Implementation and Hexagonal Architecture
Delving into practical applications, Benjamin advocated for hexagonal architecture as a cornerstone of DDD in PHP. This approach uses ports and adapters to decouple business logic from external systems, enabling seamless integration with frameworks like Symfony. He cautioned against rigid adherence to frameworks, referencing resources like Mathias Verraes’ blog for deeper insights into DDD patterns. Benjamin’s practical advice, grounded in real-world examples, encouraged developers to experiment with repositories and interfaces tailored to their project’s needs, fostering adaptable and resilient code.
Balancing Frameworks and Principles
Concluding, Benjamin urged developers to understand their frameworks deeply while embracing external paradigms to avoid being constrained by default configurations. He emphasized that DDD and functional programming are not rigid doctrines but flexible tools to be adapted contextually. By encouraging exploration of languages like Elixir or OCaml, Benjamin inspired attendees to broaden their perspectives, enhancing their ability to craft high-quality, business-aligned PHP applications through thoughtful experimentation.
Links:
[DevoxxFR2015] Standardizing Development Environments with Docker Compose
Etienne Peiniau, a Java architect at Ekino, presented a concise yet insightful session at Devoxx France 2015 on using Docker Compose (formerly Fig) to streamline development environments. With expertise in Spring, Hibernate, and cloud deployments, Etienne demonstrated how Docker Compose ensures reproducible, isolated setups for Spring Boot applications and their dependencies.
Docker Compose for Consistent Setups
Etienne introduced Docker Compose as an open-source tool, succeeding Fig after its acquisition by Docker. He showcased a YAML configuration file defining a Spring Boot app with dependencies like databases and caches. A single docker-compose up command spins up the entire environment, eliminating manual setup overhead. This approach rivals Vagrant and Foreman, offering simplicity and isolation.
This method, Etienne argued, ensures uniformity across developer machines.
Scaling and Load Balancing Demonstrations
Through live demos, Etienne illustrated scaling multiple instances of a web application, such as Elasticsearch, using Docker Compose’s scale command. He showed how it automatically balances loads across instances, simplifying testing and development. His GitHub repository provides additional examples, enhancing accessibility for experimentation.
This functionality, Etienne noted, boosts development agility.