Path: csiph.com!aioe.org!9fIPKKyZIee3VOLwIg2h1w.user.gioia.aioe.org.POSTED!not-for-mail From: Graeme Geldenhuys Newsgroups: comp.lang.java.programmer Subject: Re: Going from java monolith to microservice Date: Sun, 17 Jan 2021 16:32:43 +0000 Organization: Aioe.org NNTP Server Lines: 26 Message-ID: References: <7af929c0-ebc2-4b05-b0fe-38f7a70af528n@googlegroups.com> NNTP-Posting-Host: 9fIPKKyZIee3VOLwIg2h1w.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-GB Xref: csiph.com comp.lang.java.programmer:39666 On 17/01/2021 1:08 pm, mike wrote: > The problem we have today it that there are many public classes > that should not actually be used by testers. However we cannot > change access since other dependent modules need these classes. Yes, that is often a trap many teams fall into. They open their classes way to much, and then later struggle to introduce tighter control. I mentioned it in my initial reply, and will mention it again. I would recommend you read some articles on the Ports and Adapters architecture, which can be applied to existing code. We are three-quarters of the way in converting an existing project to it, and the results so far is a much cleaner design. So I would highly recommend it. It also means our Primary Adapters (interfaces into our domain) can be implemented using Test code, HTTP request (web service) etc. It becomes very flexible on how it can be used. Here is one article, but there are many more: https://herbertograca.com/2017/09/14/ports-adapters-architecture/ There are some excellent YouTube videos talking about the subject as well. Regards, Graeme