Java News/Tech/Discussion/etc. No programming help, no learning Java
News, Technical discussions, research papers and assorted things of interest related to the Java programming language NO programming help, NO learning Java related questions, NO installing or downloading Java questions, NO JVM languages - Exclusively Java!
Hello all ! Do you have any examples / resources using hexagonal architecture or DDD on Symfony? Or simply feedback. I would like to learn more about all of this.
Folders structure for hexagonal architecture in Flask
Hi guys, I have been reading the Leonardo Giordani book about Clean Architecture and I want to start building some app with python and Flask, my doubt is how I can organize my folders, is there any standard way to do it? Thanks in advance
Does anyone know open-source DDD and Hexagonal Architecture based projects (Java or PHP)?
I really want to understand how to make DDD and Hexagonal Architecture based projects. But it is difficult to understand how to implement some concepts in real life. For example, how to implement validation of Aggregates and so on. All found DDD based repositories on GitHub are too trivial or not representative. Maybe someone knows a good open-source DDD project with at least 50k rows of code, PHP or Java? Or you have a private one and can share it with me. From my side, I will help you with test writing.
Hexagonal architecture with the Serverless framework
I am looking at https://github.com/tarasowski/hexagonal-architecture-lambda/ for Hexagonal architecture and would love to use Hexagonal architecture with the Serverless framework. Can I get an example where hexagonal architecture is used with the Serverless framework? or maybe structure/pointers about using it with Serverless framework.
I am learning about hexagonal architecture (still newbie, I found it yesterday) and it is looking like the best way to code in medium pages or articles. They talk about this as an way to build software where we can easy change details, easy test, easy change business rules... But I don't find disadvantages reading about it. Is this really good for all situations or should I use in specific cases?
Hey guys, Recently I was introduced to the wonders of the hexagonal architecture (aka clean architecture), and I was pretty amazed by what simple dependency injection / interface could do to improve my back-end. I can switch the underlying data source (mongodb -> postgresql) really easy. And it's starting to take shape in my mind. But I'm struggling so bad to picture it in a front-end environment. Do you have any good open-source project that implements it ? Maybe a broader question might be : how do you feel about this architecture ? especially in the front-end. And did you already use it with react ? Last thought : as opposed to the back-end, I really dislike sticking with an architecture for the front-end as opposed to figuring it out, but I'm sure for long-term projects It might not be viable, what is your go-to basic minimum architecture for such project ? Sorry for my english, If some parts are confusing please tell me I'll try my best to rephrase
Sharing - Real world template Fastapi project using Gino as AsyncORM, Alembic (db migration) And all based on hexagonal architecture.
I build a small a repo to introduce Fastapi feature (pydantic models, dependency injection ...) as well as real-world template to speed up your next project. https://github.com/slimovich/Realworld-fastapi-gino-template The repo is still under development but for those who want to contribute or follow, Feel free to check it out and let me know what you think. Hopefully, it can help.
Should I use a Hexagonal architecture in a RESTful API (.NET Core)?
Hello all! I realize that the title gives little context, so I'll try to explain myself a bit: We had a RESTful API that consisted of just two projects: the API itself (controllers, DTOs, helpers, etc) and a class library for the context (domain classes, migrations, etc). I was tasked to re-organize the architecture following a hexagonal design, that consisted of the following:
- API: responsible for model validation and calling the services - Models: class library for all of the DTOs - Core: - Services: responsible for processing the entities (CRUD and whatnot) - AutoMapper: AutoMapper profiles - Interfaces: class library with interfaces to access the DAL - Data Access: repositories to access the context - Context: the EF Core Code First context
Now, I'm a beginner myself and I'm possible missing some of the key benefits here, but from the look of it, these issues were introduced with this change:
I cannot longer (should not) access the domain classes from the Controller. In other words, I'm not allowed to do something like if (myEntity.SomeProperty == null)... since the API should not know about the Context
I cannot return status codes from within the Services (we are raising exceptions to return a 409, 404, etc)
The controllers are now mainly one or two lines that call the right service
We lost the atomicity that EF Core provides in some cases. For instance we have a repository method that deletes an entity, save changes, and then another one that inserts a new entry, then save changes again (these two are called from inside a service). Whereas with the previous approach this was done in the controller all in memory until a single, final SaveChangesAsync was called
Extra roundtrips because of this
What I believe we won:
Easier unit testing (it is easier to mock an interface)
Decoupling
I mention this already, but I will say it again: I'm a beginner, with just a little over of a year and a half of experience, but I'm strugling to understand why this is the right call. I do, however, understand that nothing is black or white, context matters and probably some key piece of information that I don't know was left out, but from what I read online we shouldn't be using a repository pattern with EF Core. A senior Dev felt the same way as I did, we presented our case and we were allowed to revert these changes, to go back to the traditional (sorry, I don't really know the name) approach of having the controller to do all the work (checks, early returns with status codes, working with the entities, saving to the database). Was this the right call? How/where can I learn more about this? Sorry for the long, unclear post! EDIT: Thank you so much guys for all of your replies. I truly appreciate it! I will read each one of them really carefully. Thanks!
Hi everyone! I recently searched for some examples of backend apps using ktor to benchmark with spring framework. I wrote this application to make an article in which I am working in my spare time with a comparison between the two frameworks and the experience of working with a framework that brings out the best in language. if you want to take a look in a backend application using kafka, ktor, exposed and other stuffs, check it out: https://github.com/jgabrielfreitas/ktor-hexagonal-benchmark feel free to give a feedback! :)
Documentée en 2005 dans son blog par Alistair Cockburn, l’Architecture Hexagonale est une architecture logicielle qui a beaucoup d’avantages et connaît depuis 2015 un regain d’intérêt.. L’intention originale de l’Architecture Hexagonale est : Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation Hexagonal architecture is a model or pattern for designing software applications. The idea behind it is to put inputs and outputs at the edges of your design. Hexagonal Architecture defines conceptual layers of code responsibility, and then points out ways to decouple code between those layers. It's helped clarify when, how and why we use interfaces (among other ideas). Hexagonal Architecture is NOT a new way to think about programming within a framework. Instead, if's a way of describing "best practices" - practices that are both old and new. I use At the very core of the hexagonal architecture lies the domain model, implemented using the building blocks of tactical DDD that we covered in the previous article. This is where the so-called business logic lives, where all the business decisions are made. This is also the most stable part of the software that hopefully will change the least (unless the business itself changes of course). The Pragmastism Driven Developer passionate about xDD (TDD/BDD/DDD), clean architectures (Event Sourcing, Hexagonal Architecture and al.) and code quality. Enthusiastic defender of knowledge sharing and human skills. Voir ses Articles. Commentaire. 28 réponses pour " Pérennisez votre métier avec l’architecture hexagonale ! " Published by Fabien, Il y a 5 ans. Par conséquent, vu que ce n En utilisant cette architecture, nous avons réduit le nombre de dépendances de cinquante à seulement trois ou quatre pour le domaine. Et c’est très bien d’un point de vue sécurité. Pour aller plus loin. Vous voulez en savoir plus ? Jetez un œil sur Domain-Driven Design and Hexagonal Architecture tips&tricks series Hexagonal Architecture (aka Ports and Adapters) is one strategy to decouple the use cases from the external details. It was coined by Alistar Cockburn more than 13 years ago, and it is getting better with the Onion and Clean Architectures. Let me introduce the Hexagonal Architecture’s intent: L’objectif principal de l’architecture hexagonale est de découpler la partie métier d’une application de ses services techniques. Ceci dans le but de préserver la partie métier pour qu’elle ne contienne que des éléments liés aux traitements fonctionnels. Cette architecture est aussi appelée “Ports et Adaptateurs” car l’interface entre la partie métier et l’extérieur A hexagonal architecture simplifies deferring or changing technology decisions. You want to change to a different framework? Write a new adapter. You want to use a database, instead of storing data… Hexagonal architecture is a model or pattern for designing software applications.. The idea behind it is to put inputs and outputs at the edges of your design.In doing so, you isolate the central logic (the core) of your application from outside concerns.Having inputs and outputs at the edge means you can swap out their handlers without changing the core code.
Find out what all the fuss is about with Hexagonal Architecture. Check out Carlos's Gandara presentation about Hexagonal Architecture 🤩 Quick tips for the ones following the Hexagonal Architecture, please apply TDD outside-in and Fake your dependencies instead of mocking them Let's start from scratch and go beyond the buzzwords. We'll go together through these ideas to understand how you can improve the maintainability of your pro... Recording from my webinar on making code more testable using the Hexagonal (aka Ports & Adapters) Architecture. Learn the Hexagonal Architecture style and what Clean Architecture brings to the game.Source Code:https://github.com/ivanpaulovich/clean-architecture-manga Hexagonal Architecture Its inside the Application Layer that we develop the uses cases, these objects interact with the Domain layer and the application services. The use cases are called ports ... Imagine a single distributed system of more than 550 microservices on 10k servers, and around 600 developers. That’s what Allegro is. Building such a system ... This is not a tutorial on Hexagonal Architecture. It is just a small effort in conveying the point in the form of discussion. Hope you enjoy it.