<?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>Proxy Archives - Francesco Lelli %</title> <atom:link href="https://francescolelli.info/tag/proxy/feed/" rel="self" type="application/rss+xml" /><link>https://francescolelli.info/tag/proxy/</link> <description>Information Management, Computer Science,  Economics, Finance and more</description> <lastBuildDate>Tue, 03 Oct 2023 10:58:13 +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>Proxy Archives - Francesco Lelli %</title><link>https://francescolelli.info/tag/proxy/</link> <width>32</width> <height>32</height> </image> <site
xmlns="com-wordpress:feed-additions:1">156264324</site> <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
fetchpriority="high" 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
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>Introduction to Computer Networks and How Internet Works</title><link>https://francescolelli.info/tutorial/introduction-to-computer-networks-and-how-internet-works/</link> <comments>https://francescolelli.info/tutorial/introduction-to-computer-networks-and-how-internet-works/#respond</comments> <dc:creator><![CDATA[Francesco Lelli]]></dc:creator> <pubDate>Mon, 26 Oct 2020 08:48:32 +0000</pubDate> <category><![CDATA[Generic]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[application server]]></category> <category><![CDATA[extranet]]></category> <category><![CDATA[Firewall]]></category> <category><![CDATA[internet]]></category> <category><![CDATA[intranet]]></category> <category><![CDATA[IP]]></category> <category><![CDATA[LAN]]></category> <category><![CDATA[Local Area Network]]></category> <category><![CDATA[Packets]]></category> <category><![CDATA[Proxy]]></category> <category><![CDATA[Router]]></category> <category><![CDATA[TCP/IP]]></category> <category><![CDATA[UDP/IP]]></category> <category><![CDATA[URL]]></category> <category><![CDATA[web server]]></category> <category><![CDATA[web service]]></category> <guid
isPermaLink="false">https://francescolelli.info/?p=2151</guid><description><![CDATA[<p>In this article I would like to provide a (small) introduction to computer networks and the necessary infrastructure for them to operate well. In a nutshell, it is all about connecting client applications to servers. A server is a computer or a computer program which manages access to a centralized resource or service in a [&#8230;]</p><p>The post <a
href="https://francescolelli.info/tutorial/introduction-to-computer-networks-and-how-internet-works/">Introduction to Computer Networks and How Internet Works</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></description> <content:encoded><![CDATA[<p>In this article I would like to provide a (small) introduction to computer networks and the necessary infrastructure for them to operate well. In a nutshell, it is all about connecting client applications to servers.  A server is a computer or a computer program which manages access to a centralized resource or service in a network. A server does not need to run on complex hardware. Nowadays, devices such as phones, toys, lights, TVs etc. are perfectly suitable infrastructures. Typical types of servers are (i) web servers and (ii) application servers</p><ul
class="wp-block-list"><li>A <strong>web server</strong>‘s fundamental job is to accept and fulfill requests from clients for static content from a website (HTML pages, files, images, video, and so on). The client is almost always a browser or a mobile application, and the request takes the form of a Hypertext Transfer Protocol (HTTP) message, as does the web server’s response.</li><li>An <strong>application server</strong>’s fundamental job is to provide its clients with access to what is commonly called business logic, which generates dynamic content. That is, it’s code that transforms data to provide the specialized functionality offered by a business, service, or application.</li></ul><p>These servers are typically physically part of an Intranet, an Extranet, or the Internet:</p><figure
class="wp-block-image size-large"><img
loading="lazy" decoding="async" width="593" height="329" data-attachment-id="2154" data-permalink="https://francescolelli.info/tutorial/introduction-to-computer-networks-and-how-internet-works/attachment/internet-extranet-intranet/" data-orig-file="https://francescolelli.info/wp-content/uploads/2020/10/Internet-Extranet-Intranet.png" data-orig-size="593,329" 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="Internet-Extranet-Intranet" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2020/10/Internet-Extranet-Intranet-300x166.png" data-large-file="https://francescolelli.info/wp-content/uploads/2020/10/Internet-Extranet-Intranet.png" src="https://francescolelli.info/wp-content/uploads/2020/10/Internet-Extranet-Intranet.png?8011c3&amp;8011c3" alt="Introduction to Computer Networks" class="wp-image-2154" srcset="https://francescolelli.info/wp-content/uploads/2020/10/Internet-Extranet-Intranet.png 593w, https://francescolelli.info/wp-content/uploads/2020/10/Internet-Extranet-Intranet-300x166.png 300w" sizes="(max-width: 593px) 100vw, 593px" /></figure><ul
class="wp-block-list"><li>An <strong>intranet </strong>is a computer network for sharing information, collaboration tools, operational systems, and other computing services within an organization, usually to the exclusion of access by outsiders.</li><li>An <strong>extranet </strong>is a controlled private network that allows access to partners, vendors, and suppliers or an authorized set of customers – normally to a subset of the information accessible from an organization&#8217;s intranet.</li><li>The <strong>Internet </strong>is a global computer network providing a variety of information and communication facilities, consisting of interconnected networks using standardized communication protocols.</li></ul><hr
/><p><em>The #Web is a collection of #servers located in #internet extranet and intranet. Here you can find an introduction to computer networks:</em><br
/><a
href='https://twitter.com/intent/tweet?url=https%3A%2F%2Ffrancescolelli.info%2Ftutorial%2Fintroduction-to-computer-networks-and-how-internet-works%2F&#038;text=The%20%23Web%20is%20a%20collection%20of%20%23servers%20located%20in%20%23internet%20extranet%20and%20intranet.%20Here%20you%20can%20find%20an%20introduction%20to%20computer%20networks%3A&#038;related' target='_blank' rel="noopener noreferrer" >Share on X</a><br
/><hr
/><p>The video below provides an introduction to how software and hardware are organized in order to ensure proper interoperability. Note that it is featuring Netscape as the browser of choice: the video is old but still relevant.</p><figure
class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div
class="wp-block-embed__wrapper"> <iframe
title="Journey of a Network Packet" width="800" height="600" src="https://www.youtube.com/embed/-g3I_ZNhePM?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>I believe that the video above is a good introduction to Computer Networks. Some of the components mentioned include:</p><ul
class="wp-block-list"><li><strong>LAN (Local Area Network)</strong>: A local area network is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus, or office building. LAN are a collection of cables and switches. WiFi is a particular type of LAN.</li><li><strong>Packets (IP, Data, etc)</strong>: A network packet is a formatted unit of data carried by a packet-switched network. A packet consists of control information and user data; the latter is also known as the payload. Control information provides data for delivering the payload.</li><li><strong>Router (local or remote)</strong>: Performs the traffic directing functions on the Internet. Data sent through the internet, such as a web page or email, is in the form of data packets. A packet is typically forwarded from one router to another router through the networks that constitute an internetwork (e.g. the Internet) until it reaches its destination node. The video also mentions Router-switch, that normally are routers of better quality that sit at the intersection of your LAN and the internet.</li><li><strong>Proxy Server</strong>: A server application or appliance that acts as an intermediary for requests from clients seeking resources from servers. It may also offer security features as well as filtering capabilities.</li><li><strong>URL: A Uniform Resource Locator</strong>, colloquially termed a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it.</li><li><strong>Firewall</strong>: A system designed to prevent unauthorized access to or from a private network. You can implement a firewall in either hardware or software form, or in a combination of both. Firewalls prevent unauthorized internet users from accessing private networks connected to the internet, especially intranets and extranets. Firewalls have ports (or doors) that are open for communication and other that are closed. The most common ports are 80 for standard internet traffic and 25 for e-mail traffic.</li><li><strong>IP, TCP/IP, UDP/IP</strong>: They are a part of the Internet protocol suite. It is a conceptual model that defines the communications protocols used in the Internet and similar computer networks. It is commonly referred to as TCP/IP because the foundational protocols in the suite are the Transmission Control Protocol and the Internet Protocol.</li></ul><p>From the picture below you can get an idea on how these servers are organized.</p><figure
class="wp-block-image size-large"><img
loading="lazy" decoding="async" width="725" height="405" data-attachment-id="2155" data-permalink="https://francescolelli.info/tutorial/introduction-to-computer-networks-and-how-internet-works/attachment/computer-networks/" data-orig-file="https://francescolelli.info/wp-content/uploads/2020/10/Computer-Networks.gif" data-orig-size="725,405" 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="Computer-Networks" data-image-description="" data-image-caption="" data-medium-file="https://francescolelli.info/wp-content/uploads/2020/10/Computer-Networks-300x168.gif" data-large-file="https://francescolelli.info/wp-content/uploads/2020/10/Computer-Networks.gif" src="https://francescolelli.info/wp-content/uploads/2020/10/Computer-Networks.gif?8011c3&amp;8011c3" alt="Introduction to Computer Networks" class="wp-image-2155"/></figure><hr
/><p><em>Introduction to Network of #computers and #HowTo Internet Works.</em><br
/><a
href='https://twitter.com/intent/tweet?url=https%3A%2F%2Ffrancescolelli.info%2Ftutorial%2Fintroduction-to-computer-networks-and-how-internet-works%2F&#038;text=Introduction%20to%20Network%20of%20%23computers%20and%20%23HowTo%20Internet%20Works.&#038;related' target='_blank' rel="noopener noreferrer" >Share on X</a><br
/><hr
/><p>The video linked above also mentions a particular form of attack known as &#8220;ping of death&#8221; that involves sending a malformed or otherwise malicious ping to a computer. This is possible because the Internet is an uncontrolled area where not all the participants may decide to play in a fair manner. Another common attack is the &#8220;<em>DNS attack&#8221;</em>, an exploit in which an attacker takes advantage of vulnerabilities in the domain name system (<em>DNS</em>).</p><p>This article (Introduction to Computer Networks and How Internet Works) is part of a minicollection of tutorials on <a
href="https://francescolelli.info/the-building-blocks-of-a-software-architecture/" target="_blank" rel="noreferrer noopener">the building block of a software architecture</a>.</p><figure
class="wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-francesco-lelli"><div
class="wp-block-embed__wrapper"><blockquote
class="wp-embedded-content" data-secret="Rgu9KKs7mK"><a
href="https://francescolelli.info/the-building-blocks-of-a-software-architecture/">The building blocks of a software architecture</a></blockquote><iframe
class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;The building blocks of a software architecture&#8221; &#8212; Francesco Lelli" src="https://francescolelli.info/the-building-blocks-of-a-software-architecture/embed/#?secret=r5x30iD4II#?secret=Rgu9KKs7mK" data-secret="Rgu9KKs7mK" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div></figure><p>The post <a
href="https://francescolelli.info/tutorial/introduction-to-computer-networks-and-how-internet-works/">Introduction to Computer Networks and How Internet Works</a> appeared first on <a
href="https://francescolelli.info">Francesco Lelli</a>.</p> ]]></content:encoded> <wfw:commentRss>https://francescolelli.info/tutorial/introduction-to-computer-networks-and-how-internet-works/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <post-id
xmlns="com-wordpress:feed-additions:1">2151</post-id> </item> </channel> </rss>