Best design pattern to control permissions on a “per object per user” basis with ServiceStack?

I use per object permissions in my ServiceStack applications. Effectively this is an Access-Control-List (ACL). I have created a Working Self Hosted Console Example which you can fork on GitHub. ACL pattern: I use the database structure shown in the diagram below, whereby resources in my database such as documents, files, contacts etc (any resource … Read more

How is the Data Mapper pattern different from the Repository Pattern?

[the Repository is] another layer of abstraction over the mapping layer where query construction code is concentrated. The DataMapper ensures the DB side of the fence doesn’t need to know about the specifics of your business logic and how the data is kept in memory by your business objects and your business side of the … Read more

What is the Page Object Pattern in Selenium WebDriver? [closed]

The documentation has already covered this. If you have any specific questions, feel free to edit your main post. Official: Page Objects and PageFactory on Selenuim Wiki. Page Object Design Pattern on Selenium official site. Unofficial: Do a Google search, you will get a lot info on this. Page Object Pattern Page Objects in Selenium … Read more

anti-if campaign

The problem is not the ‘if’ statement, it is the programmers who write bad code. EDIT: Also, as others have pointed out, you should be using polymorphism (if available) when you are using if statements to check the type of an object, but if statements in and of themselves are very useful and fundamental constructs.

Data Consistency Across Microservices

The Microservices architectural style tries to allow organizations to have small teams own services independent in development and at runtime. See this read. And the hardest part is to define the service boundaries in a useful way. When you discover that the way you split up your application results in requirements impacting multiple services frequently … Read more

Application Strangler Pattern Experiences & Thoughts [closed]

The biggest problem to overcome is lack of will to actually finish the strangling (usually political will from non-technical stakeholders, manifested as lack of budget). If you don’t completely kill off the old system, you’ll end up in a worse mess because your system now has two ways of doing everything with an awkward interface … Read more

Abstract Factory, Factory Method, Builder

A builder helps you construct a complex object. An example is the StringBuilder class (Java, C#), which builds the final string piece by piece. A better example is the UriComponentsBuilder in Spring, which helps you build a URI. A factory method gives you a complete object in one shot (as opposed to the builder). A … Read more