<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Koen Barmentlo</title>
    <description>The latest articles on DEV Community by Koen Barmentlo (@koenbarmentlo).</description>
    <link>https://dev.to/koenbarmentlo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1020741%2F9c2b44dd-5f17-4e42-a0a1-f77e82db4c71.png</url>
      <title>DEV Community: Koen Barmentlo</title>
      <link>https://dev.to/koenbarmentlo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/koenbarmentlo"/>
    <language>en</language>
    <item>
      <title>Why we as Europeans need to ditch US tech and how</title>
      <dc:creator>Koen Barmentlo</dc:creator>
      <pubDate>Sat, 08 Feb 2025 12:35:56 +0000</pubDate>
      <link>https://dev.to/koenbarmentlo/why-europe-needs-to-embrace-its-own-tech-alternatives-gm9</link>
      <guid>https://dev.to/koenbarmentlo/why-europe-needs-to-embrace-its-own-tech-alternatives-gm9</guid>
      <description>&lt;p&gt;Recently, I've become increasingly worried about Europe's reliance on the USA due to several reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Growing global tensions&lt;/li&gt;
&lt;li&gt;The election of Donald Trump&lt;/li&gt;
&lt;li&gt;Faster economic growth in China and the USA compared to Europe&lt;/li&gt;
&lt;li&gt;Technological advancements in China and the USA outpacing Europe&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this post, I want to focus on the technological aspect. At my workplace, this dependency is evident. We use ASP.NET, C#, TypeScript, and Vue.js for application development, Microsoft Azure for hosting, Dell laptops with Windows, and Google for email, calendar, and online meetings. This trend is common in many Dutch companies and across Europe, including governmental organizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is this a problem?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data privacy&lt;/strong&gt;: The EU–US Data Privacy Framework aims to protect us from US data surveillance. However, Edward Snowden revealed the need for such protections, and &lt;a href="https://www.politico.eu/article/usa-donald-trump-privacy-watchdog-dismantle-personal-data/" rel="noopener noreferrer"&gt;Donald Trump dismantled the watchdog overseeing these practices.&lt;/a&gt; This raises serious concerns about data security.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Technological control&lt;/strong&gt;: Ukraine's reliance on Starlink for communication highlights the risk. A single person in the USA can shut down this service, &lt;a href="https://www.bbc.com/news/world-europe-66752264" rel="noopener noreferrer"&gt;which actually happened&lt;/a&gt;. Governments and companies in Europe rely heavily on American software like Office 365, Windows, iOS, and Android, posing similar risks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Election interference&lt;/strong&gt;: &lt;a href="https://edmo.eu/edmo-news/analysis-of-the-2024-romanian-presidential-elections-the-role-of-social-media-and-emerging-political-trends/" rel="noopener noreferrer"&gt;The Romanian elections were heavily influenced by TikTok&lt;/a&gt;, leading to the unexpected victory of a far-right pro-Russian politician. Most social media platforms used in Europe are American, making them potential tools for political manipulation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Economic disadvantage&lt;/strong&gt;: &lt;a href="https://www.tomshardware.com/news/geforce-rtx-40-series-gpus-are-22-more-expensive-in-europe" rel="noopener noreferrer"&gt;NVIDIA graphic cards are more expensive in Europe than in the USA&lt;/a&gt;, illustrating how our dependence on American technology can put us at an economic disadvantage.    &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What can we do?
&lt;/h3&gt;

&lt;p&gt;We can't wait for politicians to act. Change starts with us. One of the best steps is to use more European technologies. This keeps our money in Europe and supports the growth of European companies. A great starting point is &lt;a href="https://european-alternatives.eu/" rel="noopener noreferrer"&gt;European Alternatives&lt;/a&gt;. This site compiles and analyzes European alternatives to digital services and products, including cloud services and SaaS products. While the website is comprehensive, it doesn't cover all available alternatives. In this post, I will highlight additional tools, focusing on those useful for web developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; My experience is limited to some of the technologies mentioned below.&lt;/p&gt;

&lt;h4&gt;
  
  
  European alternatives
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Hardware&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Laptops, desktops, and servers&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wortmann&lt;/strong&gt;: German manufacturer of laptops, desktops, servers, and more. The majority of their hardware is assembled in Germany under their own brand "Terra".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XMG&lt;/strong&gt;: German company offering laptops and desktops manufactured in Germany.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tuxedo Computers&lt;/strong&gt;: German manufacturer focusing on Linux-based systems. They offer systems with Ubuntu preinstalled and their own Ubuntu-based distribution called Tuxedo OS. Windows preinstalled options are also available.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Smartphones&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fairphone&lt;/strong&gt;: Dutch company focusing on ethical and sustainable smartphones. They offer two operating systems: pure Google Android without bloatware and /e/OS, which is a variant of AOSP without Google Services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gigaset&lt;/strong&gt;: German company offering sustainable smartphones running Android, manufactured in Germany.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing&lt;/strong&gt;: British company developing smartphones and earbuds, manufactured in India.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HMD&lt;/strong&gt;: Finnish company offering smartphones with Google Android and feature phones with KaiOS, previously branded as Nokia.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Murena&lt;/strong&gt;: French company developing smartphones with /e/OS installed, assembled in China but aiming to move assembly to Europe.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Network devices&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AVM&lt;/strong&gt;: German company known for Fritz!Box routers, Wi-Fi range extenders, and home network extenders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MikroTik&lt;/strong&gt;: Latvian company offering network routers, switches, access points, and more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nokia&lt;/strong&gt;: Finnish company specializing in infrastructure solutions for data centers, wireless networks, VoIP, contact centers, and cloud services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ericsson&lt;/strong&gt;: Swedish company specializing in networking and telecommunications, providing infrastructure, software, and services for 3G, 4G, 5G, IP systems, and optical transport solutions.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Software&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Operating Systems&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ubuntu&lt;/strong&gt;: Widely used Linux distribution for servers and PCs, developed by Canonical Ltd., an English company. It is based on Debian and is the foundation for many other Linux distributions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LineageOS&lt;/strong&gt;: AOSP-based mobile OS maintained by a global community. It does not include Google Play Services by default but can be installed separately. It also works with MicroG, a free and open-source replacement for Google Play Services maintained by a German developer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sailfish OS&lt;/strong&gt;: Mobile OS by Finnish company Jolla, compatible with most Android apps but not guaranteeing 100% compatibility.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;IDE&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JetBrains&lt;/strong&gt;: Czech company offering various IDEs like IntelliJ for Java and Kotlin, PyCharm for Python, Rider for .NET, PhpStorm for PHP, and more. Their IDEs are compatible with Linux, Windows, and Mac. JetBrains also offers tools for CI/CD, code quality analysis, source control, project management, and bug tracking.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Programming languages&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kotlin&lt;/strong&gt;: Developed by JetBrains, suitable for various applications including API development with Ktor, multiplatform apps, data analysis, console apps, and frontend development (Kotlin can compile to JavaScript).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Erlang&lt;/strong&gt;: Developed by Ericsson, used in WhatsApp and RabbitMQ. It is designed to be fault-tolerant, concurrent, and hot-swappable.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Database Management Systems&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL&lt;/strong&gt;: Popular alternative to MySQL and Microsoft SQL Server, maintained by a global community of developers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DuckDB&lt;/strong&gt;: Similar to SQLite, developed by the DuckDB Foundation based in the Netherlands. DuckDB Labs, run by one of the co-authors of DuckDB, is also based in the Netherlands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OrientDB&lt;/strong&gt;: NoSQL DBMS supporting graph, document, and object models, part of SAP, a German company.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ArangoDB&lt;/strong&gt;: Graph DBMS developed by ArangoDB GmbH, a German company. It uses JSON as the default storage format and VelocyPack for serialization and storage.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;AI&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mistral&lt;/strong&gt;: French ChatGPT alternative supporting chat, reasoning, knowledge extraction, code generation, and image generation. They offer an API cheaper than ChatGPT, with a free version for experimenting and a pay-per-use pricing plan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NeuroFlash&lt;/strong&gt;: German company offering content generation tools like text, SEO analysis, and image generation. They use models from OpenAI and provide clear pricing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aleph Alpha&lt;/strong&gt;: German AI startup developing independent AI technology for content generation, following European data protection regulations and prioritizing EU data sovereignty.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The list of European alternatives is not exhaustive. If you know of other interesting options, please share them in the comments!&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>privacy</category>
      <category>development</category>
      <category>security</category>
    </item>
    <item>
      <title>Best coding practices: secure dependency management</title>
      <dc:creator>Koen Barmentlo</dc:creator>
      <pubDate>Wed, 03 Apr 2024 13:09:07 +0000</pubDate>
      <link>https://dev.to/koenbarmentlo/best-coding-practices-secure-dependency-management-3dd4</link>
      <guid>https://dev.to/koenbarmentlo/best-coding-practices-secure-dependency-management-3dd4</guid>
      <description>&lt;p&gt;Modern application are often written with help of (too) many third party libraries. Take a look inside of a random node_modules folder for example. These packages contain security vulnerabilities which could lead to serious &lt;a href="https://thehackernews.com/2023/03/3cx-desktop-app-targeted-in-supply.html"&gt;data breaches&lt;/a&gt;, &lt;a href="https://thehackernews.com/2024/03/hackers-hijack-github-accounts-in.html"&gt;account takeover&lt;/a&gt;, &lt;a href="https://thehackernews.com/2023/12/crypto-hardware-wallet-ledgers-supply.html"&gt;money theft&lt;/a&gt; and more. Sometimes malicious code is put in third party library by a malicious actor (supply chain attack). Other times they are just mistakes made by developers. As long as you use third party libraries you're always at risk of using one (or more) vulnerable ones. This post is about things you can do to minimize the risk of becoming victim to these kind of vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't use dependencies you don't really need&lt;/strong&gt;&lt;br&gt;
If it doesn't take much time to write it yourself, do so. Especially if you only need a small part of a big library. You never know if someone has added malicious code to it or if it is using a vulnerable dependency unless you validate all that code. This makes dependency management much easier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use dependencies for big and hard things&lt;/strong&gt;&lt;br&gt;
Don't write your own code to handle hard things like handling authentication tokens. You will probably make mistakes which leave your application vulnerable. Pick a library for these things and take next paragraph into account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Every time you start using a dependency, take a look at who created it&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the package is open source and is being maintained by a very small group off people, there is a bigger chance that one of them adds malicious code without anyone noticing.&lt;/li&gt;
&lt;li&gt;Pick packages which are maintained by bigger companies like Microsoft, Oracle or Google. They hire good and professional people who know what they are doing. Don't install packages from RandomDude from RandomCountry and if you do, do some background research on that person so you know if it's a skilled and reliable developer.&lt;/li&gt;
&lt;li&gt;Check if there is no known vulnerability in the version of the package you want to install. You should be able to find this in your package manager like in &lt;a href="https://www.nuget.org/packages/Newtonsoft.Json/12.0.3"&gt;this example&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Check if the dependency is actively maintained. If it is marked as deprecated it is not supported anymore and you should not use it. You can also look at the commits on Github or the last time a new version was released.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scan your projects for vulnerabilities regularly&lt;/strong&gt;&lt;br&gt;
More development platforms add features to check if the dependencies of your application contain a vulnerable packages. In modern ASP.NET you can use &lt;code&gt;dotnet list package --vulnerable&lt;/code&gt; and in NPM you can use &lt;code&gt;npm audit&lt;/code&gt;. It's even better to automatically scan your dependencies regularly. You can use tools like &lt;a href="https://snyk.io/"&gt;snyk&lt;/a&gt; or &lt;a href="https://www.mend.io/"&gt;mend.io (formerly Whitesource)&lt;/a&gt; to help you with that. Those tools are expensive but have some advanced features. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validate your package sources&lt;/strong&gt;&lt;br&gt;
Make sure all you dependencies are downloaded from reliable and legitimate sources like NuGet.org from Microsoft or your own (well secured) private feeds. If you are using multiple feeds a package could be available on both sources so one of them might contain a malicious or version so you could accidentally install the wrong one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use lock files&lt;/strong&gt;&lt;br&gt;
Lock files contain the hash of a package's content so if it changes, you will be able to see it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scan Docker images&lt;/strong&gt;&lt;br&gt;
If you are using Docker images you should use &lt;a href="https://docs.docker.com/scout/"&gt;Docker scout&lt;/a&gt; to scan for vulnerable images regularly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do if you find a vulnerable package in your project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If there is a fix for the vulnerability you should update the package and release it as soon as possible. &lt;/li&gt;
&lt;li&gt;If not you should assess if the vulnerability is making your application vulnerable and if so try to find a workaround to fix it. Sometimes workarounds are provided by package authors.&lt;/li&gt;
&lt;li&gt;If the vulnerability has a low severity rating you might chose to do nothing or wait for a fix.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you know other best practices for managing software dependencies? I'd love to read them in the comments!&lt;/p&gt;

</description>
      <category>security</category>
      <category>development</category>
      <category>programming</category>
      <category>devops</category>
    </item>
    <item>
      <title>Best coding practices: where to put your authorization logic</title>
      <dc:creator>Koen Barmentlo</dc:creator>
      <pubDate>Wed, 03 Apr 2024 11:02:11 +0000</pubDate>
      <link>https://dev.to/koenbarmentlo/best-coding-practices-where-to-put-your-authorization-logic-4ggg</link>
      <guid>https://dev.to/koenbarmentlo/best-coding-practices-where-to-put-your-authorization-logic-4ggg</guid>
      <description>&lt;p&gt;Web application often have several layers which have different responsibilities. You'll almost always find the following three layers, but there could be more.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Presentation layer: responsible for user interactions&lt;/li&gt;
&lt;li&gt;Business logic layer: handles functional requirements&lt;/li&gt;
&lt;li&gt;Infrastructure/persistence layer: responsible for handling data and databases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So where do we put our authorization logic?&lt;/p&gt;

&lt;p&gt;Let's begin with the infrastructure/persistence layer. It is possible to add authorization here, because you could easily define the data a user should have access to. Still I don't think this is a good option for most applications for several reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most of the times users should only have access to the data they need. So if a functional requirement changes you must add changes to a lot of code within the infrastructure/persistence layer.&lt;/li&gt;
&lt;li&gt;It is very easy to change something like adding a join in a SQL query and forgetting to change authorization accordingly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What about the business logic layer? I think this is a better option, because in here you can define exactly what business actions a user should be allowed to have access to. Especially when a piece of logic should be executed from multiple applications. For example a desktop app and an Android app. But it has a big disadvantage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some of your functions are called from several places. For example: function A calls B, C calls B and D calls A. So adding authorization could make things pretty hard and it's easy to forget to add it somewhere. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How about the presentation layer? In my opinion this is the best place because of the following reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Many frameworks handle authorization here like &lt;a href="https://learn.microsoft.com/en-us/aspnet/core/security/authorization/simple?view=aspnetcore-8.0"&gt;ASP.NET&lt;/a&gt; , &lt;a href="https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/"&gt;FastApi&lt;/a&gt; and &lt;a href="https://laravel.com/docs/11.x/authorization#authorizing-actions-via-gates"&gt;Laravel&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You can exactly see which data will be return by an endpoint or on a page so you can easily decide which users should have access.&lt;/li&gt;
&lt;li&gt;It's almost impossible to forget an authorization because you can easily browse your routes and see if every single on of them has authorization.&lt;/li&gt;
&lt;li&gt;Authorization is handled at the beginning of a request. No business logic (or very little) is executed yet so that lessens the chances of introducing a &lt;a href="https://owasp.org/www-community/vulnerabilities/Business_logic_vulnerability"&gt;business logic vulnerability&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It would look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Authorize&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="c1"&gt;//makes sure a user is logged in&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"api/[controller]"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ApiController&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ValuesController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MyAuthorizationValidator&lt;/span&gt; &lt;span class="n"&gt;myAuthorizationValidator&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ControllerBase&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="n"&gt;MyAuthorizationValidator&lt;/span&gt; &lt;span class="n"&gt;validator&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;myAuthorizationValidator&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// GET: api/values&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;HttpGet&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;ActionResult&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IEnumerable&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;Get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;//other authorization rules which could not be handled by [Authorize]&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(!&lt;/span&gt;&lt;span class="n"&gt;validator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsAllowedAccordingToMyCustomAuthRule&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Unauthorized&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="c1"&gt;//Run business logic&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;"value1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"value2"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do you prefer to put authorization logic in a different place? Or do you have other reasons to put it in the presentation layer? Please let me know in the comments!&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>Modular Dependency Injection in .NET</title>
      <dc:creator>Koen Barmentlo</dc:creator>
      <pubDate>Mon, 25 Mar 2024 21:09:48 +0000</pubDate>
      <link>https://dev.to/koenbarmentlo/modular-dependency-injection-in-net-30ib</link>
      <guid>https://dev.to/koenbarmentlo/modular-dependency-injection-in-net-30ib</guid>
      <description>&lt;p&gt;When I was building application with .NET Framework I always used libraries like &lt;a href="https://autofac.org/"&gt;Autofac&lt;/a&gt; and &lt;a href="https://simpleinjector.org/"&gt;SimpleInjector&lt;/a&gt; for dependency injection. I really liked to create modules (Packages in SimpleInjector) to achieve higher cohesion and lower coupling in my class libraries. I made a module for every class library in which all dependencies inside of that class library were registered. Why should my web application (for example) know if MyBeautifulService in MyBeautifulClassLibrary should be transient or singleton? &lt;/p&gt;

&lt;p&gt;.NET Core 1.0 has built-in dependency injection support but it still lacks modules in later .NET versions (or that's what I thought). While it is possible to use Autofac and SimpleInjector in .NET Core I ran into issues and difficulties pretty quickly when I was building some Azure Functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.simpleinjector.org/en/latest/azurefunctionsintegration.html"&gt;https://docs.simpleinjector.org/en/latest/azurefunctionsintegration.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.autofac.org/en/latest/integration/azurefunctions.html"&gt;https://docs.autofac.org/en/latest/integration/azurefunctions.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I build my own Module feature with the Microsoft dependency injection which was pretty easy to do. But the way I was thinking was much to difficult. Why would I not do it in the same way Microsoft is doing it? So now I do it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static class MyBeautifulClassLibraryExtensions
{
    public static IServiceCollection UseMyBeautifulClassLibrary(this IServiceCollection services)
    {
        services.AddTransient&amp;lt;MyBeautifulService&amp;gt;();
        return services;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you prefer you can also create an extension method like this per feature instead of per class library.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Web application too slow? Here are some easy ways to speed things up.</title>
      <dc:creator>Koen Barmentlo</dc:creator>
      <pubDate>Wed, 17 May 2023 11:04:25 +0000</pubDate>
      <link>https://dev.to/koenbarmentlo/web-application-too-slow-here-are-some-easy-ways-to-speed-things-up-3018</link>
      <guid>https://dev.to/koenbarmentlo/web-application-too-slow-here-are-some-easy-ways-to-speed-things-up-3018</guid>
      <description>&lt;p&gt;Is your web application not fast enough? Or does it slow down when many requests are coming in? Here are some easy ways to fix it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Browser/HTTP caching
&lt;/h2&gt;

&lt;p&gt;Web browsers are capable of temporary storing (caching) data that has been retrieved from a server before. You can use browser caching for images, CSS, JavaScript and other files, but also for dynamic responses from API endpoints. Browser caching can be implemented by HTTP headers like &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"&gt;ETag&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control"&gt;Cache-Control&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified"&gt;Last modified&lt;/a&gt; and more. Web Application frameworks have features to make implementing these headers easier.  &lt;/p&gt;

&lt;p&gt;With a technique called cache busting you can make sure your users see the latest version when you deploy a new version of your web application. &lt;/p&gt;

&lt;p&gt;Be careful with sensitive data. When a user logs out and another user logs in the second user could access the data of the first user if not configured correctly.  &lt;/p&gt;

&lt;h2&gt;
  
  
  CDN (Content Delivery Network)
&lt;/h2&gt;

&lt;p&gt;A CDN can increase the performance and scalability of your server a lot. A CDN fetches static assets like HTML, CSS and images from your website and stores them on CDN servers. In your application you point to the CDN URL instead of your own URL. Web browsers will make requests to the CDN so this reduces the load on your server a lot. There are many CDN providers to choose from like &lt;a href="https://azure.microsoft.com/en-us/products/cdn/"&gt;Microsoft Azure&lt;/a&gt; and &lt;a href="https://www.cloudflare.com/"&gt;Cloudflare&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Be careful with sensitive data. You don't want that on an external server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory object caching
&lt;/h2&gt;

&lt;p&gt;Caching objects in memory on the webserver is also an option. For example, let's say a user calls an endpoint which does the following:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks if data is available in the cache. If not:

&lt;ul&gt;
&lt;li&gt;Gets some data from the database
&lt;/li&gt;
&lt;li&gt;Makes some heavy calculations
&lt;/li&gt;
&lt;li&gt;Uses memory object caching to store the results for five minutes
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Returns data to user
Because the data is being cached the data only have to be fetched from the database once in 5 minutes. Same goes for the heavy calculations. Only one user per 5 minutes have to wait for all this and it reduces the resources needed on the web server and database server. This off course comes at the cost of more RAM usage. Here is a simple example on how to implement this in .NET Core:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Route("api/[controller]")]  
[ApiController]  
public class ValuesController : ControllerBase  
{  
    private const string MY_CACHE_KEY = "my-key";  
    private readonly IMemoryCache _memoryCache;  
    public ValuesController(IMemoryCache memoryCache)  
    {  
        _memoryCache = memoryCache;  
    }  

    // GET: api/&amp;lt;ValuesController&amp;gt;  
    [HttpGet]  
    public IEnumerable&amp;lt;string&amp;gt; Get()  
    {  
        return _memoryCache.GetOrCreate(MY_CACHE_KEY, cacheEntry =&amp;gt;  
        {  
            cacheEntry.AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5);  
            return GetValuesFromDatabaseAndPerformCalculations();  
        });  
    }  
}  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to cache personal data of users, include a user identifier in the key so users cannot access each others data.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Horizontal scaling
&lt;/h2&gt;

&lt;p&gt;Horizontal scaling is about adding extra servers on which a application runs. A load balancer distributes the requests evenly among the servers.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vsOL4Rvw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h7dwasu4fw7d8370qg5a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vsOL4Rvw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h7dwasu4fw7d8370qg5a.png" alt="Image description" width="544" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cloud platforms like &lt;a href="https://azure.microsoft.com/en-us"&gt;Microsoft Azure&lt;/a&gt; and &lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt; or technologies like &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt; or &lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt; provide features to make horizontal scaling easier. However, there are some downsides to this solution.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the application keeps a state like data/variables in memory or data on the hard drive for example, you need to implement sticky sessions so the user will be directed to the right server.
&lt;/li&gt;
&lt;li&gt;You might want to dynamically add servers at a specific time or when the load on the application gets too high. Sticky sessions aren't an option anymore. The load balancer can't direct a user to the newly added webserver, because of the sticky session. If a server gets removed the state stored on that server is also removed. Dynamically adding and removing server requires an application to be completely stateless.
&lt;/li&gt;
&lt;li&gt;An extra server is more expensive.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Distributed caching&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Memory object caching makes an application stateful because data is being stored in memory. If you have two servers which have different versions off data cached, users will see inconsistent responses. Distributed caching is the same as Memory object caching except that the data is stored on an external server. This comes at a cost of extra complexity and money. With technologies like Redis, Memcached and others it's possible to horizontally scale the caching nodes if one node isn't enough. Distributed caching can also be a great option if memory cache is taking too much RAM from your webserver. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9EHYhuOP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n2o5rjsr1k7he9fqex4y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9EHYhuOP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n2o5rjsr1k7he9fqex4y.png" alt="Image description" width="784" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>performance</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Do you really need "microservices"?</title>
      <dc:creator>Koen Barmentlo</dc:creator>
      <pubDate>Sun, 14 May 2023 12:29:48 +0000</pubDate>
      <link>https://dev.to/koenbarmentlo/do-you-really-need-microservices-ogi</link>
      <guid>https://dev.to/koenbarmentlo/do-you-really-need-microservices-ogi</guid>
      <description>&lt;p&gt;Web applications are often divided into multiple deployment units. Often their called microservices and most of the time they are not really microservices. An architecture that is divided in multiple deployment units is called a distributed architecture. A deployment unit is a self-contained package of software components which can be individually deployed. An example is a single web application with its database. In web applications, deployment units are connected through protocols such as REST, SOAP, Events or others. An architecture which is not is called a monolithic architecture.  &lt;/p&gt;

&lt;p&gt;Advantages of distributed architectures over monolithic architectures  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy applications over several machines and you'll have much more computing power available.
&lt;/li&gt;
&lt;li&gt;When designed well, applications won't go down completely if a part of the application goes down.
&lt;/li&gt;
&lt;li&gt;Multiple teams can work more easily individually on a part of the application.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sounds great right? Well, there are a lot of challenges and disadvantages to face if we choose for a distributed architecture. In the next section I will describe them.  &lt;/p&gt;

&lt;h2&gt;
  
  
  The fallacies of distributed computing
&lt;/h2&gt;

&lt;p&gt;The fallacies of distributed computing are a set of eight false assumptions programmers and architects often make. They're made by L Peter Deutsch and others at Sun Microsystems in 1994. The next section will describe them and provide options to deal with the problems these fallacies might cause.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fallacy 1: The network is reliable.&lt;/strong&gt;&lt;br&gt;
If system 2 works perfectly well, but is not accessible for service 1 due to network issues, service 2 is still unavailable. This is why timeouts, service breakers and retry policies exist. A great tool for .NET to handle common network issues is &lt;a href="https://github.com/App-vNext/Polly"&gt;Polly&lt;/a&gt;, but even when using a tool like this, the network is still not completely reliable.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fallacy 2: Latency is zero&lt;/strong&gt;&lt;br&gt;
If component 1 calls component 2 within a monolith the latency is almost zero. If a network call has to be made, the time it takes for the call to be completed will be much longer. Especially if many network calls have to be made. If the latency of a particular call is 100ms and we'll chain ten calls, latency will add one second to complete the business process.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduce the number of network calls. Instead of sending multiple pieces of data individually, send them in the same request.
&lt;/li&gt;
&lt;li&gt;Latency could be reduced by moving the data closer to the client. If the client is in West Europe, make sure your data is in West Europe as well.
&lt;/li&gt;
&lt;li&gt;Temporary caching data could reduce the number of network calls, reducing the latency to zero if data has already been fetched. Storing data locally at the client (with an pub/sub model for example) could also be an option to reduce the latency to zero.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fallacy 3: Bandwidth is infinite&lt;/strong&gt;&lt;br&gt;
Let's say component 1 fetches 500kb data from service 2. That doesn't sound like much, but if that happens 2.000 times, 1Gb of bandwidth will be used. This is could cause increased latency and bottlenecks. Therefor, monitoring bandwidth is probably a good idea in a distributed architecture. Ways to reduce the amount of bandwidth are:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Caching
&lt;/li&gt;
&lt;li&gt;Storing data locally
&lt;/li&gt;
&lt;li&gt;Compression
&lt;/li&gt;
&lt;li&gt;GraphQL
&lt;/li&gt;
&lt;li&gt;Field selectors
&lt;/li&gt;
&lt;li&gt;You could also use lightweight data formats like JSON or a binary serialization format.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fallacy 4: The network is secure&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The attack surface of distributed applications is much bigger than the attack surface of distributed applications. Every single component should be secured because there are many ways you're application can be attacked like XSS, vulnerabilities in operation systems, libraries and DDOS just to name a few.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fallacy 5: The topology never changes&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This fallacy is about every network component like routers, servers, firewalls and proxy servers. The topology changes all the time. Updated network components could make services unavailable, if a component breaks it will be replaced, if a server can't handle the request anymore it could be replaced or a load balancer and an extra server could be added. With modern technology like Kubernetes, Docker and Azure app services for example, virtual machines or containers could even dynamically be added or removed.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use host names instead of hard coded IP addresses.
&lt;/li&gt;
&lt;li&gt;If that's not enough, use discovery services.
&lt;/li&gt;
&lt;li&gt;Service bus frameworks could also help, because every components communicates with the service bus.
&lt;/li&gt;
&lt;li&gt;Automate as much as possible so you can replace a server as quickly as possible .
&lt;/li&gt;
&lt;li&gt;Monitor all services.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fallacy 6: There is only one admin&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Distributed architectures are complex, especially when they get big. It can't be maintained by a single administrator so it requires a lot of communication between teams to make everything work correctly. This makes decoupling, release management and monitoring extra important.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fallacy 7: Transport cost is zero&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This fallacy is about money. With a distributed architecture you will need extra servers, extra proxies and firewalls etc. which makes a distributed architecture more expensive. If you want to cache data, like discussed in fallacy 2 and 3, we might need extra server memory or a Redis cluster. If we use compression like discussed in fallacy 3 we would need more computing power to compress data. Extra resources are also needed for serializing and deserializing of data. These things might seem cheap, but at large scale it could become very expensive.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fallacy 8: The network is homogeneous&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Networks consist of different components of different vendors which have to be compatible with each other. In a distributed architecture a lot of different combinations of components can be used and not all of them are fully tested. We also don't have control of which browsers and devices connect to you're service. This fallacy isn't all about hardware. It's also about software.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Try to use open and popular standards like JSON or XML.
&lt;/li&gt;
&lt;li&gt;Using PaaS or IaaS providers will take some hardware challenges away.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Other challenges
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Finding bugs in a distributed architecture is hard. In a monolithic application there is one log instead of several. Combining all these logs is necessary to trace what happened when an error occurred. There are tools for this, but it's still much more difficult than a single log.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contract versioning&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When multiple components talk to each other they need to understand each other. A data contract is used for this purpose. A data contract describe the messages being sent from one component to another. It consists of which kind of standard is being used (XML or JSON for example), properties, datatype and the structure of data. Contracts can't be changed because it might cause another component to break. Therefor contracts need versioning to be able to migrate to a new version of a contract. Changes in contracts must also be communicated to other development teams and there should be an overview of which deployment unit uses which contract so you know when you can remove an old contract.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Many components have to be deployed in a distributed architecture.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure components are loosely coupled so each can be deployed individually .
&lt;/li&gt;
&lt;li&gt;Automate deployments to reduce the amount of work deploying all components .
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Distributed transactions&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Transactions are easy in monolithic applications. Begin transactions -&amp;gt; do stuff -&amp;gt; commit or rollback transaction. But what if the stuff you want to do requires actions in multiple components? Technologies exist to handle these situations, but that's still much more complex than transaction that are not distributed. Distributed architectures often rely on eventual consistency.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Local development&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Local development with a distributed architecture can be done in two different ways. The first is to setup all the components (or only the subset of components required by a developer) of the application. The larger the application gets, the harder and more time consuming this process gets. The other way is to setup an extra environment for development purposes. This environment must be maintained and will come with the cost of extra hardware. Infrastructure as code or scripts make life easier setting up new environments. Debugging is also much harder in a distributed environment.  &lt;/p&gt;

&lt;h2&gt;
  
  
  What kind of application could be suitable for a distributed architecture?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Applications with a huge code base. I used to work at a company where I had some colleagues who worked on a huge monolithic application which took hours to compile. In this scenario a distributed architecture could be a good idea.
&lt;/li&gt;
&lt;li&gt;An application built in a big company with a lot of developers.
&lt;/li&gt;
&lt;li&gt;Applications which needs to be very scalable.
&lt;/li&gt;
&lt;li&gt;Applications where availability is very important.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In all other scenario's a monolithic architecture is probably the best approach.  &lt;/p&gt;

&lt;p&gt;I hope that by now you can choose if your next application will be monolithic or distributed, but that doesn't mean you're done yet. There are different types of distributed and monolithic architectures each with their own advantages and disadvantages. It's important to know about them and make a good decision.  &lt;/p&gt;

&lt;p&gt;Details of these types are out of the scope of this post, so I will only mention some of them.  &lt;/p&gt;

&lt;p&gt;Monolithic architecture types  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Layered architecture
&lt;/li&gt;
&lt;li&gt;Pipeline architecture
&lt;/li&gt;
&lt;li&gt;Microkernel architecture
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Distributed architecture types  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service oriented architecture (SOA)
&lt;/li&gt;
&lt;li&gt;Microservices
&lt;/li&gt;
&lt;li&gt;Serverless
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you enjoyed reading this and I love to hear any feedback!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>architecture</category>
      <category>microservices</category>
    </item>
  </channel>
</rss>
