<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: joaofelipefaria</title>
    <description>The latest articles on DEV Community by joaofelipefaria (@joaofelipefaria).</description>
    <link>https://dev.to/joaofelipefaria</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F558522%2Fffbc36b8-d085-49e6-ae7c-a86695ca06aa.jpeg</url>
      <title>DEV Community: joaofelipefaria</title>
      <link>https://dev.to/joaofelipefaria</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/joaofelipefaria"/>
    <language>en</language>
    <item>
      <title>Design patterns d'intégration : ce qu'ils sont et lesquels reviennent souvent en entretien</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Fri, 09 Oct 2026 12:43:44 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/design-patterns-dintegration-ce-quils-sont-et-lesquels-reviennent-souvent-en-entretien-3eo7</link>
      <guid>https://dev.to/joaofelipefaria/design-patterns-dintegration-ce-quils-sont-et-lesquels-reviennent-souvent-en-entretien-3eo7</guid>
      <description>&lt;h2&gt;
  
  
  Ce qu'ils sont et ce qu'ils ne sont pas
&lt;/h2&gt;

&lt;p&gt;Un design pattern d'intégration est une solution réutilisable à un problème de &lt;strong&gt;communication entre systèmes distincts&lt;/strong&gt; : des applications différentes, avec leurs propres réseaux, pannes, formats et temps de réponse. Ne le confondez pas avec deux autres familles :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Patterns GoF&lt;/strong&gt; (Gamma, Helm, Johnson, Vlissides, 1994, 23 patterns) : ils organisent &lt;strong&gt;les classes et les objets au sein d'un même processus&lt;/strong&gt;. Exemples : &lt;em&gt;Strategy&lt;/em&gt;, &lt;em&gt;Factory&lt;/em&gt;, &lt;em&gt;Decorator&lt;/em&gt;. &lt;em&gt;Observer&lt;/em&gt; ressemble à &lt;em&gt;Publish-Subscribe&lt;/em&gt;, mais il fonctionne en mémoire, dans une seule application, sans réseau, sans persistance et sans panne partielle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patterns web&lt;/strong&gt; (comme les patterns de présentation de &lt;em&gt;Patterns of Enterprise Application Architecture&lt;/em&gt;, Fowler, 2002) : ils structurent &lt;strong&gt;la couche qui traite les requêtes HTTP d'une application&lt;/strong&gt;. Exemples : &lt;em&gt;MVC&lt;/em&gt;, &lt;em&gt;Front Controller&lt;/em&gt;, &lt;em&gt;Page Controller&lt;/em&gt;, &lt;em&gt;Template View&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patterns d'intégration&lt;/strong&gt; : ils traitent de ce qui se passe &lt;strong&gt;entre&lt;/strong&gt; les applications. Comment livrer un message sans le perdre, comment le router, comment éviter que la panne d'un service entraîne les autres, comment garder la cohérence sans transaction distribuée.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;En résumé, par échelle : &lt;strong&gt;le GoF vit dans le code, le web vit dans la requête, l'intégration vit entre les systèmes.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Références principales
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hohpe, G. ; Woolf, B.&lt;/strong&gt; &lt;em&gt;Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions&lt;/em&gt;. Addison-Wesley, 2003. Un catalogue de &lt;strong&gt;65 patterns&lt;/strong&gt;, centré sur la messagerie et indépendant de la technologie.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Richardson, C.&lt;/strong&gt; &lt;em&gt;Microservices Patterns&lt;/em&gt;. Manning, 2018. Patterns d'architecture de microservices, dont les données distribuées et la résilience. La liste ci-dessous provient du pattern language de &lt;a href="https://microservices.io/patterns/" rel="noopener noreferrer"&gt;microservices.io&lt;/a&gt; (&lt;strong&gt;53 patterns&lt;/strong&gt;), qui continue d'évoluer et peut contenir des éléments postérieurs au livre de 2018.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Quatre patterns qui reviennent souvent en entretien
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Publish-Subscribe Channel
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Hohpe et Woolf, Enterprise Integration Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Le producteur publie un événement et tous les abonnés en reçoivent une copie, sans qu'il sache qui ils sont. Le service de commandes publie &lt;code&gt;CommandeCréée&lt;/code&gt;, et le stock, la facturation et les notifications réagissent de façon indépendante.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Questions typiques :&lt;/strong&gt; la différence avec &lt;em&gt;Point-to-Point&lt;/em&gt;, ce qui arrive à un abonné hors ligne (&lt;em&gt;Durable Subscriber&lt;/em&gt;) et comment gérer les doublons.&lt;/p&gt;

&lt;h3&gt;
  
  
  Circuit Breaker
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Un proxy compte les échecs d'un service distant. Au-delà d'un seuil, le circuit &lt;strong&gt;s'ouvre&lt;/strong&gt; et les appels échouent immédiatement, au lieu d'épuiser les threads dans des timeouts. Après un délai, il laisse passer quelques appels de test (&lt;strong&gt;semi-ouvert&lt;/strong&gt;) et se referme s'ils réussissent. Cela évite les défaillances en cascade.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Questions typiques :&lt;/strong&gt; les trois états, la différence avec &lt;em&gt;retry&lt;/em&gt; et &lt;em&gt;timeout&lt;/em&gt;, et quel &lt;em&gt;fallback&lt;/em&gt; utiliser.&lt;/p&gt;

&lt;h3&gt;
  
  
  Saga
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Elle remplace la transaction distribuée par une séquence de transactions locales, avec des &lt;strong&gt;transactions compensatoires&lt;/strong&gt; quand une étape échoue. Créer la commande → réserver le stock → encaisser ; si l'encaissement échoue, on libère le stock et on annule la commande. Elle peut être &lt;strong&gt;chorégraphiée&lt;/strong&gt; (les services réagissent aux événements) ou &lt;strong&gt;orchestrée&lt;/strong&gt; (un coordinateur pilote les étapes). Le coût est la &lt;em&gt;cohérence à terme&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Questions typiques :&lt;/strong&gt; chorégraphie vs orchestration, et pourquoi ne pas utiliser le &lt;em&gt;2PC&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transactional Outbox
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Il résout le problème du &lt;em&gt;dual write&lt;/em&gt; : enregistrer en base et publier sur le broker sans qu'un seul des deux n'aboutisse. Le message est écrit dans une table &lt;code&gt;outbox&lt;/code&gt; dans la &lt;strong&gt;même transaction locale&lt;/strong&gt; que la donnée métier, puis un relais le publie, par polling (&lt;em&gt;Polling Publisher&lt;/em&gt;) ou en lisant le journal de la base (&lt;em&gt;Transaction Log Tailing&lt;/em&gt;, comme Debezium). La livraison est &lt;em&gt;at-least-once&lt;/em&gt;, donc le consommateur doit être &lt;strong&gt;idempotent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Questions typiques :&lt;/strong&gt; pourquoi ne pas publier juste après le commit, et comment éviter les doublons.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ces quatre patterns sont une sélection fondée sur l'expérience du marché, pas un classement sourcé.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Liste : &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt; (65)
&lt;/h2&gt;

&lt;p&gt;Source : Hohpe, G. ; Woolf, B. &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt;. Addison-Wesley, 2003.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Styles d'intégration :&lt;/strong&gt; File Transfer, Shared Database, Remote Procedure Invocation, Messaging&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Systèmes de messagerie :&lt;/strong&gt; Message Channel, Message, Pipes and Filters, Message Router, Message Translator, Message Endpoint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canaux :&lt;/strong&gt; Point-to-Point Channel, Publish-Subscribe Channel, Datatype Channel, Invalid Message Channel, Dead Letter Channel, Guaranteed Delivery, Channel Adapter, Messaging Bridge, Message Bus&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Construction des messages :&lt;/strong&gt; Command Message, Document Message, Event Message, Request-Reply, Return Address, Correlation Identifier, Message Sequence, Message Expiration, Format Indicator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routage :&lt;/strong&gt; Content-Based Router, Message Filter, Dynamic Router, Recipient List, Splitter, Aggregator, Resequencer, Composed Message Processor, Scatter-Gather, Routing Slip, Process Manager, Message Broker&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transformation :&lt;/strong&gt; Envelope Wrapper, Content Enricher, Content Filter, Claim Check, Normalizer, Canonical Data Model&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Endpoints :&lt;/strong&gt; Messaging Gateway, Messaging Mapper, Transactional Client, Polling Consumer, Event-Driven Consumer, Competing Consumers, Message Dispatcher, Selective Consumer, Durable Subscriber, Idempotent Receiver, Service Activator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gestion du système :&lt;/strong&gt; Control Bus, Detour, Wire Tap, Message History, Message Store, Smart Proxy, Test Message, Channel Purger&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Liste : &lt;em&gt;Microservices Patterns&lt;/em&gt; (53)
&lt;/h2&gt;

&lt;p&gt;Source : Richardson, C. &lt;em&gt;Microservices Patterns&lt;/em&gt;. Manning, 2018, d'après le pattern language de &lt;a href="https://microservices.io/patterns/" rel="noopener noreferrer"&gt;microservices.io&lt;/a&gt; (qui peut inclure des éléments postérieurs au livre).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Style architectural :&lt;/strong&gt; Monolithic Architecture, Microservice Architecture&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontières des services :&lt;/strong&gt; Decompose by Business Capability, Decompose by Subdomain, Self-contained Service, Service per Team&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refactorisation :&lt;/strong&gt; Strangler Application, Anti-corruption Layer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration entre services :&lt;/strong&gt; Database per Service, Shared Database, Saga, Command-side Replica, API Composition, CQRS, Domain Event, Event Sourcing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Messagerie transactionnelle :&lt;/strong&gt; Transactional Outbox, Transaction Log Tailing, Polling Publisher&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests :&lt;/strong&gt; Consumer-driven Contract Test, Consumer-side Contract Test, Service Component Test&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Déploiement :&lt;/strong&gt; Multiple Service Instances per Host, Service Instance per Host, Service Instance per VM, Service Instance per Container, Serverless Deployment, Service Deployment Platform&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Préoccupations transverses :&lt;/strong&gt; Microservice Chassis, Externalized Configuration, Service Template&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Communication :&lt;/strong&gt; Remote Procedure Invocation, Messaging, Domain-specific Protocol, Idempotent Consumer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API externe :&lt;/strong&gt; API Gateway, Backend for Front-end&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Découverte de services :&lt;/strong&gt; Client-side Discovery, Server-side Discovery, Service Registry, Self Registration, 3rd Party Registration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fiabilité :&lt;/strong&gt; Circuit Breaker&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sécurité :&lt;/strong&gt; Access Token&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observabilité :&lt;/strong&gt; Log Aggregation, Application Metrics, Audit Logging, Distributed Tracing, Exception Tracking, Health Check API, Log Deployments and Changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI :&lt;/strong&gt; Server-side Page Fragment Composition, Client-side UI Composition&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>microservices</category>
      <category>designpatterns</category>
      <category>backend</category>
    </item>
    <item>
      <title>Integration Design Patterns: What They Are and Which Ones Tend to Show Up in Interviews</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Fri, 09 Oct 2026 12:43:02 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/integration-design-patterns-what-they-are-and-which-ones-tend-to-show-up-in-interviews-1b9a</link>
      <guid>https://dev.to/joaofelipefaria/integration-design-patterns-what-they-are-and-which-ones-tend-to-show-up-in-interviews-1b9a</guid>
      <description>&lt;h2&gt;
  
  
  What they are and what they are not
&lt;/h2&gt;

&lt;p&gt;An integration design pattern is a reusable solution to a problem of &lt;strong&gt;communication between separate systems&lt;/strong&gt;: different applications, each with its own network, failures, formats, and response times. Do not confuse it with two other families:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GoF patterns&lt;/strong&gt; (Gamma, Helm, Johnson, Vlissides, 1994, 23 patterns): organize &lt;strong&gt;classes and objects inside a single process&lt;/strong&gt;. Examples: &lt;em&gt;Strategy&lt;/em&gt;, &lt;em&gt;Factory&lt;/em&gt;, &lt;em&gt;Decorator&lt;/em&gt;. &lt;em&gt;Observer&lt;/em&gt; resembles &lt;em&gt;Publish-Subscribe&lt;/em&gt;, but it works in memory, inside one application, with no network, no persistence, and no partial failure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web patterns&lt;/strong&gt; (such as the presentation patterns in &lt;em&gt;Patterns of Enterprise Application Architecture&lt;/em&gt;, Fowler, 2002): structure &lt;strong&gt;the layer that handles an application's HTTP requests&lt;/strong&gt;. Examples: &lt;em&gt;MVC&lt;/em&gt;, &lt;em&gt;Front Controller&lt;/em&gt;, &lt;em&gt;Page Controller&lt;/em&gt;, &lt;em&gt;Template View&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration patterns&lt;/strong&gt;: deal with what happens &lt;strong&gt;between&lt;/strong&gt; applications. How to deliver a message without losing it, how to route it, how to keep one service's failure from taking down the others, how to keep data consistent without a distributed transaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, by scale: &lt;strong&gt;GoF lives in the code, web lives in the request, integration lives between systems.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Main references
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hohpe, G.; Woolf, B.&lt;/strong&gt; &lt;em&gt;Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions&lt;/em&gt;. Addison-Wesley, 2003. A catalog of &lt;strong&gt;65 patterns&lt;/strong&gt;, centered on messaging and technology-independent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Richardson, C.&lt;/strong&gt; &lt;em&gt;Microservices Patterns&lt;/em&gt;. Manning, 2018. Microservice architecture patterns, including distributed data and resilience. The list below comes from the pattern language at &lt;a href="https://microservices.io/patterns/" rel="noopener noreferrer"&gt;microservices.io&lt;/a&gt; (&lt;strong&gt;53 patterns&lt;/strong&gt;), which keeps evolving and may include items added after the 2018 book.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Four patterns that tend to show up in interviews
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Publish-Subscribe Channel
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Hohpe and Woolf, Enterprise Integration Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The producer publishes an event and every subscriber receives a copy, without the producer knowing who they are. The orders service publishes &lt;code&gt;OrderCreated&lt;/code&gt;, and inventory, billing, and notifications react independently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typical questions:&lt;/strong&gt; how it differs from &lt;em&gt;Point-to-Point&lt;/em&gt;, what happens to an offline subscriber (&lt;em&gt;Durable Subscriber&lt;/em&gt;), and how to handle duplicates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Circuit Breaker
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A proxy counts the failures of a remote service. Past a threshold, the circuit &lt;strong&gt;opens&lt;/strong&gt; and calls fail immediately instead of exhausting threads on timeouts. After a while, it lets a few test calls through (&lt;strong&gt;half-open&lt;/strong&gt;) and closes again if they succeed. This prevents cascading failures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typical questions:&lt;/strong&gt; the three states, how it differs from &lt;em&gt;retry&lt;/em&gt; and &lt;em&gt;timeout&lt;/em&gt;, and which &lt;em&gt;fallback&lt;/em&gt; to use.&lt;/p&gt;

&lt;h3&gt;
  
  
  Saga
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Replaces the distributed transaction with a sequence of local transactions, plus &lt;strong&gt;compensating transactions&lt;/strong&gt; when a step fails. Create order → reserve stock → charge payment; if the charge fails, the stock is released and the order is canceled. It can be &lt;strong&gt;choreographed&lt;/strong&gt; (services react to events) or &lt;strong&gt;orchestrated&lt;/strong&gt; (a coordinator drives the steps). The cost is &lt;em&gt;eventual consistency&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typical questions:&lt;/strong&gt; choreography vs. orchestration, and why not use &lt;em&gt;2PC&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transactional Outbox
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Solves the &lt;em&gt;dual write&lt;/em&gt; problem: saving to the database and publishing to the broker without only one of the two happening. The message is written to an &lt;code&gt;outbox&lt;/code&gt; table in the &lt;strong&gt;same local transaction&lt;/strong&gt; as the business data, and a relay publishes it later, by polling (&lt;em&gt;Polling Publisher&lt;/em&gt;) or by reading the database log (&lt;em&gt;Transaction Log Tailing&lt;/em&gt;, as Debezium does). Delivery is &lt;em&gt;at-least-once&lt;/em&gt;, so the consumer must be &lt;strong&gt;idempotent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typical questions:&lt;/strong&gt; why not publish right after the commit, and how to avoid duplicates.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;These four are a selection based on market experience, not a sourced ranking.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  List: &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt; (65)
&lt;/h2&gt;

&lt;p&gt;Source: Hohpe, G.; Woolf, B. &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt;. Addison-Wesley, 2003.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Integration styles:&lt;/strong&gt; File Transfer, Shared Database, Remote Procedure Invocation, Messaging&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Messaging systems:&lt;/strong&gt; Message Channel, Message, Pipes and Filters, Message Router, Message Translator, Message Endpoint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Channels:&lt;/strong&gt; Point-to-Point Channel, Publish-Subscribe Channel, Datatype Channel, Invalid Message Channel, Dead Letter Channel, Guaranteed Delivery, Channel Adapter, Messaging Bridge, Message Bus&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Message construction:&lt;/strong&gt; Command Message, Document Message, Event Message, Request-Reply, Return Address, Correlation Identifier, Message Sequence, Message Expiration, Format Indicator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routing:&lt;/strong&gt; Content-Based Router, Message Filter, Dynamic Router, Recipient List, Splitter, Aggregator, Resequencer, Composed Message Processor, Scatter-Gather, Routing Slip, Process Manager, Message Broker&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transformation:&lt;/strong&gt; Envelope Wrapper, Content Enricher, Content Filter, Claim Check, Normalizer, Canonical Data Model&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Endpoints:&lt;/strong&gt; Messaging Gateway, Messaging Mapper, Transactional Client, Polling Consumer, Event-Driven Consumer, Competing Consumers, Message Dispatcher, Selective Consumer, Durable Subscriber, Idempotent Receiver, Service Activator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System management:&lt;/strong&gt; Control Bus, Detour, Wire Tap, Message History, Message Store, Smart Proxy, Test Message, Channel Purger&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  List: &lt;em&gt;Microservices Patterns&lt;/em&gt; (53)
&lt;/h2&gt;

&lt;p&gt;Source: Richardson, C. &lt;em&gt;Microservices Patterns&lt;/em&gt;. Manning, 2018, as listed in the pattern language at &lt;a href="https://microservices.io/patterns/" rel="noopener noreferrer"&gt;microservices.io&lt;/a&gt; (which may include items added after the book).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Architectural style:&lt;/strong&gt; Monolithic Architecture, Microservice Architecture&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service boundaries:&lt;/strong&gt; Decompose by Business Capability, Decompose by Subdomain, Self-contained Service, Service per Team&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refactoring:&lt;/strong&gt; Strangler Application, Anti-corruption Layer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service collaboration:&lt;/strong&gt; Database per Service, Shared Database, Saga, Command-side Replica, API Composition, CQRS, Domain Event, Event Sourcing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transactional messaging:&lt;/strong&gt; Transactional Outbox, Transaction Log Tailing, Polling Publisher&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing:&lt;/strong&gt; Consumer-driven Contract Test, Consumer-side Contract Test, Service Component Test&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Multiple Service Instances per Host, Service Instance per Host, Service Instance per VM, Service Instance per Container, Serverless Deployment, Service Deployment Platform&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-cutting concerns:&lt;/strong&gt; Microservice Chassis, Externalized Configuration, Service Template&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Communication:&lt;/strong&gt; Remote Procedure Invocation, Messaging, Domain-specific Protocol, Idempotent Consumer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External API:&lt;/strong&gt; API Gateway, Backend for Front-end&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service discovery:&lt;/strong&gt; Client-side Discovery, Server-side Discovery, Service Registry, Self Registration, 3rd Party Registration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliability:&lt;/strong&gt; Circuit Breaker&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; Access Token&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observability:&lt;/strong&gt; Log Aggregation, Application Metrics, Audit Logging, Distributed Tracing, Exception Tracking, Health Check API, Log Deployments and Changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI:&lt;/strong&gt; Server-side Page Fragment Composition, Client-side UI Composition&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>microservices</category>
      <category>designpatterns</category>
      <category>backend</category>
    </item>
    <item>
      <title>Design patterns de integração: o que são e quais costumam aparecer em entrevistas</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Fri, 09 Oct 2026 12:42:21 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/design-patterns-de-integracao-o-que-sao-e-quais-costumam-aparecer-em-entrevistas-j6j</link>
      <guid>https://dev.to/joaofelipefaria/design-patterns-de-integracao-o-que-sao-e-quais-costumam-aparecer-em-entrevistas-j6j</guid>
      <description>&lt;h2&gt;
  
  
  O que são e o que não são
&lt;/h2&gt;

&lt;p&gt;Design pattern de integração é uma solução reutilizável para um problema de &lt;strong&gt;comunicação entre sistemas separados&lt;/strong&gt;: aplicações diferentes, com redes, falhas, formatos e tempos de resposta próprios. Não confunda com duas outras famílias:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Patterns GoF&lt;/strong&gt; (Gamma, Helm, Johnson, Vlissides, 1994, 23 patterns): organizam &lt;strong&gt;classes e objetos dentro de um mesmo processo&lt;/strong&gt;. Exemplos: &lt;em&gt;Strategy&lt;/em&gt;, &lt;em&gt;Factory&lt;/em&gt;, &lt;em&gt;Decorator&lt;/em&gt;. O &lt;em&gt;Observer&lt;/em&gt; lembra o &lt;em&gt;Publish-Subscribe&lt;/em&gt;, mas opera em memória, numa mesma aplicação, sem rede, sem persistência e sem falha parcial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patterns web&lt;/strong&gt; (como os de apresentação em &lt;em&gt;Patterns of Enterprise Application Architecture&lt;/em&gt;, Fowler, 2002): estruturam &lt;strong&gt;a camada que atende requisições HTTP de uma aplicação&lt;/strong&gt;. Exemplos: &lt;em&gt;MVC&lt;/em&gt;, &lt;em&gt;Front Controller&lt;/em&gt;, &lt;em&gt;Page Controller&lt;/em&gt;, &lt;em&gt;Template View&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patterns de integração&lt;/strong&gt;: tratam do que acontece &lt;strong&gt;entre&lt;/strong&gt; aplicações. Como entregar uma mensagem sem perdê-la, como rotear, como evitar que a falha de um serviço derrube os outros, como manter consistência sem transação distribuída.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Resumindo pela escala: &lt;strong&gt;GoF vive no código, web vive na requisição, integração vive entre sistemas.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Referências principais
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hohpe, G.; Woolf, B.&lt;/strong&gt; &lt;em&gt;Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions&lt;/em&gt;. Addison-Wesley, 2003. Catálogo de &lt;strong&gt;65 patterns&lt;/strong&gt;, centrado em mensageria e independente de tecnologia.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Richardson, C.&lt;/strong&gt; &lt;em&gt;Microservices Patterns&lt;/em&gt;. Manning, 2018. Patterns de arquitetura de microsserviços, incluindo dados distribuídos e resiliência. A lista abaixo vem da pattern language do &lt;a href="https://microservices.io/patterns/" rel="noopener noreferrer"&gt;microservices.io&lt;/a&gt; (&lt;strong&gt;53 patterns&lt;/strong&gt;), que continua evoluindo e pode ter itens posteriores ao livro de 2018.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Quatro patterns que costumam aparecer em entrevistas
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Publish-Subscribe Channel
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Hohpe e Woolf, Enterprise Integration Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;O produtor publica um evento e todos os assinantes recebem uma cópia, sem que ele saiba quem são. O serviço de pedidos publica &lt;code&gt;PedidoCriado&lt;/code&gt;, e estoque, faturamento e notificações reagem de forma independente.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Perguntas típicas:&lt;/strong&gt; diferença para &lt;em&gt;Point-to-Point&lt;/em&gt;, o que acontece com assinante offline (&lt;em&gt;Durable Subscriber&lt;/em&gt;) e como lidar com duplicatas.&lt;/p&gt;

&lt;h3&gt;
  
  
  Circuit Breaker
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Um proxy conta as falhas de um serviço remoto. Passando de um limite, o circuito &lt;strong&gt;abre&lt;/strong&gt; e as chamadas falham na hora, em vez de esgotar threads em timeouts. Após um tempo, ele deixa passar chamadas de teste (&lt;strong&gt;meio aberto&lt;/strong&gt;) e fecha se elas funcionarem. Isso evita falha em cascata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Perguntas típicas:&lt;/strong&gt; os três estados, a diferença para &lt;em&gt;retry&lt;/em&gt; e &lt;em&gt;timeout&lt;/em&gt;, e qual &lt;em&gt;fallback&lt;/em&gt; usar.&lt;/p&gt;

&lt;h3&gt;
  
  
  Saga
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Troca a transação distribuída por uma sequência de transações locais, com &lt;strong&gt;transações compensatórias&lt;/strong&gt; quando um passo falha. Criar pedido → reservar estoque → cobrar; se a cobrança falha, libera-se o estoque e cancela-se o pedido. Pode ser &lt;strong&gt;coreografada&lt;/strong&gt; (serviços reagem a eventos) ou &lt;strong&gt;orquestrada&lt;/strong&gt; (um coordenador comanda). O custo é a &lt;em&gt;consistência eventual&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Perguntas típicas:&lt;/strong&gt; coreografia vs. orquestração, e por que não usar &lt;em&gt;2PC&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transactional Outbox
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Richardson, Microservices Patterns)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Resolve o &lt;em&gt;dual write&lt;/em&gt;: salvar no banco e publicar no broker sem que só um dos dois aconteça. A mensagem é gravada numa tabela &lt;code&gt;outbox&lt;/code&gt; na &lt;strong&gt;mesma transação local&lt;/strong&gt; do dado de negócio, e um relay a publica depois, por polling (&lt;em&gt;Polling Publisher&lt;/em&gt;) ou lendo o log do banco (&lt;em&gt;Transaction Log Tailing&lt;/em&gt;, como o Debezium). A entrega é &lt;em&gt;at-least-once&lt;/em&gt;, então o consumidor precisa ser &lt;strong&gt;idempotente&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Perguntas típicas:&lt;/strong&gt; por que não publicar direto após o commit, e como evitar duplicatas.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Esses quatro são uma seleção baseada em experiência de mercado, não um ranking com fonte.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Lista: &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt; (65)
&lt;/h2&gt;

&lt;p&gt;Fonte: Hohpe, G.; Woolf, B. &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt;. Addison-Wesley, 2003.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Estilos de integração:&lt;/strong&gt; File Transfer, Shared Database, Remote Procedure Invocation, Messaging&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sistemas de mensageria:&lt;/strong&gt; Message Channel, Message, Pipes and Filters, Message Router, Message Translator, Message Endpoint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canais:&lt;/strong&gt; Point-to-Point Channel, Publish-Subscribe Channel, Datatype Channel, Invalid Message Channel, Dead Letter Channel, Guaranteed Delivery, Channel Adapter, Messaging Bridge, Message Bus&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Construção de mensagens:&lt;/strong&gt; Command Message, Document Message, Event Message, Request-Reply, Return Address, Correlation Identifier, Message Sequence, Message Expiration, Format Indicator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roteamento:&lt;/strong&gt; Content-Based Router, Message Filter, Dynamic Router, Recipient List, Splitter, Aggregator, Resequencer, Composed Message Processor, Scatter-Gather, Routing Slip, Process Manager, Message Broker&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transformação:&lt;/strong&gt; Envelope Wrapper, Content Enricher, Content Filter, Claim Check, Normalizer, Canonical Data Model&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Endpoints:&lt;/strong&gt; Messaging Gateway, Messaging Mapper, Transactional Client, Polling Consumer, Event-Driven Consumer, Competing Consumers, Message Dispatcher, Selective Consumer, Durable Subscriber, Idempotent Receiver, Service Activator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gerenciamento:&lt;/strong&gt; Control Bus, Detour, Wire Tap, Message History, Message Store, Smart Proxy, Test Message, Channel Purger&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lista: &lt;em&gt;Microservices Patterns&lt;/em&gt; (53)
&lt;/h2&gt;

&lt;p&gt;Fonte: Richardson, C. &lt;em&gt;Microservices Patterns&lt;/em&gt;. Manning, 2018, conforme a pattern language em &lt;a href="https://microservices.io/patterns/" rel="noopener noreferrer"&gt;microservices.io&lt;/a&gt; (que pode incluir itens posteriores ao livro).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Estilo arquitetural:&lt;/strong&gt; Monolithic Architecture, Microservice Architecture&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fronteiras de serviço:&lt;/strong&gt; Decompose by Business Capability, Decompose by Subdomain, Self-contained Service, Service per Team&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refatoração:&lt;/strong&gt; Strangler Application, Anti-corruption Layer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colaboração entre serviços:&lt;/strong&gt; Database per Service, Shared Database, Saga, Command-side Replica, API Composition, CQRS, Domain Event, Event Sourcing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mensageria transacional:&lt;/strong&gt; Transactional Outbox, Transaction Log Tailing, Polling Publisher&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testes:&lt;/strong&gt; Consumer-driven Contract Test, Consumer-side Contract Test, Service Component Test&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Multiple Service Instances per Host, Service Instance per Host, Service Instance per VM, Service Instance per Container, Serverless Deployment, Service Deployment Platform&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-cutting:&lt;/strong&gt; Microservice Chassis, Externalized Configuration, Service Template&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comunicação:&lt;/strong&gt; Remote Procedure Invocation, Messaging, Domain-specific Protocol, Idempotent Consumer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API externa:&lt;/strong&gt; API Gateway, Backend for Front-end&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service discovery:&lt;/strong&gt; Client-side Discovery, Server-side Discovery, Service Registry, Self Registration, 3rd Party Registration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confiabilidade:&lt;/strong&gt; Circuit Breaker&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Segurança:&lt;/strong&gt; Access Token&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observabilidade:&lt;/strong&gt; Log Aggregation, Application Metrics, Audit Logging, Distributed Tracing, Exception Tracking, Health Check API, Log Deployments and Changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI:&lt;/strong&gt; Server-side Page Fragment Composition, Client-side UI Composition&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>microservices</category>
      <category>designpatterns</category>
      <category>backend</category>
    </item>
    <item>
      <title>[FR] Design patterns : d'où viennent-ils ?</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Mon, 28 Sep 2026 12:06:29 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/fr-design-patterns-dou-viennent-ils--pec</link>
      <guid>https://dev.to/joaofelipefaria/fr-design-patterns-dou-viennent-ils--pec</guid>
      <description>&lt;h2&gt;
  
  
  Une discussion sur les patrons de conception
&lt;/h2&gt;

&lt;p&gt;L'un des sujets qui suscitent le plus de curiosité (et de confusion) chez les personnes qui entrent dans le monde du développement, ce sont les &lt;strong&gt;design patterns&lt;/strong&gt;. Dans cette petite discussion, je vais essayer de clarifier quelques points sur les patrons de conception.&lt;/p&gt;

&lt;h2&gt;
  
  
  Qu'est-ce qu'un design pattern ?
&lt;/h2&gt;

&lt;p&gt;Les design patterns sont des solutions techniques utilisées pour résoudre des problèmes récurrents du développement logiciel. Parmi les plus connus et les plus cités dans les conversations sur le logiciel, on trouve : &lt;strong&gt;Factory&lt;/strong&gt;, &lt;strong&gt;DAO&lt;/strong&gt;, &lt;strong&gt;DTO&lt;/strong&gt;, &lt;strong&gt;Message Outbox&lt;/strong&gt; et &lt;strong&gt;Pub/Sub&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Là où commence la confusion
&lt;/h2&gt;

&lt;p&gt;C'est ici que la confusion commence. Beaucoup de jeunes développeurs, ne connaissant pas l'origine de ces patterns, ne réalisent pas qu'ils viennent de mondes totalement différents. Avant de nous mettre à les définir, comprenons donc les principaux groupes et d'où ils sont issus.&lt;/p&gt;

&lt;h2&gt;
  
  
  Les patterns GoF : la programmation orientée objet
&lt;/h2&gt;

&lt;p&gt;Les &lt;strong&gt;patterns GoF&lt;/strong&gt; sont des patrons pour la programmation orientée objet. Le nom vient du « Gang of Four » (Erich Gamma, Richard Helm, Ralph Johnson et John Vlissides), auteurs du livre &lt;em&gt;Design Patterns: Elements of Reusable Object-Oriented Software&lt;/em&gt;, publié en 1994. Parmi les principaux : &lt;strong&gt;Singleton&lt;/strong&gt;, &lt;strong&gt;Factory Method&lt;/strong&gt; et &lt;strong&gt;Observer&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Les JEE BluePrint Patterns : les applications web
&lt;/h2&gt;

&lt;p&gt;Les &lt;strong&gt;JEE BluePrint Patterns&lt;/strong&gt; sont des patrons pour le développement d'applications web d'entreprise. Ils sont nés dans l'écosystème Java EE (anciennement J2EE), à partir du programme Java BluePrints de Sun Microsystems, et ont été catalogués dans le livre &lt;em&gt;Core J2EE Patterns&lt;/em&gt;, paru en 2001. Parmi les principaux : &lt;strong&gt;DAO&lt;/strong&gt;, &lt;strong&gt;DTO&lt;/strong&gt; et &lt;strong&gt;Front Controller&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Les patterns de messagerie : l'intégration entre systèmes
&lt;/h2&gt;

&lt;p&gt;Les &lt;strong&gt;patterns de messagerie&lt;/strong&gt; traitent de la communication asynchrone et de l'intégration entre systèmes au moyen de messages. Leur référence principale est le livre &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt;, de Gregor Hohpe et Bobby Woolf, publié en 2003, et le sujet a pris encore plus d'ampleur avec l'arrivée des microservices. Parmi les principaux : &lt;strong&gt;Publish/Subscribe&lt;/strong&gt;, &lt;strong&gt;Dead Letter Channel&lt;/strong&gt; et &lt;strong&gt;Transactional Outbox&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Et il en existe d'autres
&lt;/h2&gt;

&lt;p&gt;Il existe d'autres familles, comme les patterns d'UI/UX, qui portent sur la façon de concevoir les interfaces et les interactions. Deux exemples : le &lt;strong&gt;Breadcrumb&lt;/strong&gt; (fil d'Ariane) et l'&lt;strong&gt;Infinite Scroll&lt;/strong&gt;. Il existe aussi des patterns pour l'IA, des patterns d'architecture, parmi bien d'autres.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prochaines étapes
&lt;/h2&gt;

&lt;p&gt;Dans les prochains articles, nous approfondirons ces familles de patterns, une par une. Nous définirons les patterns, comprendrons le problème qu'ils résolvent et verrons comment les implémenter dans vos projets.&lt;/p&gt;

</description>
      <category>designpatterns</category>
      <category>beginners</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
    <item>
      <title>[EN] Design patterns: where do they come from?</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Mon, 28 Sep 2026 12:05:50 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/en-design-patterns-where-do-they-come-from-1dpn</link>
      <guid>https://dev.to/joaofelipefaria/en-design-patterns-where-do-they-come-from-1dpn</guid>
      <description>&lt;h2&gt;
  
  
  A chat about design patterns
&lt;/h2&gt;

&lt;p&gt;One of the topics I see sparking the most curiosity (and confusion) among people entering the world of software development is &lt;strong&gt;design patterns&lt;/strong&gt;. In this short chat, I'll try to clear up a few things about them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are design patterns?
&lt;/h2&gt;

&lt;p&gt;Design patterns are technical solutions used to solve recurring problems in software development. Some of the best known and most frequently mentioned in conversations about software are: &lt;strong&gt;Factory&lt;/strong&gt;, &lt;strong&gt;DAO&lt;/strong&gt;, &lt;strong&gt;DTO&lt;/strong&gt;, &lt;strong&gt;Message Outbox&lt;/strong&gt; and &lt;strong&gt;Pub/Sub&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the confusion starts
&lt;/h2&gt;

&lt;p&gt;And this is where the confusion begins. Many younger developers, not knowing where these patterns come from, don't realize they originate from completely different worlds. So before we start defining patterns, let's understand the main groups and where they came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  GoF Patterns: object-oriented programming
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GoF Patterns&lt;/strong&gt; are patterns for object-oriented programming. The name comes from the "Gang of Four" (Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides), the authors of the book &lt;em&gt;Design Patterns: Elements of Reusable Object-Oriented Software&lt;/em&gt;, published in 1994. Among the main ones are &lt;strong&gt;Singleton&lt;/strong&gt;, &lt;strong&gt;Factory Method&lt;/strong&gt; and &lt;strong&gt;Observer&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  JEE BluePrint Patterns: web applications
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;JEE BluePrint Patterns&lt;/strong&gt; are patterns for developing enterprise web applications. They came out of the Java EE (formerly J2EE) ecosystem, from Sun Microsystems' Java BluePrints program, and were cataloged in the 2001 book &lt;em&gt;Core J2EE Patterns&lt;/em&gt;. Among the main ones are &lt;strong&gt;DAO&lt;/strong&gt;, &lt;strong&gt;DTO&lt;/strong&gt; and &lt;strong&gt;Front Controller&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Messaging patterns: integrating systems
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Messaging patterns&lt;/strong&gt; deal with asynchronous communication and integration between systems through messages. Their main reference is the book &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt; by Gregor Hohpe and Bobby Woolf, published in 2003, and the topic gained even more traction with the rise of microservices. Among the main ones are &lt;strong&gt;Publish/Subscribe&lt;/strong&gt;, &lt;strong&gt;Dead Letter Channel&lt;/strong&gt; and &lt;strong&gt;Transactional Outbox&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  And there are others
&lt;/h2&gt;

&lt;p&gt;There are other families, such as UI/UX patterns, which deal with how we design interfaces and interactions. Two examples are the &lt;strong&gt;Breadcrumb&lt;/strong&gt; and &lt;strong&gt;Infinite Scroll&lt;/strong&gt;. There are also patterns for AI, architecture patterns, and many others.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;In the next articles, we'll dive deeper into these pattern families, one by one. We'll define the patterns, understand the problem each one solves, and see how to implement them in your projects.&lt;/p&gt;

</description>
      <category>designpatterns</category>
      <category>beginners</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
    <item>
      <title>[PT] Design patterns: de onde eles vêm?</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Mon, 28 Sep 2026 12:03:42 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/pt-design-patterns-de-onde-eles-vem-1l25</link>
      <guid>https://dev.to/joaofelipefaria/pt-design-patterns-de-onde-eles-vem-1l25</guid>
      <description>&lt;h2&gt;
  
  
  Um bate-papo sobre padrões de projeto
&lt;/h2&gt;

&lt;p&gt;Um dos assuntos que mais vejo despertar a curiosidade (e a confusão) de quem está entrando no mundo do desenvolvimento são os &lt;strong&gt;design patterns&lt;/strong&gt;. Neste pequeno bate-papo, vou tentar esclarecer algumas coisas sobre os padrões de projeto.&lt;/p&gt;

&lt;h2&gt;
  
  
  O que são design patterns?
&lt;/h2&gt;

&lt;p&gt;Design patterns são soluções de tecnologia usadas para resolver problemas recorrentes do desenvolvimento de software. Alguns dos mais conhecidos e mencionados em conversas sobre software são: &lt;strong&gt;Factory&lt;/strong&gt;, &lt;strong&gt;DAO&lt;/strong&gt;, &lt;strong&gt;DTO&lt;/strong&gt;, &lt;strong&gt;Message Outbox&lt;/strong&gt; e &lt;strong&gt;Pub/Sub&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Onde começa a confusão
&lt;/h2&gt;

&lt;p&gt;E aqui começa a confusão. Muitos programadores mais jovens, por não conhecerem a origem desses patterns, não percebem que eles vêm de mundos totalmente diferentes. Por isso, antes de sairmos definindo patterns, vamos entender os principais grupos e de onde eles surgiram.&lt;/p&gt;

&lt;h2&gt;
  
  
  GoF Patterns: orientação a objetos
&lt;/h2&gt;

&lt;p&gt;Os &lt;strong&gt;GoF Patterns&lt;/strong&gt; são padrões para a programação orientada a objetos. O nome vem da "Gang of Four" (Erich Gamma, Richard Helm, Ralph Johnson e John Vlissides), autores do livro &lt;em&gt;Design Patterns: Elements of Reusable Object-Oriented Software&lt;/em&gt;, publicado em 1994. Entre os principais estão &lt;strong&gt;Singleton&lt;/strong&gt;, &lt;strong&gt;Factory Method&lt;/strong&gt; e &lt;strong&gt;Observer&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  JEE BluePrint Patterns: aplicações web
&lt;/h2&gt;

&lt;p&gt;Os &lt;strong&gt;JEE BluePrint Patterns&lt;/strong&gt; são padrões para o desenvolvimento de aplicações web corporativas. Surgiram no ecossistema Java EE (antigo J2EE), a partir do programa Java BluePrints da Sun Microsystems, e foram catalogados no livro &lt;em&gt;Core J2EE Patterns&lt;/em&gt;, de 2001. Entre os principais estão &lt;strong&gt;DAO&lt;/strong&gt;, &lt;strong&gt;DTO&lt;/strong&gt; e &lt;strong&gt;Front Controller&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Patterns de mensageria: integração entre sistemas
&lt;/h2&gt;

&lt;p&gt;Os &lt;strong&gt;patterns de mensageria&lt;/strong&gt; tratam da comunicação assíncrona e da integração entre sistemas por meio de mensagens. Sua principal referência é o livro &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt;, de Gregor Hohpe e Bobby Woolf, publicado em 2003, e o tema ganhou ainda mais força com a chegada dos microsserviços. Entre os principais estão &lt;strong&gt;Publish/Subscribe&lt;/strong&gt;, &lt;strong&gt;Dead Letter Channel&lt;/strong&gt; e &lt;strong&gt;Transactional Outbox&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  E ainda existem outros
&lt;/h2&gt;

&lt;p&gt;Há outras famílias, como os patterns de UI/UX, que tratam de como projetamos interfaces e interações. Dois exemplos são o &lt;strong&gt;Breadcrumb&lt;/strong&gt; e o &lt;strong&gt;Infinite Scroll&lt;/strong&gt;. Existem ainda patterns para IA, patterns de arquitetura, dentre diversos outros.&lt;/p&gt;

&lt;h2&gt;
  
  
  Próximos passos
&lt;/h2&gt;

&lt;p&gt;Nos próximos artigos, vamos nos aprofundar nessas famílias de patterns, uma a uma. Vamos definir os patterns, entender o problema que eles resolvem e ver como implementá-los em seus projetos.&lt;/p&gt;

</description>
      <category>designpatterns</category>
      <category>programming</category>
      <category>beginners</category>
      <category>architecture</category>
    </item>
    <item>
      <title>[FR] Java en pratique : classes, objets et packages</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Mon, 28 Sep 2026 12:02:11 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/fr-java-en-pratique-classes-objets-et-packages-5bkk</link>
      <guid>https://dev.to/joaofelipefaria/fr-java-en-pratique-classes-objets-et-packages-5bkk</guid>
      <description>&lt;h2&gt;
  
  
  Java est orienté objet
&lt;/h2&gt;

&lt;p&gt;Java est un langage orienté objet. Concrètement, cela signifie que l'on construit un programme Java en écrivant des &lt;strong&gt;classes&lt;/strong&gt; et en manipulant des &lt;strong&gt;objets&lt;/strong&gt;. La classe est le moule ; l'objet est l'instance créée à partir de ce moule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attributs et méthodes
&lt;/h2&gt;

&lt;p&gt;À l'intérieur d'une classe, les &lt;strong&gt;méthodes&lt;/strong&gt; représentent le comportement d'un objet et les &lt;strong&gt;attributs&lt;/strong&gt; représentent son état. Pour rendre cela concret, modélisons une voiture, qui a une marque et une année de fabrication :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;com.exemple.modele&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Voiture&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;marque&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;annee&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Le package
&lt;/h2&gt;

&lt;p&gt;La première déclaration d'un fichier de classe est le &lt;code&gt;package&lt;/code&gt;. Il indique dans quel package se trouve la classe et répond à trois objectifs :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;éviter les collisions de noms (deux classes portant le même nom peuvent coexister dans des packages différents) ;&lt;/li&gt;
&lt;li&gt;regrouper les classes par responsabilité ;&lt;/li&gt;
&lt;li&gt;permettre à d'autres classes de les importer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Créer et utiliser un objet
&lt;/h2&gt;

&lt;p&gt;Dans cet exemple, en plus de &lt;code&gt;Voiture&lt;/code&gt;, nous allons créer une seconde classe nommée &lt;code&gt;Application&lt;/code&gt;. Elle importe &lt;code&gt;Voiture&lt;/code&gt; et, dans la méthode &lt;code&gt;main&lt;/code&gt;, crée une voiture, renseigne la marque ("fiat uno") et l'année (2002), puis affiche ces valeurs :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;com.exemple&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;com.exemple.modele.Voiture&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Application&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Voiture&lt;/span&gt; &lt;span class="n"&gt;voiture&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Voiture&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;voiture&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;marque&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"fiat uno"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;voiture&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;annee&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2002&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Marque : "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;voiture&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;marque&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Année : "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;voiture&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;annee&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;En exécutant &lt;code&gt;Application&lt;/code&gt;, la console affiche la marque et l'année de la voiture créée. Remarquez que &lt;code&gt;Application&lt;/code&gt; se trouve dans un package différent de celui de &lt;code&gt;Voiture&lt;/code&gt; ; elle a donc besoin de l'&lt;code&gt;import&lt;/code&gt; pour la voir.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ce que nous avons appris
&lt;/h2&gt;

&lt;p&gt;Avec ce petit exemple, nous avons déjà vu quelques comportements de base du langage : la déclaration de package, la définition d'une classe avec ses attributs, l'importation de classes et l'instanciation d'un objet avec &lt;code&gt;new&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  À propos des types
&lt;/h3&gt;

&lt;p&gt;En utilisant les mots-clés &lt;code&gt;String&lt;/code&gt; et &lt;code&gt;int&lt;/code&gt;, nous définissons le type de chaque attribut : un texte pour la marque et un nombre entier pour l'année. Java est un langage à typage statique, et cela s'applique aux attributs, aux variables et aux paramètres.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prochaines étapes
&lt;/h2&gt;

&lt;p&gt;Dans les prochains articles, nous approfondirons le typage en Java et explorerons les syntaxes possibles de la méthode &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>beginners</category>
      <category>oop</category>
    </item>
    <item>
      <title>[EN] Java in practice: classes, objects and packages</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Mon, 28 Sep 2026 12:01:31 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/en-java-in-practice-classes-objects-and-packages-8hb</link>
      <guid>https://dev.to/joaofelipefaria/en-java-in-practice-classes-objects-and-packages-8hb</guid>
      <description>&lt;h2&gt;
  
  
  Java is object-oriented
&lt;/h2&gt;

&lt;p&gt;Java is an object-oriented language. In practice, this means we build a Java program by writing &lt;strong&gt;classes&lt;/strong&gt; and manipulating &lt;strong&gt;objects&lt;/strong&gt;. The class is the blueprint; the object is the instance created from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attributes and methods
&lt;/h2&gt;

&lt;p&gt;Inside a class, &lt;strong&gt;methods&lt;/strong&gt; represent an object's behavior and &lt;strong&gt;attributes&lt;/strong&gt; represent its state. To make this concrete, let's model a car, which has a brand and a year of manufacture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;com.example.model&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;brand&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The package
&lt;/h2&gt;

&lt;p&gt;The first statement in a class file is the &lt;code&gt;package&lt;/code&gt; declaration. It tells which package the class belongs to and serves three purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;avoiding naming collisions (two classes with the same name can coexist in different packages);&lt;/li&gt;
&lt;li&gt;grouping classes by responsibility;&lt;/li&gt;
&lt;li&gt;allowing other classes to import them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating and using an object
&lt;/h2&gt;

&lt;p&gt;In this example, besides &lt;code&gt;Car&lt;/code&gt;, we'll create a second class called &lt;code&gt;Application&lt;/code&gt;. It imports &lt;code&gt;Car&lt;/code&gt; and, in the &lt;code&gt;main&lt;/code&gt; method, creates a car, sets the brand ("fiat uno") and the year (2002), and finally prints both values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;com.example&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;com.example.model.Car&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Application&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="n"&gt;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;car&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;brand&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"fiat uno"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;car&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;year&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2002&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Brand: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;car&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;brand&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Year: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;car&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;year&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run &lt;code&gt;Application&lt;/code&gt;, the console prints the brand and year of the car we created. Note that &lt;code&gt;Application&lt;/code&gt; lives in a different package from &lt;code&gt;Car&lt;/code&gt;, so it needs the &lt;code&gt;import&lt;/code&gt; statement to see it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;p&gt;With this small example we've already seen some basic language behaviors: the package declaration, defining a class with its attributes, importing classes, and instantiating an object with &lt;code&gt;new&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  About types
&lt;/h3&gt;

&lt;p&gt;By using the keywords &lt;code&gt;String&lt;/code&gt; and &lt;code&gt;int&lt;/code&gt;, we define the type of each attribute: text for the brand and a whole number for the year. Java is a statically typed language, and this applies to attributes, variables and parameters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;In the next articles, we'll dive deeper into typing in Java and explore the possible syntaxes for the &lt;code&gt;main&lt;/code&gt; method.&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>programming</category>
      <category>oop</category>
    </item>
    <item>
      <title>[PT] Java na prática: classes, objetos e pacotes</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Mon, 28 Sep 2026 12:00:08 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/java-na-pratica-classes-objetos-e-pacotes-4hmn</link>
      <guid>https://dev.to/joaofelipefaria/java-na-pratica-classes-objetos-e-pacotes-4hmn</guid>
      <description>&lt;h2&gt;
  
  
  Java é orientado a objetos
&lt;/h2&gt;

&lt;p&gt;Java é uma linguagem orientada a objetos. Na prática, isso significa que construímos um programa Java codificando &lt;strong&gt;classes&lt;/strong&gt; e manipulando &lt;strong&gt;objetos&lt;/strong&gt;. A classe é o molde; o objeto é a instância criada a partir dele.&lt;/p&gt;

&lt;h2&gt;
  
  
  Atributos e métodos
&lt;/h2&gt;

&lt;p&gt;Dentro de uma classe, os &lt;strong&gt;métodos&lt;/strong&gt; representam o comportamento de um objeto, e os &lt;strong&gt;atributos&lt;/strong&gt; representam o seu estado. Para deixar isso concreto, vamos modelar um carro, que tem uma marca e um ano de fabricação:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;com.exemplo.modelo&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Carro&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;marca&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;ano&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  O pacote (package)
&lt;/h2&gt;

&lt;p&gt;A primeira declaração de um arquivo de classe é o &lt;code&gt;package&lt;/code&gt;. Ele informa em qual pacote a classe está e serve a três propósitos:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;evitar colisões de nomes (duas classes com o mesmo nome podem coexistir em pacotes diferentes);&lt;/li&gt;
&lt;li&gt;agrupar classes por responsabilidade;&lt;/li&gt;
&lt;li&gt;permitir que outras classes as importem.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Criando e usando um objeto
&lt;/h2&gt;

&lt;p&gt;Neste exemplo, além de &lt;code&gt;Carro&lt;/code&gt;, vamos criar uma segunda classe chamada &lt;code&gt;Application&lt;/code&gt;. Ela importa &lt;code&gt;Carro&lt;/code&gt; e, no método &lt;code&gt;main&lt;/code&gt;, cria um carro, informa a marca ("fiat uno") e o ano (2002) e, por fim, imprime esses valores:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;com.exemplo&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;com.exemplo.modelo.Carro&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Application&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Carro&lt;/span&gt; &lt;span class="n"&gt;carro&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Carro&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;carro&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;marca&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"fiat uno"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;carro&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ano&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2002&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Marca: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;carro&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;marca&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Ano: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;carro&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ano&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ao executar &lt;code&gt;Application&lt;/code&gt;, o console exibe a marca e o ano do carro criado. Repare que &lt;code&gt;Application&lt;/code&gt; está em um pacote diferente de &lt;code&gt;Carro&lt;/code&gt;, e por isso precisa do &lt;code&gt;import&lt;/code&gt; para enxergá-la.&lt;/p&gt;

&lt;h2&gt;
  
  
  O que aprendemos
&lt;/h2&gt;

&lt;p&gt;Com esse pequeno exemplo, já vimos comportamentos básicos da linguagem: a declaração de pacote, a definição de uma classe com seus atributos, a importação de classes e a instanciação de um objeto com &lt;code&gt;new&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sobre os tipos
&lt;/h3&gt;

&lt;p&gt;Ao usar as palavras-chave &lt;code&gt;String&lt;/code&gt; e &lt;code&gt;int&lt;/code&gt;, estamos definindo o tipo de cada atributo: um texto para a marca e um número inteiro para o ano. Java é uma linguagem de tipagem estática, e isso vale para atributos, variáveis e parâmetros.&lt;/p&gt;

&lt;h2&gt;
  
  
  Próximos passos
&lt;/h2&gt;

&lt;p&gt;Nos próximos artigos, vamos aprofundar a tipagem dentro do Java e explorar as sintaxes possíveis para o método &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>programming</category>
      <category>oop</category>
    </item>
    <item>
      <title>[FR] Java et les fondamentaux de la programmation orientée objet</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Tue, 15 Sep 2026 09:31:42 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/fr-java-et-les-fondamentaux-de-la-programmation-orientee-objet-13m6</link>
      <guid>https://dev.to/joaofelipefaria/fr-java-et-les-fondamentaux-de-la-programmation-orientee-objet-13m6</guid>
      <description>&lt;p&gt;La programmation orientée objet (POO) est l'un des principaux paradigmes de programmation utilisés avec Java. Plus qu'un simple concept de programmation, elle représente une manière très naturelle pour le cerveau humain d'interagir avec son environnement. Lorsque nous entrons dans une pièce, par exemple, nous identifions naturellement les choses qui présentent des caractéristiques similaires et nous les regroupons mentalement : nous reconnaissons des chaises, des tables, des personnes, des portes, etc. Intuitivement, nous sommes en train de classer les éléments en catégories (classes) et d'identifier leurs occurrences concrètes (objets). La POO utilise précisément cette manière de penser pour représenter le monde réel dans un système informatique, en considérant que les objets possèdent un état et un comportement.&lt;/p&gt;

&lt;p&gt;L'histoire de la POO a commencé avant Java lui-même, avec des langages comme Simula et Smalltalk, qui ont contribué à établir plusieurs concepts fondamentaux de ce paradigme. Plus tard, des langages comme C++ et Java ont contribué à populariser la programmation orientée objet dans le développement logiciel.&lt;/p&gt;

&lt;p&gt;En Java, une classe fonctionne comme un modèle permettant de créer des objets. Elle définit des attributs, qui représentent l'état de l'objet, et des méthodes, qui représentent son comportement. À partir d'une classe Car, par exemple, nous pouvons créer plusieurs voitures différentes, chacune possédant son propre état.&lt;/p&gt;

&lt;p&gt;La création d'un objet se fait généralement avec l'opérateur new, comme dans Car myCar = new Car();. À ce moment-là, nous créons une instance concrète de la classe. Les constructeurs permettent d'initialiser ces objets. Ils portent le même nom que la classe et n'ont pas de type de retour.&lt;/p&gt;

&lt;p&gt;Un autre concept important est celui des interfaces, qui fonctionnent comme des contrats de comportement. Une interface peut définir des opérations qu'une classe doit implémenter, permettant ainsi à différents types d'objets de respecter le même contrat. Java possède également des membres static, qui appartiennent à la classe elle-même et non à une instance particulière.&lt;/p&gt;

&lt;p&gt;Java propose également les blocs d'initialisation, qui permettent d'exécuter du code lors de l'initialisation d'un objet ou du chargement d'une classe. Même s'ils sont moins utilisés dans le développement quotidien, ils font partie des mécanismes d'initialisation disponibles en Java.&lt;/p&gt;

&lt;p&gt;Ces concepts constituent la base nécessaire pour comprendre les principes plus avancés de la POO : encapsulation, héritage, polymorphisme, abstraction et composition. Ils permettent de construire des systèmes mieux organisés, réutilisables et plus faciles à maintenir — et c'est précisément sur ces concepts que nous pouvons poursuivre l'étude de la POO en Java.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>[EN] Java and the Fundamentals of Object-Oriented Programming</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Tue, 15 Sep 2026 09:31:18 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/en-java-and-the-fundamentals-of-object-oriented-programming-35nc</link>
      <guid>https://dev.to/joaofelipefaria/en-java-and-the-fundamentals-of-object-oriented-programming-35nc</guid>
      <description>&lt;p&gt;Object-Oriented Programming (OOP) is one of the main programming paradigms used in Java. More than just a programming concept, it represents a very natural way for the human brain to interact with the environment. When we enter a room, for example, we naturally identify things with similar characteristics and group them mentally: we recognize chairs, tables, people, doors, and so on. Intuitively, we are classifying elements into categories (classes) and identifying their concrete occurrences (objects). OOP uses exactly this way of thinking to represent the real world inside a software system, considering that objects have state and behavior.&lt;/p&gt;

&lt;p&gt;The history of OOP began before Java itself, with languages such as Simula and Smalltalk, which helped establish many of the fundamental concepts of the paradigm. Later, languages such as C++ and Java helped popularize object-oriented programming in software development.&lt;/p&gt;

&lt;p&gt;In Java, a class works as a blueprint for creating objects. It defines attributes, which represent the object's state, and methods, which represent its behavior. From a Car class, for example, we can create several different cars, each with its own state.&lt;/p&gt;

&lt;p&gt;An object is normally created using the new operator, as in Car myCar = new Car();. At this point, we are creating a concrete instance of the class. Constructors are used to initialize these objects and have the same name as the class, with no return type.&lt;/p&gt;

&lt;p&gt;Another important concept is the interface, which works as a behavioral contract. An interface can define operations that a class must implement, allowing different types of objects to follow the same contract. Java also provides static members, which belong to the class itself rather than to a specific instance.&lt;/p&gt;

&lt;p&gt;Java also has initializer blocks, which allow code to be executed during object initialization or when a class is loaded. Although they are less commonly used in everyday development, they are part of Java's available initialization mechanisms.&lt;/p&gt;

&lt;p&gt;These concepts form the foundation for understanding the more advanced principles of OOP: encapsulation, inheritance, polymorphism, abstraction, and composition. Together, they allow us to build systems that are more organized, reusable, and easier to maintain — and these are precisely the concepts we should explore next when studying OOP in Java.&lt;/p&gt;

</description>
      <category>java</category>
      <category>oop</category>
      <category>basic</category>
      <category>programming</category>
    </item>
    <item>
      <title>[PT] Java e os fundamentos da Programação Orientada a Objetos</title>
      <dc:creator>joaofelipefaria</dc:creator>
      <pubDate>Tue, 15 Sep 2026 09:30:35 +0000</pubDate>
      <link>https://dev.to/joaofelipefaria/pt-java-e-os-fundamentos-da-programacao-orientada-a-objetos-353l</link>
      <guid>https://dev.to/joaofelipefaria/pt-java-e-os-fundamentos-da-programacao-orientada-a-objetos-353l</guid>
      <description>&lt;p&gt;A Programação Orientada a Objetos (POO) é um dos principais paradigmas utilizados no desenvolvimento com Java. Mais do que um conceito de programação, ela representa uma forma bastante natural de o cérebro humano interagir com o ambiente. Quando entramos em uma sala, por exemplo, naturalmente identificamos coisas com características semelhantes e as agrupamos mentalmente: reconhecemos cadeiras, mesas, pessoas, portas etc. Intuitivamente, estamos &lt;strong&gt;classificando elementos em categorias (classes)&lt;/strong&gt; e identificando suas &lt;strong&gt;ocorrências concretas (objetos)&lt;/strong&gt;. A POO utiliza justamente essa maneira de pensar para representar o mundo dentro de um sistema, considerando que os objetos possuem &lt;strong&gt;estado e comportamento&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A história da POO começou antes do próprio Java, passando por linguagens como &lt;strong&gt;Simula e Smalltalk&lt;/strong&gt;, que ajudaram a estabelecer conceitos fundamentais desse paradigma. Posteriormente, linguagens como &lt;strong&gt;C++ e Java&lt;/strong&gt; popularizaram a orientação a objetos no desenvolvimento de software.&lt;/p&gt;

&lt;p&gt;Em Java, uma &lt;strong&gt;classe&lt;/strong&gt; funciona como um &lt;strong&gt;modelo para criar objetos&lt;/strong&gt;. Ela define seus atributos, que representam o estado, e seus métodos, que representam os comportamentos. A partir de uma classe Car, por exemplo, podemos criar vários carros diferentes, cada um com seu próprio estado.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;criação&lt;/strong&gt; de um objeto é feita normalmente através do operador &lt;strong&gt;new&lt;/strong&gt;, como em &lt;code&gt;Car myCar = new Car();&lt;/code&gt;. Nesse momento, estamos criando uma &lt;strong&gt;instância concreta da classe&lt;/strong&gt;. Os construtores são utilizados para inicializar esses objetos e possuem o mesmo nome da classe, não tendo tipo de retorno.&lt;/p&gt;

&lt;p&gt;Outro conceito importante são as &lt;strong&gt;interfaces&lt;/strong&gt;, que funcionam como &lt;strong&gt;contratos de comportamento&lt;/strong&gt;. Uma interface pode definir operações que uma classe deve implementar, permitindo que diferentes tipos de objetos sigam o mesmo contrato. Além disso, Java possui membros &lt;code&gt;static&lt;/code&gt;, que pertencem à própria classe e não a uma instância específica.&lt;/p&gt;

&lt;p&gt;Também existem os &lt;strong&gt;initializer blocks&lt;/strong&gt;, que permitem executar código durante a inicialização de objetos ou durante o carregamento da classe. Embora sejam recursos menos utilizados no dia a dia, fazem parte dos mecanismos de inicialização disponíveis em Java.&lt;/p&gt;

&lt;p&gt;Esses conceitos formam a base para compreender os pilares mais avançados da POO: &lt;strong&gt;encapsulamento, herança, polimorfismo, abstração e composição&lt;/strong&gt;. A partir deles, conseguimos construir sistemas mais organizados, reutilizáveis e fáceis de manter — e é justamente sobre esses conceitos que o estudo de POO em Java deve avançar.&lt;/p&gt;

</description>
      <category>java</category>
      <category>oop</category>
      <category>basic</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
