deploy: b80bf681a4
This commit is contained in:
parent
07f7d3fad3
commit
de09820554
175 changed files with 3457 additions and 3457 deletions
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Facade Pattern :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506338 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506338></script>
|
||||
<link href=/css/nucleus.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506467 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506467></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/bcpatterns/facade-pattern/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506338></script>
|
||||
<script src=/js/auto-complete.js?1644506338></script>
|
||||
<script src=/js/search.js?1644506338></script>
|
||||
<script src=/js/lunr.min.js?1644506467></script>
|
||||
<script src=/js/auto-complete.js?1644506467></script>
|
||||
<script src=/js/search.js?1644506467></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -248,16 +248,16 @@ ALGuidelines.Dev
|
|||
<nav id=TableOfContents>
|
||||
<ul>
|
||||
<li><a href=#abstract>Abstract</a></li>
|
||||
<li><a href=#context>Context:</a></li>
|
||||
<li><a href=#problem>Problem:</a></li>
|
||||
<li><a href=#context>Context</a></li>
|
||||
<li><a href=#problem>Problem</a></li>
|
||||
<li><a href=#description>Description</a>
|
||||
<ul>
|
||||
<li><a href=#what-is-a-subsystem>What is a subsystem?</a></li>
|
||||
<li><a href=#the-pattern>The Pattern</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href=#usage>Usage:</a></li>
|
||||
<li><a href=#benefits>Benefits:</a>
|
||||
<li><a href=#usage>Usage</a></li>
|
||||
<li><a href=#benefits>Benefits</a>
|
||||
<ul>
|
||||
<li><a href=#decoupling>Decoupling</a></li>
|
||||
<li><a href=#encapsulation>Encapsulation</a></li>
|
||||
|
|
@ -289,9 +289,9 @@ ALGuidelines.Dev
|
|||
<li>Testability</li>
|
||||
<li>Maintainability</li>
|
||||
</ul>
|
||||
<h2 id=context>Context:</h2>
|
||||
<h2 id=context>Context</h2>
|
||||
<p>Whenever you want to write an isolated piece of business logic, from now on referred to as subsystem, this pattern should be applicable.</p>
|
||||
<h2 id=problem>Problem:</h2>
|
||||
<h2 id=problem>Problem</h2>
|
||||
<p>The facade pattern addresses two main problems:</p>
|
||||
<ul>
|
||||
<li>Over time as systems grow, they tend to become complex and harder to comprehend. By adding a facade on top of the subsystem, that complexity is hidden, and a clear API is defined.</li>
|
||||
|
|
@ -387,9 +387,9 @@ In Business Central, all modules in the System Application are subsystems. Examp
|
|||
<span style=color:#66d9ef>end</span>;
|
||||
}
|
||||
</code></pre></div><p>There are no rules for the subsystem, except that access needs to be <strong>internal</strong>. How you implement, how much you document, how you test, is entirely up to you and not the business of the outside caller. Of course, you should apply all of the best practices and patterns anyway, as you and possibly other developers will have to understand, extend and maintain the subsystem too. But from the view of this pattern, the complexity of the subsystem is irrelevant - just as long as it’s not accessible.</p>
|
||||
<h2 id=usage>Usage:</h2>
|
||||
<h2 id=usage>Usage</h2>
|
||||
<p>The facade pattern is one of the most prominent patterns in the <a href=https://github.com/microsoft/ALAppExtensions/tree/main/Modules/System>system application</a>. You will find plenty of examples here.</p>
|
||||
<h2 id=benefits>Benefits:</h2>
|
||||
<h2 id=benefits>Benefits</h2>
|
||||
<p>The benefits of this rather simple pattern should be abundantly clear by now. But let’s go over them once more, structured by the advantages this patterns brings:</p>
|
||||
<h3 id=decoupling>Decoupling</h3>
|
||||
<p>As the entire subsystem is inaccessible to outside systems, no dependencies can be taken. Hence this patterns strongly promotes the decoupling of objects.</p>
|
||||
|
|
@ -424,12 +424,12 @@ In Business Central, all modules in the System Application are subsystems. Examp
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506338></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506338></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506338></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506338></script>
|
||||
<script src=/js/featherlight.min.js?1644506338></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506338></script>
|
||||
<script src=/js/relearn.js?1644506338></script>
|
||||
<script src=/js/clipboard.min.js?1644506467></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506467></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506467></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506467></script>
|
||||
<script src=/js/featherlight.min.js?1644506467></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506467></script>
|
||||
<script src=/js/relearn.js?1644506467></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Generic Method Pattern :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506338 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506338 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506338></script>
|
||||
<link href=/css/nucleus.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506467 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506467 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506467></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/bcpatterns/generic-method-pattern/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506338></script>
|
||||
<script src=/js/auto-complete.js?1644506338></script>
|
||||
<script src=/js/search.js?1644506338></script>
|
||||
<script src=/js/lunr.min.js?1644506467></script>
|
||||
<script src=/js/auto-complete.js?1644506467></script>
|
||||
<script src=/js/search.js?1644506467></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -248,16 +248,16 @@ ALGuidelines.Dev
|
|||
<nav id=TableOfContents>
|
||||
<ul>
|
||||
<li><a href=#abstract>Abstract</a></li>
|
||||
<li><a href=#context>Context:</a></li>
|
||||
<li><a href=#problem>Problem:</a></li>
|
||||
<li><a href=#context>Context</a></li>
|
||||
<li><a href=#problem>Problem</a></li>
|
||||
<li><a href=#description>Description</a>
|
||||
<ul>
|
||||
<li><a href=#what-is-a-method>What is a method?</a></li>
|
||||
<li><a href=#the-pattern>The Pattern</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href=#usage>Usage:</a></li>
|
||||
<li><a href=#benefits>Benefits:</a>
|
||||
<li><a href=#usage>Usage</a></li>
|
||||
<li><a href=#benefits>Benefits</a>
|
||||
<ul>
|
||||
<li><a href=#extensibility>Extensibility</a></li>
|
||||
<li><a href=#decoupling>Decoupling</a></li>
|
||||
|
|
@ -289,9 +289,9 @@ ALGuidelines.Dev
|
|||
<li>Testability</li>
|
||||
<li>Encapsulation</li>
|
||||
</ul>
|
||||
<h2 id=context>Context:</h2>
|
||||
<h2 id=context>Context</h2>
|
||||
<p>Whenever you have to write an isolated piece of business logic, this pattern should be applicable.</p>
|
||||
<h2 id=problem>Problem:</h2>
|
||||
<h2 id=problem>Problem</h2>
|
||||
<p>Usually, when you ask people where to place code, they all have their own opinion: on a table or page, or in some kind of codeunit library where lots of functions will be placed, or .. . In fact, does it matter? It sure does, because in many cases, the code simply isn’t maintainable, let alone extendable or testable.</p>
|
||||
<h2 id=description>Description</h2>
|
||||
<p>What if we have some kind of “standard way” to always write our code. The <em>Generic Method Pattern</em> is kind of like what it says: a generic way to implement a method.</p>
|
||||
|
|
@ -496,10 +496,10 @@ The last layer is obviously where the business logic will be written.</p>
|
|||
<li>do-procedure: <code>DoBlockCustomer</code></li>
|
||||
</ul>
|
||||
<p>It is important to align these namings. It indicates that the codeunit only does one thing (remember: encapsulation), and it improves searchability from outside the codeunit (for example when you’re searching symbols or something).</p>
|
||||
<h2 id=usage>Usage:</h2>
|
||||
<h2 id=usage>Usage</h2>
|
||||
<p>Currently, there is no usage of this pattern in the BaseApp.</p>
|
||||
<p>The pattern has a main advantage in an ISV product, just because of the decoupling and extensibility. Although, I have seen many occasions where parts of the pattern was useful on PTE’s as well. You simply never know if ever at the customer site, there is going to be another partner that needs to create its own PTE, and has to depend on yours. So I’d say, this pattern is everywhere applicable, no matter the type of the app.</p>
|
||||
<h2 id=benefits>Benefits:</h2>
|
||||
<h2 id=benefits>Benefits</h2>
|
||||
<p>As I said, it will facilitate a lot of advantages. Let’s explain a bit more in depth:</p>
|
||||
<h3 id=extensibility>Extensibility</h3>
|
||||
<p>Thanks to the <em>event layer</em>, by applying this pattern for all methods, we will automatically have the bare minimum of events that we need to hook into a method: the <code>OnBefore-</code> and the <code>OnAfter</code>. Of course it would make sense to even add more events to the method when appropriate (eg, when you’re inserting a record in a table, it might be interesting to also raise an event just before you call the insert).</p>
|
||||
|
|
@ -560,12 +560,12 @@ And because of that, it so much more maintainable, upgradable, readable, .. . On
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506338></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506338></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506338></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506338></script>
|
||||
<script src=/js/featherlight.min.js?1644506338></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506338></script>
|
||||
<script src=/js/relearn.js?1644506338></script>
|
||||
<script src=/js/clipboard.min.js?1644506467></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506467></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506467></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506467></script>
|
||||
<script src=/js/featherlight.min.js?1644506467></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506467></script>
|
||||
<script src=/js/relearn.js?1644506467></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/bcpatterns/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>BC Patterns :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506341 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506341 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506341 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506341 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506341 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506341 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506341 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506341 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506341 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506341></script>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/bcpatterns/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506341></script>
|
||||
<script src=/js/auto-complete.js?1644506341></script>
|
||||
<script src=/js/search.js?1644506341></script>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -263,12 +263,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506341></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506341></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506341></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506341></script>
|
||||
<script src=/js/featherlight.min.js?1644506341></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506341></script>
|
||||
<script src=/js/relearn.js?1644506341></script>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>BC Patterns on AL Guidelines</title><link>https://alguidelines.dev/bcpatterns/</link><description>Recent content in BC Patterns on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/bcpatterns/index.xml" rel="self" type="application/rss+xml"/><item><title>Facade Pattern</title><link>https://alguidelines.dev/bcpatterns/facade-pattern/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcpatterns/facade-pattern/</guid><description>Created by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (Gang of Four), Described by Jesper Schulz-Wedde (Microsoft)
|
||||
Abstract The intent of this pattern is to provide a unified API to a single or a collection of potentially complex subsystems. If you apply this pattern as a general pattern, you will ensure improved:
|
||||
Decoupling Encapsulation Readability Testability Maintainability Context: Whenever you want to write an isolated piece of business logic, from now on referred to as subsystem, this pattern should be applicable.</description></item><item><title>Generic Method Pattern</title><link>https://alguidelines.dev/bcpatterns/generic-method-pattern/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcpatterns/generic-method-pattern/</guid><description>Created by Gary Winter (Cloud Ready Software), Described by waldo (iFacto Business Solutions | Dynex)
|
||||
Decoupling Encapsulation Readability Testability Maintainability Context Whenever you want to write an isolated piece of business logic, from now on referred to as subsystem, this pattern should be applicable.</description></item><item><title>Generic Method Pattern</title><link>https://alguidelines.dev/bcpatterns/generic-method-pattern/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcpatterns/generic-method-pattern/</guid><description>Created by Gary Winter (Cloud Ready Software), Described by waldo (iFacto Business Solutions | Dynex)
|
||||
Abstract The goal of this pattern is to facilitate a lot of things in one single awesome way of writing code. If you apply this pattern as a general pattern, you&rsquo;ll implement:
|
||||
Extensibility Decoupling Readability Testability Encapsulation Context: Whenever you have to write an isolated piece of business logic, this pattern should be applicable.</description></item></channel></rss>
|
||||
Extensibility Decoupling Readability Testability Encapsulation Context Whenever you have to write an isolated piece of business logic, this pattern should be applicable.</description></item></channel></rss>
|
||||
Loading…
Add table
Add a link
Reference in a new issue