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 retweetledi

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

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 retweetledi

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 retweetledi

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 retweetledi

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 retweetledi

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 retweetledi

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 retweetledi
Cleomar Pestilli retweetledi
Cleomar Pestilli retweetledi
Cleomar Pestilli retweetledi

Cleomar Pestilli retweetledi

𝗧𝗼𝗽 𝟭𝟬 .𝗡𝗘𝗧 𝗖𝗼𝗿𝗲 𝗟𝗶𝗯𝗿𝗮𝗿𝗶𝗲𝘀 𝗬𝗼𝘂 𝗦𝗵𝗼𝘂𝗹𝗱 𝗨𝘀𝗲
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 retweetledi

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

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









