Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

The wages of sin: Over architecture in the real world

DZone's Guide to

The wages of sin: Over architecture in the real world

· Integration Zone
Free Resource

Share, secure, distribute, control, and monetize your APIs with the platform built with performance, time-to-value, and growth in mind. Free 90-day trial of 3Scale by Red Hat

This time, this is a review of the Sharp Commerce application. Again, I have stumbled upon the application by pure chance, and I have very little notion about who wrote it. The problem is that this system seems to be drastically more complicated than it should be.

I am going to focus  on different parts of the system in each of those posts. In this case, I want to focus on the very basis for the application data access:

image

Are you kidding me? This is before you sit down to write a single line of code, mind you. Just the abstract definitions for everything makes my head hurt.

It really hits you over the head when you get this trivial implementation:

public class EmailTemplateRepository : Repository<EmailTemplate>, IEmailTemplateRepository
{
public EmailTemplate Get(EmailTemplateLookup emailId)
{
return Get((int)emailId);
}
}

 

Yes, this is the entire class.  I am sorry, but I really don’t see the point. The mental weight of all of this is literally crashing.

Explore the core elements of owning an API strategy and best practices for effective API programs. Download the API Owner's Manual, brought to you by 3Scale by Red Hat

Topics:

Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}