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>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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue