 <?xml-stylesheet type="text/css" href="https://i7media.com/Data/style/rss1.css" ?> <?xml-stylesheet type="text/xsl" href="https://i7media.com/Data/style/rss1.xsl" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
  <channel>
    <title>Blog</title>
    <link>https://i7media.com/blog</link>
    <description />
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>mojoPortal Blog Module</generator>
    <language>en-US</language>
    <ttl>120</ttl>
    <atom:link href="https://i7media.com/Blog/RSS.aspx?p=50~99~11" rel="self" type="application/rss+xml" />
    <itunes:owner />
    <itunes:explicit>no</itunes:explicit>
    <item>
      <title>Software Architecture Patterns: A Time and Place for Everything</title>
      <description><![CDATA[<p>Software architectural patterns are one of the more polarizing and controversial topics in the development world.</p>

<p>"Here's all the patterns that every project needs!"</p>

<p>"All patterns are bad and you should feel bad if you use them!"</p>

<p>In this post I will talk about what Architectural Patterns are, when they matter, when to use them and when not to.</p>

<p>I will list out a few patterns in a way that I hope will share understanding rather than dogmatic positions that are often held by tech influencers on social media.</p>

<h2>What Are Architectural Patterns?</h2>

<p>An architectural pattern is a solution to a specific problem that arises in the design of a project. They come in the form of separating concerns, grouping functionality, abstracting implementation details, and dictating conventions for the team to use.</p>

<p>Patterns can be as simple as breaking features into predictable functions, or to complex layers that handle a multitude of use cases.</p>

<h2>When Should One Use Patterns?</h2>

<p>When you find your code being hard to navigate, disorganized, difficult&nbsp;to maintain, or having&nbsp;trouble&nbsp;on-boarding new developers, using patterns can make some sense of the chaos.</p>

<p>If you find that your project has a problem, sometimes a pattern will resolve your problem. If your project doesn't have the problem that the pattern addresses, or if you don't understand what problem the pattern address, don't use the pattern.</p>

<p>It's as simple as that.</p>

<p>After 16 years of experience with many CMSs (Content Management Systems), I have found that they benefit greatly from Architectural Patterns, or that the lack of patterns can hinder growth and modernization over the years.</p>

<p>Of all the CMSs I have experience with, mojoPortal is the one I know most about, is dearest to my heart, and the CMS that I will use to showcase&nbsp;my position on&nbsp;patterns.</p>

<h2>"I Don't Feel Like I Need Patterns"</h2>

<p>This is a good indicator that you don't need patterns. If you are a solo developer, are in a small team, or it's just a side project, there might not be a need for you to even consider a pattern.</p>

<p>If you have a project that later in its lifetime you feel like you would benefit from a pattern, refactoring is always an option.</p>

<h2>What are Common Patterns and the Problems They Solve?</h2>

<p>There are so many that I couldn't possibly list them, but I'll list a few I've had experience with, and some that I believe to have value in the CMS realm.</p>

<h3>Layered (N-Tier) Architecture</h3>

<p class="image-center"><img alt="" height="333" src="https://i7media.com/Data/blogs/software-architectural-patterns/application-layers.png" width="600" /></p>

<p>If you're familiar with mojoPortal, it mostly implements this pattern.</p>

<p>The idea behind this pattern is to separate functionality concerns into these project layers:</p>

<p>The <strong>Data Access Layer</strong> holds all implementation code for storing and manipulating data. It becomes the only API for the application to interface with your data, be it from a file, a database engine, or another system.</p>

<p>The <strong>Business Layer</strong> is the only layer that references the Data Access Layer. It holds domain entities (classes that represent tables in a database for instance) and the logic to bring the data together in code representations of the application features.</p>

<p>The <strong>Presentation (Web) Layer</strong> is the only layer that references the Business Layer. This layer is for "presenting" the features in the application. It could be a Windows Application or a Web Application, but the main thing it does is give a user interface to the code features from the Business layer.</p>

<p>The reason I said mojoPortal "mostly" implemented this pattern is because while the project is split into the proper layers, a lot of the business logic wound up in the Web (Presentation) Layer. This has made it very difficult to attempt to migrate away from the Web Forms framework it was built on to a more modern and capable framework.</p>

<p>The pros of this pattern are everything is grouped in a logical fashion and you know where everything belongs.</p>

<p>The cons of this pattern are that every layer is tightly coupled to the previous layer. This can be difficult later down the road when replacing dependencies or dealing with providers for services throughout the application. This leads into the next pattern.</p>

<h3>Clean Architecture</h3>

<p class="image-center"><img alt="" height="547" src="https://i7media.com/Data/blogs/software-architectural-patterns/clean-architecture.png" width="550" /></p>

<p>The purpose of this pattern is much like the previous pattern, but with some tweaks and the implementation of another pattern to facilitate changes to make up for the previous pattern's downfalls.</p>

<p>Much like the Layered Architecture pattern, the application is separated into several projects.</p>

<p>It differs on some key points.</p>

<ol>
	<li>All interaction between layers is done through the use of&nbsp;contract interfaces.<br />
	What this means is unlike layered architecture, instead of directly referencing the implementation of a service, you reference the interface the service implements. This allows for easily swapping out the implementation if needed.</li>
	<li>The layer references are moved around a bit. Rather than each project pointing to the previous project, the projects are placed in an encircling shape, all pointing inward or towards each other in their layer.</li>
</ol>

<p>The Layers are as such:</p>

<p>The <strong>Domain Layer</strong> is the ultimate authority of the entire application. It contains all the domain concerns and contracts for the application with no references to any internal or external dependencies. All other layers can use this layer. This layer is often coupled with the Domain Driven Design pattern, but it's not required.</p>

<p>The <strong>Application Layer</strong> contains the business logic of the application and the contract interfaces that are to be implemented in the Infrastructure layer. Often times this is where the CQRS and/or Vertical Slice patterns are used, but it's not required.</p>

<p>The <strong>Infrastructure Layer</strong> is where all implementations for the contracted services in the Application are kept. All external dependencies/libraries are abstracted here, allowing for easy replacement from one library to another if needed. An example would be if your project started by supporting SQL Server but later a migration to PostgreSQL was in order, the only assembly that would need to be edited or replaced would be the Infrastructure assembly.</p>

<p>Sometimes the Infrastructure Layer will break out only the database concerns into its own Persistence Layer(s), keeping the database specific code in it's own layer(s), but this is not required.</p>

<p>The <strong>Presentation Layer</strong> brings everything together through the use of the Inversion of Control Pattern. This allows each layer to register services in the IoC container using the interface contracts and keeping the implementation details hidden from the application. The IoC container handles the dependencies for all services that are registered to it, allowing the system to keep track of lifecycles and dispose of objects so that the implementation reference is kept in one location.</p>

<p>A cool thing about Clean Architecture is that one could have multiple Presentation Layers but share all the core functionality from the Application Layer. Do you need a multi-page website but want to administrate it through a mobile app? The answer could be two Presentation Layers, an MVC/Razor Pages layer for the website, and a Web API layer in conjunction with the mobile app for administration.</p>

<p>The pros of this pattern are that it's incredibly versatile while enforcing strict separation of concerns and external dependencies allowing for a very long-lived application.</p>

<p>The cons of this pattern are that it's moderately complicated, where boilerplate could become monotonous if the application doesn't need to use the pattern.</p>

<p>mojoPortal would have benefited a lot from this pattern being implemented properly, as migrating&nbsp;to .NET (Core) from .NET Framework would have consisted of replacing the Infrastructure layer using the same Application Layer contracts, and rebuilding the Presentation Layer in a .NET (Core) UI framework. The majority of the application wouldn't change.</p>

<p>More Reading:</p>

<ul>
	<li><a href="https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html">The Clean Architecture - The Clean Code Blog [Uncle Bob]</a></li>
	<li><a href="https://medium.com/@rudrakshnanavaty/clean-architecture-7c1b3b4cb181">Clean Architecture - Medium</a></li>
	<li><a href="https://en.wikipedia.org/wiki/Domain-driven_design">Domain-driven Design - Wikipedia</a></li>
</ul>

<h4>The Repository and Unit of Work Patterns</h4>

<p>The Repository pattern is an excellent pattern for data access. The Unit of Work pattern compliments the Repository pattern by allowing for bundles transactions for data integrity.</p>

<p>The Repository pattern's goal is to abstract repeated logic for data manipulation and querying. It allows you to have a single "GetById" method that works for all tables with the code being written once. It keeps your code DRY and makes it easy to do things like adding global query filters for features like soft deletion.</p>

<p>The Unit of Work pattern creates a "unit of work" for each action you take when mutating data. If you need to save a blog post, but it needs a new category that does not exist, the UoW will prevent bad data from being saved if creating the category fails by not saving the blog post. It's an interface for database transactions, if you're familiar with how those work.</p>

<p>Some people raise issue to the Repository (and Unit of Work) pattern when using Entity Framework, as Entity Framework implements its own versions of those patterns. This is&nbsp;completely understandable for application that will realistically never wish to change the library that connects to the database. However, from experience, I would rather have everything in my application have its own contracts to facilitate that possibility of change.</p>

<p>mojoPortal's Data Access layers all use ADO.NET, and their contracts are the implementations, which has made changing to something like Entity Framework for easy migrations and multiple database providers very hard. If the Repository pattern was between the layers, replacement would be a much more feasible.</p>

<p>More Reading:</p>

<ul>
	<li><a href="https://deviq.com/design-patterns/repository-pattern">Repository Pattern - DevIQ</a></li>
	<li><a href="https://learn.microsoft.com/en-us/aspnet/mvc/overview/older-versions/getting-started-with-ef-5-using-mvc-4/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application">Implementing the Repository and Unit of Work Patterns in an ASP.NET MVC Application - Microsoft</a></li>
</ul>

<h4>The Query Specification Pattern</h4>

<p>The Query Specification pattern is another pattern used in tandem with the repository pattern. It allows us to create domain level specifications that we can use in the Application Layer without having to expose an implementation's API.</p>

<p>For instance, we can create a "GetBookWithAuthors" specification that just takes a Book ID, and pass the specification to the Repository's "FirstOrDefaultAsync" method that&nbsp;will be sure that&nbsp;the underlying data access code will return the appropriate Book with Authors for that book.</p>

<p>More Reading:</p>

<ul>
	<li><a href="https://medium.com/@cizu64/the-query-specification-pattern-in-ddd-net-core-25f1ec580f32">The Specification Pattern in DDD .NET Core - Medium</a></li>
	<li><a href="https://deviq.com/design-patterns/specification-pattern">Specification Pattern - DevIQ</a></li>
</ul>

<h4>Plugin Architecture Pattern</h4>

<p>The Plugin Architecture Pattern&nbsp;is a pattern that facilitates the ability to add or change functionality of the application with the use of third party bundled code. Most CMSs support this pattern, mojoPortal has its own way of handling modules (plugins) that achieve the same goal.</p>

<p>It's quite simple, the main application provides a set of APIs (the Plugin Interface) that a plugin developer can implement in their plugin, and then register their code with the Plugin Manager, which is responsible for loading and running the Plugin code.</p>

<p>More Reading:</p>

<ul>
	<li><a href="https://learn.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support">Create a .NET Core application with plugins - Microsoft</a></li>
	<li><a href="https://blog.nashtechglobal.com/plugin-architecture-pattern-overview-net/">Plugin Architecture Pattern Overview (.NET) - Nash Tech</a></li>
</ul>

<h3>Bringing it all Together</h3>

<p>By using the Clean Architectural pattern, we have a good foundation to allow us to plug and play any&nbsp;implementations through the use of contract interfaces and Dependency Injection. In the event that the database code needs to be swapped out, a third party library needs to be replaced due to a security vulnerability, or having the ability to provide different implementations for selection through the application's settings, this will help facilitate these use cases.</p>

<p>Using the Repository, Unit of Work, and Query Specification&nbsp;patterns we can prevent repeating code for querying data&nbsp;and we abstract away data query implementation, and it allows us to support or swap database providers at runtime.</p>

<p>The Plugin pattern allows for us to expand the application in any way that is needed. Be it adding new features (Blog, Forums, Event Calendar, CRM, etc.)&nbsp;or modifying an existing feature (swapping out authentication methods, listening for events to modify data, etc.) it makes the application as flexible as possible.</p>

<h3>Conclusion</h3>

<p>These are what I believe are the foundational building blocks for&nbsp;a CMS like the next version of mojoPortal could use, and who knows? I might be doing just that. 😉</p>

<p>Does that mean that all applications should use Clean Architecture or the Repository patterns?&nbsp;Clearly not.</p>

<p>Patterns are like shoes, if they fit and do the job that you have a need for, use them, otherwise don't.&nbsp;Just don't make the mistake that if your application doesn't need&nbsp;patterns that&nbsp;no one needs&nbsp;patterns, as many people on the internet so readily declare.</p>
<br /><a href='https://i7media.com/blog/software-architecture-patterns-a-time-and-place-for-everything'>Elijah Fowler</a>&nbsp;&nbsp;<a href='https://i7media.com/blog/software-architecture-patterns-a-time-and-place-for-everything'>...</a>]]></description>
      <link>https://i7media.com/blog/software-architecture-patterns-a-time-and-place-for-everything</link>
      <author>elijah@i7media.net (Elijah Fowler)</author>
      <comments>https://i7media.com/blog/software-architecture-patterns-a-time-and-place-for-everything</comments>
      <guid isPermaLink="true">https://i7media.com/blog/software-architecture-patterns-a-time-and-place-for-everything</guid>
      <pubDate>Tue, 24 Feb 2026 17:24:00 GMT</pubDate>
    </item>
    <item>
      <title>i7MEDIA purchases mojoPortal</title>
      <description><![CDATA[<script>
$(document).ready(function() {
					     $('[data-b64]').each(function() {
					          var b64 = $(this).data('b64')
					               oValue = window.atob(b64);
					          $(this).attr('href', 'mailto:' + oValue).html(oValue);
					     });
					});
</script>
<h5 class="AlignCenter"><strong>Media wishing to learn more about this event, please send all questions to <a data-b64="aGlAaTdtZWRpYS5uZXQ=">&nbsp;</a></strong></h5>

<p><strong>FOR IMMEDIATE PUBLIC RELEASE:</strong></p>

<p><strong>i7MEDIA has purchased mojoPortal and all of its commercial modules</strong></p>

<p><strong>Kearney, Mo (Feb 6,&nbsp; 2017)</strong> - It is an exciting day for the mojoPortal project! i7MEDIA, a longtime supporter of the mojoPortal project, has completed the purchase of the open source project and the commercial modules available on the mojoPortal website from Source Tree Solutions.</p>

<p>Joe Davis, i7MEDIA President, has been strong supporter of mojoPortal since 2008. Joe built his business around this versatile and user-friendly content management system. i7MEDIA, is dedicated to furthering the development of mojoPortal and its tools.</p>

<p>Rest assured mojoPortal will remain an open source project and there are no plans to change that. However, I7MEDIA has plans for expanding mojoPortal to help it stay relevant and provide the very best .NET CMS platform on the market today.&nbsp;</p>

<p>Joe Audette, of Source Tree Solutions, is very enthusiastic about the new life of mojoPortal:</p>

<blockquote>Joe Davis and i7MEDIA have always been the most qualified consultants for mojoPortal other than myself, and I've always had great confidence in referring customers and projects to them over the years.&nbsp; Joe Davis has been a good friend and has been my go to guy when I needed to refer a customer or project that I did not have the capacity for. Whether you need design help, hosting, or custom feature development, i7MEDIA is the team you want with years of experience. mojoPortal was my baby for over a decade, and I am very glad to know my baby is in good hands! Long live mojoPortal! <cite>Joe Audette, mojoPortal Founder</cite></blockquote>

<p>mojoPortal has always been easy for users to add and manage their content. Over the past few years, though, it has fallen behind other systems which have taken more modern approaches to management and more fully utilized the capabilities of modern browsers. i7MEDIA has developed add-on features for mojoPortal which make content management easier and they are working on packaging these features for the masses to use.</p>

<p>Development of add-ons for mojoPortal isn't necessarily hard but there is a bit of a learning curve and quite a few steps one must take to prepare a working development environment. The focus will be on cutting down on the number of steps and making the process easier overall. They will also explore possible MVC and WebApi implementations of some features, especially administration features like the File Manager.&nbsp;</p>

<p>It has always been possible to create beautiful sites with mojoPortal but the built-in skins were not good examples. i7MEDIA is working on providing newer skins to help showcase the power or mojoPotral. &nbsp;i7MEDIA is committed to making sure that mojoPortal is seen as a designer-friendly CMS.&nbsp;</p>

<p>A new version of mojoPortal is scheduled for release in the next couple of weeks with several small fixes, a few clean bootstrap-based skins and a brand-new file manager to replace both of the current file managers and the link and image picker used in the WYSIWYG editors. That's right, one file manager that does it all.&nbsp;</p>

<p>For the latest news, check out mojoPortal’s <a href="https://www.facebook.com/mojoPortal-146363180114/">Facebook</a> and <a href="https://twitter.com/mojoportal">Twitter</a> feeds.</p>
<br /><a href='https://i7media.com/i7media-purchases-mojoportal'>Joe Davis</a>&nbsp;&nbsp;<a href='https://i7media.com/i7media-purchases-mojoportal'>...</a>]]></description>
      <link>https://i7media.com/i7media-purchases-mojoportal</link>
      <author>joe@i7media.net (Joe Davis)</author>
      <comments>https://i7media.com/i7media-purchases-mojoportal</comments>
      <guid isPermaLink="true">https://i7media.com/i7media-purchases-mojoportal</guid>
      <pubDate>Mon, 06 Feb 2017 14:56:00 GMT</pubDate>
    </item>
    <item>
      <title>Mocha Released</title>
      <description><![CDATA[<h3>Announcing the release of Mocha v1</h3>

<p>Earlier this year we released a free skin called SwiftBlue. Now we're happy to announce that we've just released another HTML5 <a href="http://www.mojoportal.com">mojoPortal</a> skin called Mocha. Mocha is SwiftBlue's Sister skin, and more are to come. It was designed as a contribution to the mojoPortal community and the <a href="http://html5mojo.codeplex.com/" target="_blank">html5mojo project</a>. Like SwiftBlue, Mocha was created with semantics-friendly HTML5 Markup.</p>

<p>Check out the <a href="http://mocha.mojoskins.com/" target="_blank" title="Visit Mocha">live demo website</a> to see what your mojoPortal website could look like today!</p>

<figure style="text-align: center; padding-top: 5px; border-top-color: rgb(211, 211, 211); border-bottom-color: rgb(211, 211, 211); border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid;"><a href="http://mocha.mojoskins.com/" target="_blank" title="Visit Mocha"><img alt="Mocha Screenshot" src="https://i7media.com/Data/Sites/1/userfiles/35/mocha-screenshot.jpg" style="width: 550px; height: 278px;" /></a>

<figcaption style="font-style: italic; margin-top: 5px; margin-bottom: 5px;"><a href="http://mocha.mojoskins.com/" target="_blank" title="Visit Mocha">Mocha</a> is an HTML5 mojoPortal skin which was designed by <a href="http://www.i7media.net" title="Visit i7MEDIA">i7MEDIA</a>.</figcaption>
</figure>

<h3>Features</h3>

<p>As with all i7MEDIA Skins, Mocha has detailed style for every feature found in mojoPortal, most notably for the Event Calendar, Event Calendar Pro, Blog, Forums, Feed manager, and jPlayer Media Players.</p>

<p>Other features include:</p>

<ul>
	<li style="margin-bottom: 5px;">Mocha includes support for a few basic content templates, including a fancy content slider. Making use of these templates will help you to create easy and professional content formats, so that you can spend less time worrying about layout and more time perfecting the content that your viewers came to see.</li>
	<li style="margin-bottom: 5px;">We've created a custom design for the dedicated Sign in and Register pages on Mocha. This way it is easier for your users to interact with the site, without having to sort through other page content.</li>
	<li>Mocha utilizes a fancy User Bar based on Twitter Bootstrap. The bar includes a lot of features, links to mojoPortal, member profiles, and the ability for administrators to toggle the settings and edit links - this way you can see your site the way your users do. But mostly it's just beautiful.</li>
	<li style="margin-bottom: 5px;">HTML5 is an important new language that is of high interest to website owners, this is because of the implications for SEO, among other things. Mocha is HTML5 Friendly. Not sure what this means? We explain more on the <a href="http://mocha.mojoskins.com/" target="_blank" title="Visit Mocha">live demo site</a>.</li>
</ul>

<h3>Support</h3>

<p>The Mocha help center is built to ensure that your time working with Mocha is successful.<br />
The skin help center covers topics like:</p>

<ul>
	<li>Installation of Mocha</li>
	<li>A basic introduction to CSS Classes and how they effect you in mojoPortal</li>
	<li>An explanation of how to use the Mocha Content Templates</li>
	<li>A FAQ to answer common questions about Mocha</li>
	<li>A form so that you can request help, and get answers to questions that weren't answered on the FAQ.</li>
	<li>Another form so that you can report any bugs you find. This is important because we'll be trying to keep the skin up to date. We feel that getting input from the users of the skin is the best way to make sure the skin is maintained well over the course of mojoPortal updates.</li>
</ul>

<p>Check out the <a href="http://mocha.mojoskins.com/skin-help.aspx" target="_blank">Mocha Skin-Help center</a> now.</p>

<p style="padding-top: 5px; border-top-color: rgb(211, 211, 211); border-top-width: 1px; border-top-style: solid;">Mocha and SwiftBlue are just another way you can make your mojoPortal site shine with a little help from i7MEDIA. Keep your eyes out, we'll be releasing more free skins soon!<br />
Interested? Check out the <a href="http://mocha.mojoskins.com/" target="_blank" title="Visit Mocha">Mocha live demo site</a></p>
<br /><a href='https://i7media.com/mocha-released'>Isaac Hall</a>&nbsp;&nbsp;<a href='https://i7media.com/mocha-released'>...</a>]]></description>
      <link>https://i7media.com/mocha-released</link>
      <author>isaac@i7media.net (Isaac Hall)</author>
      <comments>https://i7media.com/mocha-released</comments>
      <guid isPermaLink="true">https://i7media.com/mocha-released</guid>
      <pubDate>Wed, 24 Oct 2012 16:01:00 GMT</pubDate>
    </item>
  </channel>
</rss>