🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #231888

Re: Dobre praktyki

#231888
From: Wojciech Bancer
Date: Thu, 25 Jan 2018 20:10
13 lines
1511 bytes
On 2018-01-25, Rafal Podsiadly <spinacz24@gmail.com> wrote:

> To prawda singeltona trzeba umiec uzywac. Np. W bazach danych do utrzymywania polaczen.

https://stackoverflow.com/questions/12755539/why-is-singleton-considered-an-anti-pattern
https://www.michaelsafyan.com/tech/design/patterns/singleton

Bazy danych to najczęściej factory.
A singletony to pain-in-the-ass podczas pisania testów.

-- 
Wojciech Bańcer
wojciech.bancer@gmail.com
Technical Details
Message-ID: <slrnp6kee7.2lbk.wojciech.bancer@pl-test.org>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <2lhebv1xabri$.dlg@tyczka.com> <6d0bd754-9b46-46ce-98ff-c5265a9a93af@googlegroups.com> <chac9zcm8l6a.1gxug7ng6lbce$.dlg@40tude.net> <cd0f750f-2346-4016-bbbd-a72c386c561d@googlegroups.com> <slrnp6hci6.23ml.wojciech.bancer@pl-test.org> <fc6bfbc5-c858-4156-95c5-cb276d07067e@googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Newsgroups: pl.comp.lang.php
From: Wojciech Bancer <wojciech.bancer@gmail.com>
Subject: Re: Dobre praktyki
References: <2lhebv1xabri$.dlg@tyczka.com> <6d0bd754-9b46-46ce-98ff-c5265a9a93af@googlegroups.com> <chac9zcm8l6a.1gxug7ng6lbce$.dlg@40tude.net> <cd0f750f-2346-4016-bbbd-a72c386c561d@googlegroups.com> <slrnp6hci6.23ml.wojciech.bancer@pl-test.org> <fc6bfbc5-c858-4156-95c5-cb276d07067e@googlegroups.com>
Organization: None
Date: Thu, 25 Jan 2018 21:10:47 +0100
User-Agent: slrn/1.0.3 (Darwin)
Mime-Version: 1.0
Message-ID: <slrnp6kee7.2lbk.wojciech.bancer@pl-test.org>
Lines: 13
NNTP-Posting-Host: 37.47.134.163
X-Trace: 1516911047 unt-rea-a-01.news.neostrada.pl 650 37.47.134.163:8154
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit