<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>software architecture Archives - Francesco Lelli %</title> <atom:link href="https://francescolelli.info/tag/software-architecture/feed/" rel="self" type="application/rss+xml" /><link>https://francescolelli.info/tag/software-architecture/</link> <description>Information Management, Computer Science,  Economics, Finance and more</description> <lastBuildDate>Mon, 20 Nov 2023 17:49:10 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod> hourly </sy:updatePeriod> <sy:updateFrequency> 1 </sy:updateFrequency> <generator>https://wordpress.org/?v=6.8.5</generator><image> <url>https://francescolelli.info/wp-content/uploads/2018/11/cropped-InstrumentElement-32x32.jpg</url><title>software architecture Archives - Francesco Lelli %</title><link>https://francescolelli.info/tag/software-architecture/</link> <width>32</width> <height>32</height> </image> <site
xmlns="com-wordpress:feed-additions:1">156264324</site> <item><title>Service Oriented Architecture (SOA) Design Principle: Coupling, Cohesion, and Granularity</title><link>https://francescolelli.info/software-engineering/service-oriented-architecture-soa-design-principle-coupling-cohesion-and-granularity/</link> <comments>https://francescolelli.info/software-engineering/service-oriented-architecture-soa-design-principle-coupling-cohesion-and-granularity/#respond</comments> <dc:creator><![CDATA[Francesco Lelli]]></dc:creator> <pubDate>Mon, 20 Nov 2023 17:49:02 +0000</pubDate> <category><![CDATA[Java]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software Engineering]]></category> <category><![CDATA[API]]></category> <category><![CDATA[APIs]]></category> <category><![CDATA[Cohesion]]></category> <category><![CDATA[computer science]]></category> <category><![CDATA[Coupling]]></category> <category><![CDATA[Design Patterns]]></category> <category><![CDATA[Granularity]]></category> <category><![CDATA[Service Oriented Architecture]]></category> <category><![CDATA[SOA]]></category> <category><![CDATA[software architecture]]></category> <category><![CDATA[software engineering]]></category> <category><![CDATA[Software Patterns]]></category> <guid
isPermaLink="false">https://francescolelli.info/?p=2526</guid><description><![CDATA[<p>In the realm of Service Oriented Architecture (SOA) design principles, the concepts of Service Coupling, Service Cohesion, and Service Granularity play pivotal roles in shaping a robust and effective architectural framework. Service Coupling refers to the degree of interdependence between any two business processes. In the context of SOA, weak coupling is highly preferred as [&#8230;]</p><p>The post <a
href="https://francescolelli.info/software-engineering/service-oriented-architecture-soa-design-principle-coupling-cohesion-and-granularity/">Service Oriented Architecture (SOA) Design Principle: Coupling, Cohesion, and Granularity</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></description> <content:encoded><![CDATA[<p>In the realm of Service Oriented Architecture (SOA) design principles, the concepts of Service Coupling, Service Cohesion, and Service Granularity play pivotal roles in shaping a robust and effective architectural framework. Service Coupling refers to the degree of interdependence between any two business processes. In the context of SOA, weak coupling is highly preferred as it signifies a lower level of dependency between services, allowing for greater flexibility, scalability, and maintainability. On the other hand, Service Cohesion pertains to the degree of functional relatedness and focus of operations within a service. In SOA, strong cohesion is the desired state, emphasizing that a service should encapsulate a well-defined and closely related set of functionalities. Lastly, Service Granularity addresses the scope of functionality exposed by a service, with a preference for coarse granularity. This implies that services should provide broader, more encompassing functionalities to address the specific needs at hand, promoting reusability and minimizing the number of service invocations. Adhering to these principles ensures the creation of a service-oriented architecture that is agile, modular, and aligned with the overarching goals of the enterprise.</p><p>In short Coupling, Cohesion and Granularity are part of SOA Design Principle and they can be summarized as follows:</p><ul
class="wp-block-list"><li><strong>Service Coupling:</strong><ul
class="wp-block-list"><li><em>Definition:</em> Refers to the degree of interdependence between two business processes.</li><li><em>Preferable State:</em> Weak coupling is favored in SOA, indicating lower dependency for increased flexibility and maintainability.</li></ul></li><li><strong>Service Cohesion:</strong><ul
class="wp-block-list"><li><em>Definition:</em> Represents the degree of functional relatedness and focus of operations within a service.</li><li><em>Preferable State:</em> Strong cohesion is preferred in SOA, indicating that a service should encapsulate closely related and well-defined functionalities.</li></ul></li><li><strong>Service Granularity:</strong><ul
class="wp-block-list"><li><em>Definition:</em> Denotes the scope of functionality exposed by a service.</li><li><em>Preferable State:</em> Coarse granularity is recommended in SOA, suggesting that services should provide broad functionalities to address specific needs, promoting reusability.</li></ul></li></ul><figure
class="wp-block-image size-full"><img
fetchpriority="high" decoding="async" width="867" height="1300" data-attachment-id="2528" data-permalink="https://francescolelli.info/software-engineering/service-oriented-architecture-soa-design-principle-coupling-cohesion-and-granularity/attachment/pexels-photo-8470810/" data-orig-file="https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810.jpeg" data-orig-size="867,1300" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;Photo by Thirdman on &lt;a href=\&quot;https:\/\/www.pexels.com\/photo\/blueprints-and-a-laptop-8470810\/\&quot; rel=\&quot;nofollow\&quot;&gt;Pexels.com&lt;\/a&gt;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;blueprints and a laptop&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="pexels-photo-8470810" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810-200x300.jpeg" data-large-file="https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810-683x1024.jpeg" src="https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810.jpeg?8011c3&amp;8011c3" alt="Service Oriented Architecture (SOA) Design Principle: Coupling, Cohesion, and Granularity. The blueprint of Software Architecture" class="wp-image-2528" srcset="https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810.jpeg 867w, https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810-200x300.jpeg 200w, https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810-683x1024.jpeg 683w, https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810-768x1152.jpeg 768w, https://francescolelli.info/wp-content/uploads/2023/11/pexels-photo-8470810-600x900.jpeg 600w" sizes="(max-width: 867px) 100vw, 867px" /></figure><h2 class="wp-block-heading">Service Coupling:</h2><p>Service Coupling is a critical design principle that examines the degree of interdependence between any two business processes or services within a system. It essentially evaluates how tightly or loosely these services are connected and the implications of changes in one on the others.</p><p>Characterized by the level of dependency, tight coupling signifies a strong interconnection where modifications in one service may necessitate corresponding changes in others. Conversely, weak coupling is the preferred state in SOA design. Weak coupling implies a lower level of dependency, allowing for greater flexibility, scalability, and ease of maintenance. Services with weak coupling can evolve independently, reducing the risk of unintended consequences when modifications or updates are made.</p><p>The benefits of weak coupling extend to the adaptability of the architecture to changes in business requirements. Services that are loosely coupled are more resilient to alterations, ensuring that adjustments in one part of the system do not propagate unexpectedly to other interconnected services.</p><p>For example, a service employing standardized interfaces and protocols can interact with other services more loosely, minimizing the impact of changes in one service on others. Achieving weak coupling often involves defining clear service interfaces, minimizing direct dependencies, and utilizing standards to facilitate interoperability between services. In essence, Service Coupling is a foundational principle in SOA design that promotes a modular, adaptable, and scalable architecture.</p><h2 class="wp-block-heading">Service Cohesion:</h2><p>Service Cohesion stands as a pivotal design principle governing the internal organization and functional relatedness within an individual service. It delves into the degree to which the operations encapsulated within a service are logically connected and focused on a specific set of functionalities.</p><p>Characterized by its emphasis on functional relatedness, strong cohesion is the ideal state for services in SOA. A service exhibiting strong cohesion encapsulates a well-defined and closely related set of functionalities, ensuring that its operations are united by a common purpose. This design approach enhances the service&#8217;s clarity, maintainability, and usability, as all contained functionalities contribute to a coherent and unified business capability.</p><p>In contrast, weak cohesion suggests a service with disparate functionalities that may not be logically connected, leading to a lack of clarity and potentially hindering the service&#8217;s effectiveness. Strong cohesion, on the other hand, facilitates a service&#8217;s reusability, as the encapsulated functionalities are designed to work together seamlessly, promoting a modular and extensible architecture.</p><p>For example, a service responsible for order processing should ideally encapsulate functionalities such as order validation, payment processing, and inventory management, exhibiting strong cohesion by focusing on a cohesive set of operations related to order fulfillment.</p><p>Achieving strong cohesion often involves careful analysis of the business processes and ensuring that the functionalities grouped within a service share a common context and purpose. This principle contributes to the creation of services that are not only well-defined and purposeful but also conducive to building a scalable and adaptable SOA.</p><h2 class="wp-block-heading">Service Granularity:</h2><p>The concept of Service Granularity plays a crucial role in defining the scope of functionality exposed by a service. It is essentially a measure of how broad or specific a set of functionalities needs to be in order to address a particular business need. The degree of granularity directly impacts the reusability, flexibility, and efficiency of the services within the architecture.</p><p>In SOA, the preferable state for Service Granularity is characterized by a tendency towards coarse granularity. Coarse-grained services encapsulate broader and more encompassing functionalities, capable of addressing significant business requirements in a single service invocation. This design approach promotes simplicity, reduces the number of service interactions, and facilitates easier maintenance.</p><p>Conversely, fine-grained services expose narrower sets of functionalities, potentially requiring multiple service invocations to fulfill a specific business operation. While fine granularity may seem intuitive for certain scenarios, it can lead to increased communication overhead and complexity, making the system more susceptible to performance issues and maintenance challenges.</p><p>For example, a coarse-grained service responsible for customer management might encompass functions such as creating, updating, and deleting customer profiles, providing a comprehensive set of functionalities within a single service interface.</p><p>Achieving the right level of granularity involves careful consideration of the business context and requirements. Coarse granularity is favored as it enhances the potential for service reuse, reduces the impact of changes on service interfaces, and aligns with the overarching goal of creating a modular and scalable architecture in SOA. Striking a balance between granularity and functionality is key to building an effective and adaptable service-oriented system.</p><hr
/><p><em>Unlock the power of Service Oriented Architecture (#SOA )! Learn how #service Coupling Cohesion, and Granularity influence flexibility and #scalability in your #System . #softwaredevelopment #programming #API</em><br
/><a
href='https://twitter.com/intent/tweet?url=https%3A%2F%2Ffrancescolelli.info%2Fsoftware-engineering%2Fservice-oriented-architecture-soa-design-principle-coupling-cohesion-and-granularity%2F&#038;text=Unlock%20the%20power%20of%20Service%20Oriented%20Architecture%20%28%23SOA%20%29%21%20Learn%20how%20%23service%20Coupling%20Cohesion%2C%20and%20Granularity%20influence%20flexibility%20and%20%23scalability%20in%20your%20%23System%20.%20%23softwaredevelopment%20%23programming%20%23API&#038;related' target='_blank' rel="noopener noreferrer" >Share on X</a><br
/><hr
/><h2 class="wp-block-heading">Service Oriented Architecture (SOA) Design Principle and Application Programming Interfaces (APIs)</h2><p>The concepts of Service Coupling, Service Cohesion, Service Granularity, and APIs (Application Programming Interfaces) are intricately related in the context of designing and implementing a Service Oriented Architecture (SOA) or any modular and scalable system. APIs act as the external interface for services, and their design choices have a direct impact on the level of coupling, the cohesion within services, and the granularity of functionalities exposed. A well-thought-out API strategy is crucial for realizing the principles of a modular, scalable, and adaptable Service Oriented Architecture.</p><p>APIs and SOA operate at different levels of abstraction and have distinct purposes within the realm of software architecture. The distinction in their level of abstraction is rooted in their design principles, scope, and intended use. APIs are considered more low-level than SOA because they provide detailed interfaces for developers to interact with specific functionalities, while SOA operates at a higher level, focusing on the overall organization and alignment of services within a system. APIs are tools that facilitate the implementation of SOA principles at a more granular level.</p><p>This specific article focus on SOA design principles; if you want to know more on <a
href="https://francescolelli.info/programming/how-to-design-a-good-api-advanced-object-oriented-programming/">how to design a good API you can find more information here</a>.</p><p></p><p>The post <a
href="https://francescolelli.info/software-engineering/service-oriented-architecture-soa-design-principle-coupling-cohesion-and-granularity/">Service Oriented Architecture (SOA) Design Principle: Coupling, Cohesion, and Granularity</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></content:encoded> <wfw:commentRss>https://francescolelli.info/software-engineering/service-oriented-architecture-soa-design-principle-coupling-cohesion-and-granularity/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <post-id
xmlns="com-wordpress:feed-additions:1">2526</post-id> </item> <item><title>What Software Patterns (or Design Patterns) are and an introduction to the most common one</title><link>https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/</link> <comments>https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/#respond</comments> <dc:creator><![CDATA[Francesco Lelli]]></dc:creator> <pubDate>Tue, 03 Oct 2023 10:19:03 +0000</pubDate> <category><![CDATA[Java]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software Engineering]]></category> <category><![CDATA[adapter]]></category> <category><![CDATA[Class diagram]]></category> <category><![CDATA[computer science]]></category> <category><![CDATA[Design Patterns]]></category> <category><![CDATA[facade]]></category> <category><![CDATA[observer]]></category> <category><![CDATA[Proxy]]></category> <category><![CDATA[software architecture]]></category> <category><![CDATA[software engineering]]></category> <category><![CDATA[Software Patterns]]></category> <category><![CDATA[UML]]></category> <category><![CDATA[UML diagram]]></category> <guid
isPermaLink="false">https://francescolelli.info/?p=2511</guid><description><![CDATA[<p>Software patterns, often referred to as design patterns, are a reusable and generalizable solution to a common problem that software developers face when designing and building software applications. Design patterns are essentially templates or blueprints for solving recurring design problems in a systematic and efficient way. Design patterns serve several important purposes in software development: [&#8230;]</p><p>The post <a
href="https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/">What Software Patterns (or Design Patterns) are and an introduction to the most common one</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></description> <content:encoded><![CDATA[<p>Software patterns, often referred to as design patterns, are a reusable and generalizable solution to a common problem that software developers face when designing and building software applications. Design patterns are essentially templates or blueprints for solving recurring design problems in a systematic and efficient way.</p><p>Design patterns serve several important purposes in software development:</p><ol
class="wp-block-list"><li><strong>Reusability</strong>: They encapsulate proven solutions to common problems, making it easier for developers to reuse these solutions in different parts of their code or in different projects.</li><li><strong>Abstraction</strong>: Design patterns provide a higher-level abstraction that helps developers think about and communicate the structure of their code more effectively. They provide a common language and framework for discussing design decisions.</li><li><strong>Maintainability</strong>: Using design patterns can improve the maintainability of software because they promote well-structured and organized code. Developers can more easily understand and modify code that follows established patterns.</li><li><strong>Scalability</strong>: Patterns can help ensure that software is designed in a way that allows it to scale and adapt to changing requirements without requiring major redesigns.</li><li><strong>Community Knowledge</strong>: Design patterns are well-documented and widely recognized within the software development community. This means that developers can leverage the collective wisdom and experience of the community when applying these patterns.</li></ol><figure
class="wp-block-image size-full"><img
decoding="async" width="1734" height="1300" data-attachment-id="2518" data-permalink="https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/attachment/pexels-photo-577585/" data-orig-file="https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585.jpeg" data-orig-size="1734,1300" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;Photo by Kevin Ku on &lt;a href=\&quot;https:\/\/www.pexels.com\/photo\/data-codes-through-eyeglasses-577585\/\&quot; rel=\&quot;nofollow\&quot;&gt;Pexels.com&lt;\/a&gt;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;data codes through eyeglasses&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="pexels-photo-577585" data-image-description="" data-image-caption="&lt;p&gt;Photo by Kevin Ku on &lt;a href=&quot;https://www.pexels.com/photo/data-codes-through-eyeglasses-577585/&quot; rel=&quot;nofollow&quot;&gt;Pexels.com&lt;/a&gt;&lt;/p&gt;
" data-medium-file="https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585-300x225.jpeg" data-large-file="https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585-1024x768.jpeg" src="https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585.jpeg?8011c3&amp;8011c3" alt="What is a Software Patterns or a Design Patterns and an introduction to the most common one" class="wp-image-2518" srcset="https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585.jpeg 1734w, https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585-300x225.jpeg 300w, https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585-1024x768.jpeg 1024w, https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585-768x576.jpeg 768w, https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585-600x450.jpeg 600w, https://francescolelli.info/wp-content/uploads/2023/10/pexels-photo-577585-1536x1152.jpeg 1536w" sizes="(max-width: 1734px) 100vw, 1734px" /><figcaption
class="wp-element-caption"><em>What are Software Patterns (or Design Patterns) and an introduction to the most common one</em></figcaption></figure><p>As the term software embrace a very large domain, there are several categories of design patterns. Each one is specialized for a particular portion portion of the code. These patterns includes:</p><ol
class="wp-block-list"><li><strong>Creational Patterns</strong>: These patterns deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. Examples include the Singleton, Factory Method, and Abstract Factory patterns.</li><li><strong>Structural Patterns</strong>: Structural patterns focus on defining the composition of classes and objects. Examples include the Adapter, Bridge, and Decorator patterns.</li><li><strong>Behavioral Patterns</strong>: Behavioral patterns are concerned with the interaction and communication between objects. Examples include the Observer, Strategy, and Command patterns.</li><li><strong>Architectural Patterns</strong>: These are high-level patterns that deal with the overall structure of an application. Examples include the Model-View-Controller (MVC), Model-View-ViewModel (MVVM), and Layered Architecture patterns.</li><li><strong>Concurrency Patterns</strong>: These patterns address issues related to managing concurrent access to shared resources in multi-threaded applications. Examples include the Mutex, Semaphore, and Read-Write Lock patterns.</li></ol><p>Design patterns are not one-size-fits-all solutions, and they should be applied judiciously based on the specific requirements and constraints of a software project. Experienced developers use their knowledge of design patterns to make informed decisions about when and how to apply them to solve particular problems.</p><p>The list of pattern is long and is also evolving as the software developer community evolve. At the Some time pattern like <strong>facade</strong>, <strong>adapter</strong>/<strong>wrapper</strong>, <strong>proxy </strong>and <strong>observer </strong>stand the test of time and are the most known among developers. Let&#8217;s see each one of them</p><h2 class="wp-block-heading"><strong>Facade Pattern</strong>:</h2><ul
class="wp-block-list"><li><strong>Purpose</strong>: The Facade pattern provides a simplified, high-level interface to a complex subsystem or set of classes. It acts as a &#8220;facade&#8221; to shield clients from the underlying complexities of the system.</li><li><strong>Use Cases</strong>: It&#8217;s useful when you want to provide a simplified and unified interface to a complex system, making it easier for clients to interact with it. It promotes loose coupling between the client code and the subsystem.</li></ul><p>The image below present the pattern using a <a
href="https://francescolelli.info/generic/developing-uml-diagrams/">Class Diagram</a>:</p><figure
class="wp-block-image size-large"><img
decoding="async" width="1024" height="710" data-attachment-id="2512" data-permalink="https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/attachment/facadedesingpattern/" data-orig-file="https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern.jpg" data-orig-size="1138,789" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Francesco Lelli&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1696331786&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="FacadeDesingPattern" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern-300x208.jpg" data-large-file="https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern-1024x710.jpg" src="https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern-1024x710.jpg?8011c3&amp;8011c3" alt="What are Software Patterns (or Design Patterns) and an introduction to the Facade Pattern" class="wp-image-2512" srcset="https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern-1024x710.jpg 1024w, https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern-300x208.jpg 300w, https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern-768x532.jpg 768w, https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern-600x416.jpg 600w, https://francescolelli.info/wp-content/uploads/2023/10/FacadeDesingPattern.jpg 1138w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure><p><strong>Example of Use: Multimedia Player Facade</strong></p><p>Suppose you are building a multimedia player application that can play various types of media, such as audio and video files. The underlying multimedia framework is complex, with different classes and interfaces for handling codecs, rendering, audio output, and video display.</p><p>In this example, we could consider implementing a class of name <em><strong><code>MultimediaPlayerFacade</code> </strong></em>that acts as a simplified interface to the complex multimedia framework. It encapsulates the initialization and usage details of the audio and video players, making it much easier for client code to play multimedia. The client code is simplified and less coupled to the underlying multimedia framework, which can change without affecting the client code.</p><p>The Facade pattern here provides a cleaner and more maintainable way to interact with a complex subsystem, shielding the client code from its intricacies.</p><h2 class="wp-block-heading"><strong>Adapter Pattern</strong> also known as <strong>Wrapper Pattern</strong>::</h2><ul
class="wp-block-list"><li><strong>Purpose</strong>: The Adapter pattern allows two incompatible interfaces to work together by providing a wrapper around one of them. It acts as a bridge between two interfaces, making them compatible without changing their source code.</li><li><strong>Use Cases</strong>: It&#8217;s used when you have existing code with interfaces that are not compatible with the interfaces you need to use. The adapter pattern allows you to reuse existing code without modification.</li></ul><p>The image below present the pattern using a <a
href="https://francescolelli.info/generic/developing-uml-diagrams/">Class Diagram</a>:</p><figure
class="wp-block-image aligncenter size-full is-resized"><img
loading="lazy" decoding="async" data-attachment-id="2513" data-permalink="https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/attachment/the-class-diagram-of-the-adapter-design-pattern_w640/" data-orig-file="https://francescolelli.info/wp-content/uploads/2023/10/The-class-diagram-of-the-Adapter-design-pattern_W640.jpg" data-orig-size="640,395" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="The-class-diagram-of-the-Adapter-design-pattern_W640" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2023/10/The-class-diagram-of-the-Adapter-design-pattern_W640-300x185.jpg" data-large-file="https://francescolelli.info/wp-content/uploads/2023/10/The-class-diagram-of-the-Adapter-design-pattern_W640.jpg" src="https://francescolelli.info/wp-content/uploads/2023/10/The-class-diagram-of-the-Adapter-design-pattern_W640.jpg?8011c3&amp;8011c3" alt="What are Software Patterns (or Design Patterns) and an introduction to the Adapter/Wrapper Pattern" class="wp-image-2513" style="width:840px;height:395px" width="840" height="395"/></figure><p><strong>Example of use: Legacy System Integration</strong></p><p>Imagine you are working on a modern e-commerce application that needs to integrate with a legacy payment gateway. The legacy payment gateway has an outdated interface that doesn&#8217;t match the modern payment service interface your application uses. You can use the Adapter pattern to bridge the gap.</p><p>To integrate the legacy payment gateway with your modern payment service, you can create an adapter class. In this way you can use the <code><em>Legacy Payment Adapter</em></code> to make payments through the legacy payment gateway using the modern payment service. In this way the adapter acts as a bridge between the modern payment service interface and the legacy payment gateway.</p><h2 class="wp-block-heading"><strong>Proxy Pattern</strong>:</h2><ul
class="wp-block-list"><li><strong>Purpose</strong>: The Proxy pattern provides a surrogate or placeholder for another object to control access to it. It can be used to add an additional layer of control over an object, such as lazy loading, access control, or caching.</li><li><strong>Use Cases</strong>: It&#8217;s useful when you want to control access to an object, especially in situations where the creation or access to the object is expensive or where you need to add functionality around object access.</li></ul><p>The image below present the pattern using a <a
href="https://francescolelli.info/generic/developing-uml-diagrams/">Class Diagram</a>:</p><figure
class="wp-block-image size-large"><img
loading="lazy" decoding="async" width="1024" height="572" data-attachment-id="2514" data-permalink="https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/attachment/proxy_pattern_diagram-svg_/" data-orig-file="https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_.png" data-orig-size="1920,1072" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Proxy_pattern_diagram.svg_" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_-300x168.png" data-large-file="https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_-1024x572.png" src="https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_-1024x572.png?8011c3&amp;8011c3" alt="What are Software Patterns (or Design Patterns) and an introduction to the Proxy Pattern" class="wp-image-2514" srcset="https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_-1024x572.png 1024w, https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_-300x168.png 300w, https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_-768x429.png 768w, https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_-600x335.png 600w, https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_-1536x858.png 1536w, https://francescolelli.info/wp-content/uploads/2023/10/Proxy_pattern_diagram.svg_.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure><p><strong>Example of use: Image Loading Proxy</strong></p><p>Suppose you are building an image viewer application, and you want to implement a feature that loads and displays high-resolution images from a remote server. However, loading these high-resolution images can be slow and resource-intensive. To improve user experience and optimize resource usage, you can use the Proxy pattern. You can use the <strong><em><code>ImageProxy</code> </em></strong>to load and display images in your application without loading the high-resolution image until it&#8217;s actually needed. Consequently you can delay the creation and loading of resource-intensive objects, improving the performance and resource utilization of your application.</p><h2 class="wp-block-heading"><strong>Observer Pattern</strong>:</h2><ul
class="wp-block-list"><li><strong>Purpose</strong>: The Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents (observers) are notified and updated automatically.</li><li><strong>Use Cases</strong>: It&#8217;s commonly used for implementing distributed event handling systems, where multiple objects need to react to changes in another object&#8217;s state. Examples include GUI frameworks where UI elements update when underlying data changes.</li></ul><p>The image below present the pattern using a <a
href="https://francescolelli.info/generic/developing-uml-diagrams/">Class Diagram</a>:</p><figure
class="wp-block-image size-large"><img
loading="lazy" decoding="async" width="1024" height="423" data-attachment-id="2515" data-permalink="https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/attachment/1920px-observer_w_update-svg_/" data-orig-file="https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_.png" data-orig-size="1920,794" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1920px-Observer_w_update.svg_" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_-300x124.png" data-large-file="https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_-1024x423.png" src="https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_-1024x423.png?8011c3&amp;8011c3" alt="What are Software Patterns (or Design Patterns) and an introduction to the Observer Pattern" class="wp-image-2515" srcset="https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_-1024x423.png 1024w, https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_-300x124.png 300w, https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_-768x318.png 768w, https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_-600x248.png 600w, https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_-1536x635.png 1536w, https://francescolelli.info/wp-content/uploads/2023/10/1920px-Observer_w_update.svg_.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure><p><strong>Example of use: Weather Monitoring System</strong></p><p>Imagine you are building a weather monitoring system that collects weather data from various sensors and notifies multiple display devices when the weather conditions change. In this scenario, you can apply the Observer pattern to implement the system. You could imagine a class of name <code>ConcreteWeatherStation</code> as the subject that collects weather data and notifies its observers (in this case, maybe various display objects) when the data changes. The Observer pattern allows multiple display devices to receive and react to updates without being tightly coupled to the weather station.</p><h2 class="wp-block-heading">Summary of Software Patterns or Design patterns</h2><p>Software patterns, also known as design patterns, are widely recognized and essential approaches for organizing code and solving recurring design problems in software development. Among these patterns, the Facade pattern simplifies complex subsystems by providing a unified interface, making it easier for clients to interact with intricate systems. The Adapter pattern bridges the gap between incompatible interfaces, allowing different components to work seamlessly together. The Proxy pattern acts as a surrogate for an object, controlling access and adding functionality, which can be valuable for resource optimization and security. Lastly, the Observer pattern facilitates the creation of distributed event handling systems, enabling one object to notify multiple observers about changes, enhancing code modularity and flexibility. These patterns represent just a subset of the many design patterns available, and they serve as valuable tools in the developer&#8217;s toolkit for building maintainable, scalable, and efficient software systems.</p><p>In the case you would like to learn more I would recommend you to have a look at the following book from &#8220;<a
href="https://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional-ebook/dp/B000SEIBB8">the gang of 4</a>&#8220;</p><figure
class="wp-block-embed is-type-rich is-provider-amazon wp-block-embed-amazon"><div
class="wp-block-embed__wrapper"> <iframe
title="Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley Professional Computing Series)" type="text/html" width="800" height="550" frameborder="0" allowfullscreen style="max-width:100%" src="https://read.amazon.com/kp/card?preview=inline&#038;linkCode=kpd&#038;ref_=k4w_oembed_scruoIlirQiw0u&#038;asin=B000SEIBB8&#038;tag=kpembed-20"></iframe></div></figure><p>It is a classic and several libraries will probably have a copy.</p><p>The post <a
href="https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/">What Software Patterns (or Design Patterns) are and an introduction to the most common one</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></content:encoded> <wfw:commentRss>https://francescolelli.info/software-engineering/what-software-patterns-or-design-patterns-are-and-an-introduction-to-the-most-common-one/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <post-id
xmlns="com-wordpress:feed-additions:1">2511</post-id> </item> <item><title>A Service Encapsulation Example Using a Location Service</title><link>https://francescolelli.info/software-engineering/a-service-encapsulation-example-using-a-location-service/</link> <comments>https://francescolelli.info/software-engineering/a-service-encapsulation-example-using-a-location-service/#respond</comments> <dc:creator><![CDATA[Francesco Lelli]]></dc:creator> <pubDate>Mon, 02 Nov 2020 19:32:30 +0000</pubDate> <category><![CDATA[Big Data]]></category> <category><![CDATA[BPI]]></category> <category><![CDATA[Software Engineering]]></category> <category><![CDATA[interface]]></category> <category><![CDATA[Service]]></category> <category><![CDATA[Service Encapsulation]]></category> <category><![CDATA[Service-oriented Architecture (SOA)]]></category> <category><![CDATA[SOA]]></category> <category><![CDATA[software architecture]]></category> <guid
isPermaLink="false">https://francescolelli.info/?p=2176</guid><description><![CDATA[<p>In this post, I am going to present an example of Service Encapsulation using the case study of ACME Social and the University of Nowhere that is described in the linked article. Service Encapsulation is often used to hide the internal representation, or state, of an object from the outside. In this way, we can [&#8230;]</p><p>The post <a
href="https://francescolelli.info/software-engineering/a-service-encapsulation-example-using-a-location-service/">A Service Encapsulation Example Using a Location Service</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></description> <content:encoded><![CDATA[<p>In this post, I am going to present an example of Service Encapsulation using the case study of <a
href="https://francescolelli.info/bpi/bpi-an-example-of-business-process-integration-big-data-flavor/" target="_blank" rel="noreferrer noopener">ACME Social and the University of Nowhere</a> that is described in the linked article.</p><p>Service Encapsulation is often used to hide the internal representation, or state, of an object from the outside. In this way, we can present to the outside world a cleaner, simpler, and more coherent view of the internal systems. Many services which were not initially planned for a Service Oriented Architecture (SOA) may get encapsulated or become a part of a SOA in this way.</p><p>In the example of ACME Social and University of Nowhere, both the parties agreed on exchanging information in order to improve the existing geolocation service of ACME Social. In particular, ACME Social would like to receive the following information from the University of Nowhere:</p><ul
class="wp-block-list"><li>Retrieve a list of unique IDs of the students</li><li>Retrieve the email addresse(s) of each student</li><li>Get the class that the student is supposed to follow</li><li>Retrieving the exact coordinates of the location of a given student according to the University of Nowhere.</li></ul><h3 class="wp-block-heading">Service Encapsulation: <strong>Can we design it as a stateless service?</strong></h3><p>Probably yes, even though students and their respective locations will change. From the point of view of the methods, we can expect that their behavior will not change over time. A possible UML diagram that describes the interface of the service could be as follows:</p><figure
class="wp-block-image size-large is-resized"><img
loading="lazy" decoding="async" data-attachment-id="2177" data-permalink="https://francescolelli.info/software-engineering/a-service-encapsulation-example-using-a-location-service/attachment/university-of-nowhere-location-service/" data-orig-file="https://francescolelli.info/wp-content/uploads/2020/11/University-Of-Nowhere-Location-Service.jpg" data-orig-size="260,166" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;F. Lelli&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1604250551&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="University-Of-Nowhere-Location-Service" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2020/11/University-Of-Nowhere-Location-Service.jpg" data-large-file="https://francescolelli.info/wp-content/uploads/2020/11/University-Of-Nowhere-Location-Service.jpg" src="https://francescolelli.info/wp-content/uploads/2020/11/University-Of-Nowhere-Location-Service.jpg?8011c3&amp;8011c3" alt="" class="wp-image-2177" width="278" height="177"/></figure><p>The class represents all the functionalities requested by ACME Social in 4 methods.  It does not have attributes and this approach will keep the design simple. IDs, emails, as well as geocoordinates will be shared as Strings in order to use one of the basic types of a service.</p><p>In the case we will decide to implement a WS-I compliant service, we can assume that the calls of the methods can fail and may trigger exceptions on the service consumer&#8217;s side.</p><h3 class="wp-block-heading">What about the concerns of ACME Social and the documentation of the service?</h3><p>As the service represents the entry point of the systems of the university of Nowhere, we need to carefully balance the complexity of the interface that we need to design. On the one hand, it must be able to mask all the idiosyncrasies of the IT of the university in order to facilitate its consumption by ACME Social. On the other hand it must be able to deliver everything that is needed and agreed. The figure below shows how this interface sits at the intersection points of two different worlds with different needs and goals:</p><figure
class="wp-block-image size-large"><img
loading="lazy" decoding="async" width="982" height="567" data-attachment-id="2178" data-permalink="https://francescolelli.info/software-engineering/a-service-encapsulation-example-using-a-location-service/attachment/service-interface-and-service-implementation/" data-orig-file="https://francescolelli.info/wp-content/uploads/2020/11/Service-Interface-And-Service-Implementation.jpg" data-orig-size="982,567" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;F. Lelli&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1604256502&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Service-Interface-And-Service-Implementation" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2020/11/Service-Interface-And-Service-Implementation-300x173.jpg" data-large-file="https://francescolelli.info/wp-content/uploads/2020/11/Service-Interface-And-Service-Implementation.jpg" src="https://francescolelli.info/wp-content/uploads/2020/11/Service-Interface-And-Service-Implementation.jpg?8011c3&amp;8011c3" alt="A Service Encapsulation Example Using a Location Service " class="wp-image-2178" srcset="https://francescolelli.info/wp-content/uploads/2020/11/Service-Interface-And-Service-Implementation.jpg 982w, https://francescolelli.info/wp-content/uploads/2020/11/Service-Interface-And-Service-Implementation-300x173.jpg 300w, https://francescolelli.info/wp-content/uploads/2020/11/Service-Interface-And-Service-Implementation-768x443.jpg 768w, https://francescolelli.info/wp-content/uploads/2020/11/Service-Interface-And-Service-Implementation-600x346.jpg 600w" sizes="(max-width: 982px) 100vw, 982px" /></figure><p>ACME Social, i.e. the client of the service needs a clear answer to the following questions:</p><ul
class="wp-block-list"><li><em>What does the service do?</em> Answering to this question will require a proper documentation of the methods. The name may be intuitive, but some of its behavior may not. Therefore, it needs to be carefully documented.</li><li><em>How can we use the service? </em>The best way to answer this question is with an example of use. ACME social may use different languages so the example(s) need to be written in Java and Python (for example) and <a
href="https://francescolelli.info/programming/best-practices-on-how-to-write-comments-in-your-code/" target="_blank" rel="noreferrer noopener">the code must be well documented (see these best practices)</a>.</li><li><em>Where can we locate the service? </em>The URL of the service, together with the way to get the authorization of use, should be part of the documentation. In addition, the service should be part of an UDDI registry as well.</li></ul><p>ACME Social is not at all interested in:</p><ul
class="wp-block-list"><li>How to represent internally the request received from ACME social</li><li>How to implement the service</li><li>Where to host the server needed for running the service</li><li>How to publish the service in the Internet</li><li>How to keep it running</li></ul><p>These aspects are of fundamental importance for the University of Nowhere. However, these concerns should not be shared with the consumers of the service.</p><hr
/><p><em>A #service Encapsulation example using a location service. #servicedesign #programming</em><br
/><a
href='https://twitter.com/intent/tweet?url=https%3A%2F%2Ffrancescolelli.info%2Fsoftware-engineering%2Fa-service-encapsulation-example-using-a-location-service%2F&#038;text=A%20%23service%20Encapsulation%20example%20using%20a%20location%20service.%20%23servicedesign%20%23programming&#038;related' target='_blank' rel="noopener noreferrer" >Share on X</a><br
/><hr
/><p>The post <a
href="https://francescolelli.info/software-engineering/a-service-encapsulation-example-using-a-location-service/">A Service Encapsulation Example Using a Location Service</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></content:encoded> <wfw:commentRss>https://francescolelli.info/software-engineering/a-service-encapsulation-example-using-a-location-service/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <post-id
xmlns="com-wordpress:feed-additions:1">2176</post-id> </item> <item><title>How to write clean code by Uncle Bob (Robert Cecil Martin)</title><link>https://francescolelli.info/tutorial/how-to-write-clean-code-by-uncle-bob-robert-cecil-martin/</link> <comments>https://francescolelli.info/tutorial/how-to-write-clean-code-by-uncle-bob-robert-cecil-martin/#respond</comments> <dc:creator><![CDATA[Francesco Lelli]]></dc:creator> <pubDate>Wed, 02 Sep 2020 11:27:26 +0000</pubDate> <category><![CDATA[Programming]]></category> <category><![CDATA[Software Engineering]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[agile]]></category> <category><![CDATA[code best practices]]></category> <category><![CDATA[comments in code]]></category> <category><![CDATA[project management]]></category> <category><![CDATA[Robert Martin]]></category> <category><![CDATA[software architecture]]></category> <category><![CDATA[Uncle Bob]]></category> <guid
isPermaLink="false">https://francescolelli.info/?p=2076</guid><description><![CDATA[<p>This is a collection of videos by Uncle Bob (Robert Cecil Martin) on how to write clean code. He is an American software engineer, instructor, and best-selling author. He developed several software design principles and co-founded the Agile Manifesto. There is more to object oriented programming. If you want to be able to write code [&#8230;]</p><p>The post <a
href="https://francescolelli.info/tutorial/how-to-write-clean-code-by-uncle-bob-robert-cecil-martin/">How to write clean code by Uncle Bob (Robert Cecil Martin)</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></description> <content:encoded><![CDATA[<p>This is a collection of videos by Uncle Bob (Robert Cecil Martin) on how to write clean code. He is an American software engineer, instructor, and best-selling author. He developed several software design principles and co-founded the Agile Manifesto.</p><figure
class="wp-block-image size-large"><img
loading="lazy" decoding="async" width="800" height="533" data-attachment-id="2078" data-permalink="https://francescolelli.info/tutorial/how-to-write-clean-code-by-uncle-bob-robert-cecil-martin/attachment/clean-code/" data-orig-file="https://francescolelli.info/wp-content/uploads/2020/09/Clean-Code.jpeg" data-orig-size="800,533" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Clean-Code" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2020/09/Clean-Code-300x200.jpeg" data-large-file="https://francescolelli.info/wp-content/uploads/2020/09/Clean-Code.jpeg" src="https://francescolelli.info/wp-content/uploads/2020/09/Clean-Code.jpeg?8011c3&amp;8011c3" alt="How to write clean code by Uncle Bob" class="wp-image-2078" srcset="https://francescolelli.info/wp-content/uploads/2020/09/Clean-Code.jpeg 800w, https://francescolelli.info/wp-content/uploads/2020/09/Clean-Code-300x200.jpeg 300w, https://francescolelli.info/wp-content/uploads/2020/09/Clean-Code-768x512.jpeg 768w, https://francescolelli.info/wp-content/uploads/2020/09/Clean-Code-600x400.jpeg 600w" sizes="(max-width: 800px) 100vw, 800px" /></figure><p>There is more to object oriented programming. If you want to be able to write code that you can re-use 2 weeks after, you want to put attention to how to write good quality code. This activity takes time, but if you want to be able to look back at what you have done (and you want it!) you have to pay the price.</p><figure
class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div
class="wp-block-embed__wrapper"> <iframe
title="Clean Code - Uncle Bob / Lesson 1" width="800" height="450" src="https://www.youtube.com/embed/7EmboKQH8lM?feature=oembed&#038;enablejsapi=1&#038;origin=https://francescolelli.info" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div></figure><p>Next, consider the importance of <a
href="https://francescolelli.info/programming/best-practices-on-how-to-write-comments-in-your-code/" target="_blank" rel="noreferrer noopener">commenting your code</a> and the proper way to do it. This is a fundamental activity. However, more commenting is not necessarily better then less commenting.</p><figure
class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div
class="wp-block-embed__wrapper"> <iframe
title="Clean Code - Uncle Bob / Lesson 2" width="800" height="450" src="https://www.youtube.com/embed/2a_ytyt9sf8?feature=oembed&#038;enablejsapi=1&#038;origin=https://francescolelli.info" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div></figure><p>This second set of talks digs deeper into the profession of software engineer/ programmer and promotes an attitude that fosters collaboration and ethics.</p><p>One of the problems that the industry is facing is that in the past 50 years, the number of programmers doubled every 5 years. Therefore, the industry remains young and the experienced coders face the trouble of passing their knowledge to the new generation. In one line: act professional!</p><figure
class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div
class="wp-block-embed__wrapper"> <iframe
title="Clean Code - Uncle Bob / Lesson 3" width="800" height="450" src="https://www.youtube.com/embed/Qjywrq2gM8o?feature=oembed&#038;enablejsapi=1&#038;origin=https://francescolelli.info" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div></figure><p>Test driven development is a software development process that relies on the repetition of a very short development cycle: Requirements are turned into very specific test cases, then the code is improved so that the tests pass. This is opposed to software development that allows code to be added that is not proven to meet requirements. This, together with making correct estimates and saying no is the right attitude for delivering successful results.</p><figure
class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div
class="wp-block-embed__wrapper"> <iframe
title="Clean Code - Uncle Bob / Lesson 4" width="800" height="450" src="https://www.youtube.com/embed/58jGpV2Cg50?feature=oembed&#038;enablejsapi=1&#038;origin=https://francescolelli.info" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div></figure><p>Software architecture refers to the fundamental structures of a software system and the discipline of creating such structures and systems. Each&nbsp;structure comprises software elements, relations among them, and properties of both elements and relations. In the video below, you will learn the fundamentals of software architecture, its rules, the value of discipline in the production of quality code, and the responsibility of disseminating the need to implement these good practices in the community of programmers.</p><figure
class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div
class="wp-block-embed__wrapper"> <iframe
title="Clean Code - Uncle Bob / Lesson 5" width="800" height="450" src="https://www.youtube.com/embed/sn0aFEMVTpA?feature=oembed&#038;enablejsapi=1&#038;origin=https://francescolelli.info" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div></figure><p>Challenges in software and software management include the problem of adjusting software production time to delivery times. In other words, we are talking about the divergence between the needs of the client, the commercial commitments, and the needs of the programmer to produce quality software. Software project management is comprised of a number of activities, which contain planning of project, deciding scope of software product, estimation of cost in various terms, scheduling of tasks and events, and resource management. This last talk is about some of these challenges:</p><figure
class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div
class="wp-block-embed__wrapper"> <iframe
title="Clean Code - Uncle Bob / Lesson 6" width="800" height="450" src="https://www.youtube.com/embed/l-gF0vDhJVI?feature=oembed&#038;enablejsapi=1&#038;origin=https://francescolelli.info" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div></figure><p>In summary, quoting from Uncle Bob:</p><blockquote
class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way</p></blockquote><hr
/><p><em>#HowTo write clean #code by Uncle Bob ( Robert Cecil Martin ) #softwaredevelopment #CodeNewbie #HowtoPerfect</em><br
/><a
href='https://twitter.com/intent/tweet?url=https%3A%2F%2Ffrancescolelli.info%2Ftutorial%2Fhow-to-write-clean-code-by-uncle-bob-robert-cecil-martin%2F&#038;text=%23HowTo%20write%20clean%20%23code%20by%20Uncle%20Bob%20%28%20Robert%20Cecil%20Martin%20%29%20%23softwaredevelopment%20%23CodeNewbie%20%23HowtoPerfect&#038;related' target='_blank' rel="noopener noreferrer" >Share on X</a><br
/><hr
/><p></p><p>How to write clean code? In case you would like to know more, here you can find a link to his book:</p><p>Clean-Code-Handbook: <a
href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882" target="_blank" rel="noreferrer noopener">https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882</a></p><p>The post <a
href="https://francescolelli.info/tutorial/how-to-write-clean-code-by-uncle-bob-robert-cecil-martin/">How to write clean code by Uncle Bob (Robert Cecil Martin)</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></content:encoded> <wfw:commentRss>https://francescolelli.info/tutorial/how-to-write-clean-code-by-uncle-bob-robert-cecil-martin/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <post-id
xmlns="com-wordpress:feed-additions:1">2076</post-id> </item> </channel> </rss>