Cleomar Pestilli
1.1K posts


๐ช๐ต๐ฎ๐ ๐ถ๐ ๐ข๐ป๐ถ๐ผ๐ป ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ?
Onion Architecture was first introduced by Jeffrey Palermo in his 2008 article "๐ง๐ต๐ฒ ๐ข๐ป๐ถ๐ผ๐ป ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ." The article presented an architectural pattern emphasizing the ๐๐ฒ๐ฝ๐ฎ๐ฟ๐ฎ๐๐ถ๐ผ๐ป ๐ผ๐ณ ๐ฐ๐ผ๐ป๐ฐ๐ฒ๐ฟ๐ป๐ and the independence of the application's core business logic from the surrounding infrastructure. This approach promotes ๐บ๐ผ๐ฑ๐๐น๐ฎ๐ฟ๐ถ๐๐ฎ๐๐ถ๐ผ๐ป and helps to reduce complexity, making it easier to understand and change the application over time.
The Onion Architecture is similar to ๐๐ฎ๐๐ฒ๐ฟ๐ฒ๐ฑ ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ, but with a key difference: ๐๐ต๐ฒ ๐ฑ๐ถ๐ฟ๐ฒ๐ฐ๐๐ถ๐ผ๐ป ๐ผ๐ณ ๐ฑ๐ฒ๐ฝ๐ฒ๐ป๐ฑ๐ฒ๐ป๐ฐ๐ถ๐ฒ๐. In traditional layered architectures, dependencies flow downward from higher to lower layers. In the Onion Architecture, dependencies flow inward toward the application's core.
It also builds on ๐๐ต๐ฒ ๐๐ฒ๐
๐ฎ๐ด๐ผ๐ป๐ฎ๐น ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ, by placing the domain layer in the center of the application and externalizing UI and external systems. The ๐๐ผ๐บ๐ฎ๐ถ๐ป ๐๐ฎ๐๐ฒ๐ฟ contains the business logic and entities of the application. It does not depend on any other layer, making it the most stable and least likely to change. Surrounding the Domain Layer are layers that depend on it, such as the Application Layer, which contains the use cases and application-specific logic, and the Infrastructure Layer, which contains the implementation details for technologies such as databases, user interfaces, and external services.
๐๐ฒ๐ ๐ฏ๐ฒ๐ป๐ฒ๐ณ๐ถ๐๐ ๐ผ๐ณ ๐ข๐ป๐ถ๐ผ๐ป ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ are:
๐น The application is built around an ๐ถ๐ป๐ฑ๐ฒ๐ฝ๐ฒ๐ป๐ฑ๐ฒ๐ป๐ ๐ผ๐ฏ๐ท๐ฒ๐ฐ๐ ๐บ๐ผ๐ฑ๐ฒ๐น
๐น Inner layers ๐ฑ๐ฒ๐ณ๐ถ๐ป๐ฒ ๐ถ๐ป๐๐ฒ๐ฟ๐ณ๐ฎ๐ฐ๐ฒ๐. Outer layers ๐ถ๐บ๐ฝ๐น๐ฒ๐บ๐ฒ๐ป๐ ๐ถ๐ป๐๐ฒ๐ฟ๐ณ๐ฎ๐ฐ๐ฒ๐
๐น The direction of the coupling is ๐๐ผ๐๐ฎ๐ฟ๐ฑ ๐๐ต๐ฒ ๐ฐ๐ฒ๐ป๐๐ฒ๐ฟ
๐น All application core code can be compiled and run ๐๐ฒ๐ฝ๐ฎ๐ฟ๐ฎ๐๐ฒ๐น๐ ๐ณ๐ฟ๐ผ๐บ ๐๐ต๐ฒ ๐ถ๐ป๐ณ๐ฟ๐ฎ๐๐๐ฟ๐๐ฐ๐๐๐ฟ๐ฒ
Check the link to the original article in the comments.
#softwarearchitecture

English

๐ง๐ผ๐ฝ ๐ญ๐ฌ ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฎ๐น ๐ฃ๐ฎ๐๐๐ฒ๐ฟ๐ป๐
๐ฆ๐ผ๐ณ๐๐๐ฎ๐ฟ๐ฒ ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ is the process of designing the structure and behavior of a software system, which includes making decisions about components, modules, interfaces, and the system's organization.
๐ฆ๐ผ๐ณ๐๐๐ฎ๐ฟ๐ฒ ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ ๐ฝ๐ฎ๐๐๐ฒ๐ฟ๐ป๐ are important because they provide reusable solutions to common problems in software design. They capture best practices and proven solutions for designing reliable, scalable, maintainable, and extensible software systems.
There are many software architecture design patterns to know, but some of the most important ones are:
๐ญ. ๐๐ฎ๐๐ฒ๐ฟ๐ฒ๐ฑ ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ: This pattern is based on dividing the application into logical layers, where each layer has a specific responsibility and interacts with the layers above and below it.
๐ฎ. ๐ ๐ถ๐ฐ๐ฟ๐ผ๐๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ๐ ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ: This pattern is based on decomposing the application into small, independent services that communicate through well-defined APIs.
๐ฏ. ๐๐๐ฒ๐ป๐-๐๐ฟ๐ถ๐๐ฒ๐ป ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ: This pattern uses events to communicate between different components or services, where events trigger actions or reactions in the system.
๐ฐ. ๐ฆ๐ฝ๐ฎ๐ฐ๐ฒ-๐ฏ๐ฎ๐๐ฒ๐ฑ ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ (๐ฆ๐๐): is a software design method that centers the system's structure around the idea of "spaces," which are independent and autonomous units.
๐ฑ. ๐ ๐ถ๐ฐ๐ฟ๐ผ๐ธ๐ฒ๐ฟ๐ป๐ฒ๐น ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ: this is an approach where the kernel provides minimal functionality and services are implemented as separate modules outside the kernel.
๐ฒ. ๐ฃ๐ฒ๐ฒ๐ฟ ๐๐ผ ๐ฃ๐ฒ๐ฒ๐ฟ ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฎ๐น ๐ฝ๐ฎ๐๐๐ฒ๐ฟ๐ป: This is a decentralized model in which nodes in a network can act as both clients and servers, allowing for the distributed sharing of resources and information without the need for a central authority.
๐ณ. ๐๐น๐ผ๐๐ฑ ๐ป๐ฎ๐๐ถ๐๐ฒ ๐๐ผ๐ณ๐๐๐ฎ๐ฟ๐ฒ ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ: this is a pattern where applications are developed and deployed to run on cloud platforms, leveraging cloud services and infrastructure for scalability, reliability, and agility.
๐ด. ๐๐ค๐ฅ๐ฆ (๐๐ผ๐บ๐บ๐ฎ๐ป๐ฑ ๐ค๐๐ฒ๐ฟ๐ ๐ฅ๐ฒ๐๐ฝ๐ผ๐ป๐๐ถ๐ฏ๐ถ๐น๐ถ๐๐ ๐ฆ๐ฒ๐ด๐ฟ๐ฒ๐ด๐ฎ๐๐ถ๐ผ๐ป): This pattern separates the command and query responsibilities of an application's model, making it easier to scale and optimize the application.
๐ต. ๐๐ฒ๐
๐ฎ๐ด๐ผ๐ป๐ฎ๐น ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ: This pattern separates the application into an inner and outer layer, where the inner layer contains the business logic and the outer layer contains the interfaces with the outside world.
๐ญ๐ฌ. ๐๐น๐ฒ๐ฎ๐ป ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ: This pattern emphasizes separating concerns and decoupling components, making it easier to maintain and change an application over time.
#softwarearchitecture

English
Cleomar Pestilli retweeted

Um tesouro de prata nos Andes transformou para sempre a natureza da economia mundial bbc.in/3RVTgTL bbc.in/3RVTgTL
Portuguรชs
Cleomar Pestilli retweeted
Cleomar Pestilli retweeted

Software Development Process and Tools Overview
1. Idea Conception: The initial phase where the concept for a software project is conceived and outlined.
2. Requirements Gathering: Involves collecting and documenting the functional and non-functional requirements for the software.
3. Design and Planning: Creating the architecture and planning the development process based on the gathered requirements.
4. Software Development: The actual coding and implementation of the software based on the design and plan.
5. Continuous Integration and Testing: Regularly integrating code changes and performing automated testing to ensure software quality.
6. Deployment to Staging: Deploying the software to a staging environment for further testing and validation.
7. User Acceptance Testing (UAT): Allowing end-users to test the software to ensure it meets their expectations and requirements.
8. Deployment to Production: Releasing the software to the live production environment for public use.
9. Monitoring and Incident Response: Continuous monitoring of the production environment, with immediate response to any incidents or issues.
10. Post-Production Iteration and Scaling: Making improvements to the software based on user feedback and scaling the system to handle increased load or demand.
Poster made in ๐ค collaboration with Abdullateef Lawal
๐๐ฟ Subscribe to our newsletter - bit.ly/45ucZPf
#systemdesign #coding #interviewtips
GIF
English
Cleomar Pestilli retweeted

Here are 3 tips for managing exceptions in C#:
๐ญ. ๐จ๐๐ฒ ๐ฎ ๐ด๐น๐ผ๐ฏ๐ฎ๐น ๐ฒ๐
๐ฐ๐ฒ๐ฝ๐๐ถ๐ผ๐ป ๐ต๐ฎ๐ป๐ฑ๐น๐ฒ๐ฟ
Unhandled exceptions could crash your application.
And you don't want that, do you?
So, you should use a global exception handler.
In ASP .NET Core, you can add a custom middleware.
And in .NET 8, you can use the new IExceptionHandler.
๐ฎ. ๐ง๐ต๐ฒ ๐ฝ๐ฟ๐ผ๐ฝ๐ฒ๐ฟ ๐๐ฎ๐ ๐๐ผ ๐ฟ๐ฒ๐๐ต๐ฟ๐ผ๐ ๐ฒ๐
๐ฐ๐ฒ๐ฝ๐๐ถ๐ผ๐ป๐
Sometimes, you need to rethrow the exception you just caught.
If you try to throw the exception instance, you will rewrite the stack trace.
Why is this bad?
Because you'll lose valuable information about the original exception.
๐ฏ. ๐ฃ๐ฟ๐ฒ๐ณ๐ฒ๐ฟ ๐๐๐ถ๐ป๐ด ๐๐ฝ๐ฒ๐ฐ๐ถ๐ณ๐ถ๐ฐ ๐ฒ๐
๐ฐ๐ฒ๐ฝ๐๐ถ๐ผ๐ป๐
I'm not saying you should use exceptions for business logic.
But, if you are, at least do it right. ๐
And prefer using specific exceptions.
Otherwise, consider using a result object if you have "expected exceptions."
P.S. If you liked this, consider joining The .NET Weekly - my newsletter with 35,000+ engineers that teaches you how to improve at .NET and software architecture.
Subscribe here โ milanjovanovic.tech/?utm_source=Twโฆ
What's your best advice for managing exceptions?




English
Cleomar Pestilli retweeted

Free Certificaton courses form Standford University:
1. Career Success
coursya.com/product/careerโฆ
2. Project Management Principles and Practices
coursya.com/product/projecโฆ
3. Project Management & Other Tools for Career Development
coursya.com/product/projecโฆ
4. Business Value and Project Management
coursya.com/product/busineโฆ
5. Engineering Project Management
coursya.com/product/engineโฆ
6. Software Product Management
coursya.com/product/softwaโฆ
7. Agile Development
coursya.com/product/agile-โฆ
8. Scrum Master Certification
coursya.com/product/scrum-โฆ
9. Six Sigma Yellow Belt
coursya.com/product/six-siโฆ
10. Machine Learning
coursya.com/product/machinโฆ
11. Algorithms
coursya.com/product/algoriโฆ
12. AI in Healthcare
coursya.com/product/ai-in-โฆ
13. Deep Learning
coursya.com/product/deep-lโฆ
14. Natural Language Processing
coursya.com/product/naturaโฆ
15. Software Design and Architecture
coursya.com/product/softwaโฆ
Follow @ai_insights3 for more free resources.

English
Cleomar Pestilli retweeted

10 System Design Topics Developers Should Learn in 2023
1. Caching
2. Sharding
3. load-balancing
4. replication
5. fault-tolerance
6. high-availability
7. Concurrency
8. scalability
9. Performance
10. Indexing
learn more on DesignGuru - bit.ly/3pMiO8g

English
Cleomar Pestilli retweeted

Dependency Inversion + DDD = Domain-centric architecture
A few famous examples are:
- Hexagonal (ports and adapters)
- Onion architecture
- Clean architecture
Clean architecture places the business logic and domain model at the application center. Use cases are also part of the core of the application. They orchestrate the domain model and tell it what to do.
It's interesting how the dependencies between layers work. The inner layers define abstractions (interfaces). The outer layers implement these interfaces. At run time, the concrete implementations replace the interfaces. This allows you to hide the internals of things like SMS messaging, email, caching, etc.
Another benefit is improved testability. The application core doesn't depend on infrastructure. So, it's easy to write automated unit tests for this layer.
However, I find myself moving towards a more feature-driven approach.
Similar to what Vertical Slice Architecture proposes.
I will also break the dependency rule and introduce EF/Dapper in the Application layer.
But the thing is, I know how to maintain this kind of system.
I know when to introduce an abstraction or refactor the use case.
You can only learn this from experience and building many systems.
So don't obsess over architecture too much.
Having the freedom to make the right architectural choice is what matters.
P.S. If you liked this, consider joining The .NET Weekly. I write about software engineering & architecture every Saturday.
Join 33,000+ engineers: milanjovanovic.tech
When would you pick the Clean Architecture?

English
Cleomar Pestilli retweeted

Perspectiva interessante do Richard. Eu estava lรก 20 anos atrรกs e posso dizer que nรฃo mudou praticamente nada. Financeiro e comercial sempre dominaram toda empresa mais estruturada. E devs jรก reclamavam de estarem sendo comoditizados e que "bom mesmo foram os anos 90".
ร um fato que hรก um esforรงo intenso acontecendo pra tornar devs desnecessรกrios, mas ele simplesmente nรฃo dรก resultado.
E essa percepรงรฃo de que dev รฉ sรณ mais um, que nรฃo importa, que รฉ peรฃo etc sรณ reflete a realidade. ร isso mesmo: vocรช, dev, nรฃo importa, e nรฃo รฉ diferente de nenhum outro funcionรกrio. Sรณ tem uma sรฉrie de privilรฉgios porque o mercado de contrataรงรฃo estรก a seu favor, e quando/se isso mudar vai ser tratado igualzinho o resto.
Mas teus privilรฉgios nรฃo te dรฃo acesso ร s conversas realmente importantes, e nem a dinheiro realmente alto. Vocรช รฉ proletรกrio. Bem pago, mas, ainda assim, proletรกrio.
Riccardo Lamberti@ricardonho
Tenho conversado muito com CEOs, CTOs e CFOs ultimamente. Nos รบltimos 20 anos, a visรฃo do que รฉ um DEV pra eles mudou bastante. Em 2004, um DEV era a peรงa chave, o talento crucial e epicentro da empresa. Hoje pra eles DEV รฉ commodity. Encontra-se em qualquer esquina+ #bolhadev
Portuguรชs
Cleomar Pestilli retweeted
Cleomar Pestilli retweeted
Cleomar Pestilli retweeted
Cleomar Pestilli retweeted

Cleomar Pestilli retweeted

๐ง๐ผ๐ฝ ๐ญ๐ฌ .๐ก๐๐ง ๐๐ผ๐ฟ๐ฒ ๐๐ถ๐ฏ๐ฟ๐ฎ๐ฟ๐ถ๐ฒ๐ ๐ฌ๐ผ๐ ๐ฆ๐ต๐ผ๐๐น๐ฑ ๐จ๐๐ฒ
If you're a .NET developer, here are some important libraries I use in my projects:
๐ญ. ๐ก๐ฒ๐๐๐ผ๐ป๐๐ผ๐ณ๐.๐๐๐ผ๐ป:
๐ฎ. ๐ฆ๐ฒ๐ฟ๐ถ๐น๐ผ๐ด
๐ฏ. ๐๐น๐๐ฒ๐ป๐๐ฉ๐ฎ๐น๐ถ๐ฑ๐ฎ๐๐ถ๐ผ๐ป
๐ฐ. ๐ ๐ฒ๐ฑ๐ถ๐ฎ๐๐ฅ
๐ฑ. ๐ฅ๐ฒ๐ณ๐ถ๐
๐ฒ. ๐ค๐๐ฎ๐ฟ๐๐
๐ณ. ๐
๐จ๐ป๐ถ๐
๐ด. ๐ฃ๐ผ๐น๐น๐
๐ต. ๐๐น๐๐ฒ๐ป๐๐๐๐๐ฒ๐ฟ๐๐ถ๐ผ๐ป๐
๐ญ๐ฌ. ๐ฌ๐๐ฅ๐ฃ
Can you suggest anything else not on the list?
_______
If you like my posts, please follow me, @milan_milanovic, and hit the ๐ on my profile to get a notification for all my new posts.
Grow with me ๐!
#technology #softwareengineering #programming #techworldwithmilan #dotnet
English
Cleomar Pestilli retweeted

5 Best Programming Languages for Artificial Intelligence in 2023 buff.ly/3LzIErp
English
Cleomar Pestilli retweeted

Mathematics Notation Cheatsheet. by @DominicWalliman #BigData #Analytics #DataScience #AI #MachineLearning #IoT #IIoT #Python #RStats #TensorFlow #JavaScript #ReactJS #Serverless #DataScientist #Linux #Mathematics #Programming #Coding #100DaysofCode
geni.us/Math-Ch

English









