My Application Is More Enterprise Than Yours

Rein Krul

Rein Krul

Published: 17 November, 2014

Before you start reading, I must warn you that this article is not intended to advise you. It is just a collection of thoughts on the topic of enterprise software.

Enterprise Software
Class diagram of a typical enterprise application

What, why and when?

Pick a (Java) application, any will do (except maybe Hello World). Look into 2 or 3 classes and try to understand what their purpose is. Chances are, the code inside doesn't seem to do any actual work and it sweats the love-hate relationship I, as a Java developer, have with Java OO-applications: Enterprise. What is the meaning of this word, what defines it, when do you need it?

According, to Wikipedia, enterprise software is:

Enterprise software, also known as enterprise application software
(EAS), is software used in organizations, such as in a business or
government

Wikipedia on enterprise software

It seems the very definition of enterprise software differs depending on whom you ask:

Enterprise applications are about the display, manipulation, and storage
of large amounts of often complex data and the support or automation of
business processes with that data.

Martin Fowler, "Patterns of Enterprise Application Architecture" (2002)

Those two quotes sound somewhat managerial, but others (probably developers) seem to have a more technical view on enterprise software:

What would it take for Ruby to be considered enterprise software?
Transactions?

 

Kragen at Pobox.com on Ruby and enterprise software

 

The first definition is as simple as it gets: enterprise software is software being used by enterprises or organizations. The second definition adds that enterprise software will probably manage large amounts of data or support complex processes. Is enterprise software complex by its very definition? The last quote from an unknown developer acknowledges this by questioning somewhat sarcastically whether transaction support would mark his tool of choice 'enterprise software'.

As a regular Java developer, I can empathize this feeling. Building software for the enterprise seems to automatically invite a host of complex technologies and techniques to the party. Data needs to be persisted? We absolutely need ACID-compliant transactions! There is data to be collected from several sources and converted into some other format? Let's throw in some EIP. Is the added complexity (and thus, costs) really worth it? As with everything, it depends on the situation; choose simple if you can and complex only if you must.

Random Collection of Thoughts

You can never have too many patterns

Sometimes, it seems framework developers get bonus points for each pattern they introduce, which leads to some interesting class names. Here are some gems I've encountered throughout the years:

  • AbstractSingletonProxyFactoryBean
  • AbstractScheduledThreadPoolReplacerFactoryProxy
  • ConfigurableUrlElementFactoryFactory
  • JndiJdbcReportDataSourceServiceFactory
  • AbstractAdvisorAutoProxyCreator

If you ever have trouble naming your class, you can still ask someone else to do it for you. Please do share your pattern combination gems!

Catch me if you can!

Catching an exception superclass is considered bad practice (Exception, Throwable, Error), but should I really be expecting all these erroneous situations?

try {
connection.getAttribute(new ObjectName(name), attr);
} catch (MBeanException
| AttributeNotFoundException
| InstanceNotFoundException
| ReflectionException
| IOException
| MalformedObjectNameException e) {
throw new WrapperException("Can't get attribute "
+ arguments.get("objectAttribute")
+ " from object " + arguments.get("objectName"), e);
}

Bonus Reads

"Enterprise software" is a social, not technical, phenomenon
http://lesscode.org/2005/08/09/just-like-korea/

No Managers Please!
Naming your class as '-Manager' isn't really descriptive. Because, what does it actually do, aside managing something?
http://www.bright-green.com/blog/2003_02_25/naming_java_classes_without_a.html

"PSD is an abysmal format"
Sometimes even the most seasoned developers go nuts:
http://code.google.com/p/xee/source/browse/XeePhotoshopLoader.m?r=a70d7396356997114b548f4ab2cbd49badd7d285#107

"Choose simple if you can and complex only if you must."
http://blog.avisi.nl/2013/03/19/complex-and-simple-architectures/

The Class Namer
If you're ever in dire need of some randomly generated class names: http://www.classnamer.com/

FizzBuzz Enterprise Edition
If you're interviewing candidates for a position as Software Engineer, you absolutely must make them do the FizzBuzz Enterprise Edition assignment: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

Did you enjoy reading?

Share this blog with your audience!