<div class="cont_box">
<p>Check list</p>
<ul>
<li>S.O.L.I.D</li>
<li>DI</li>
<li>потоки, пример dead lock-а</li>
<li>реализация IDisposable</li>
<li>паттерны(MVC, MVVM, Singletone and other)</li>
<li>Thread safe singletone</li>
<li>утечки памяти в программе</li>
<li>почему возникает утечка</li>
<li>Юнит тесты</li>
<li>что такое хороший код</li>
</ul>
<p>Link's</p>
<ul>
<li><a href="https://medium.com/@NahidulHasan/understanding-use-of-interface-and-abstract-class-9a82f5f15837" target="_blank">Принципы SOLID, как использовать интерфейсы.</a></li>
</ul>
</div>
<div class="ProggerBook">
<div id="aboutSolid">
<h3>SOLID</h3>
<h4>Принцип единственной ответственности (Single Responsibility Principle)</h4>
<p class="context">Существует лишь одна причина, приводящая к изменению класса.</p>
<p>Один класс должен решать только какую-то одну задачу. Он может иметь несколько методов, но они должны использоваться лишь для решения общей задачи. Все методы и свойства должны служить одной цели. Если класс имеет несколько назначений, его нужно разделить
на отдельные классы.</p>
<p>Рассмотрим пример:</p>
<div style="overflow: auto; padding: 8px; border: 1px solid #ccc;">
<xmp>
<?php
namespace Demo;
use DB;
class OrdersReport
{
public function getOrdersInfo($startDate, $endDate)
{
$orders = $this->queryDBForOrders($startDate, $endDate);
return $this->format($orders);
}
protected function queryDBForOrders($startDate, $endDate)
{ // If we would update our persistence layer in the future,
// we would have to do changes here too. <=> reason to change!
return DB::table('orders')->whereBetween('created_at', [$startDate, $endDate])->get();
}
protected function format($orders)
{ // If we changed the way we want to format the output,
// we would have to make changes here. <=> reason to change!
...
CSS
body {
margin: 0px 20px 20px 20px;
}
p {
text-align: justify;
padding: 20px 30px;
}
.cont_box {
background-color: #edededed;
padding-bottom: 5px;
margin-bottom: 20px;
}
h3 {
text-align: center;
color: #000000;
padding: 10px 0;
margin: 0 auto;
border: dashed 1px #16a1e7;
font-size: 26px;
background-color: #aadbf3;
width: 50%;
}
h4 {
padding: 20px 30px;
font-size: 20px;
font-weight: 600;
}
.context {
background-color: #fff7d7;
padding: 20px 30px;
}
ul {
margin: 0 30px 25px 30px;
border: dashed 1px;
padding: 20px 0;
}
ul li {
padding: 5px 0px;
margin: 0 30px;
list-style-type: disc;
}
.cont_box p {
font-size: 22px;
text-align: center;
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.