r/AskProgramming • • Apr 11 '21

Language What is "enterprise" Java code and how it different from normal Java code?

In the article I was reading there was a mention of "enterprise" Java code.

What is meant by that and what are the differences to normal Java code?

52 Upvotes

23 comments sorted by

63

u/autoshag Apr 11 '21

Depending on the context, could just refer to the overabstraction and massive boilerplate pieces common in large enterprise code bases.

See enterprise fizzbuzz: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

14

u/koprulu_sector Apr 12 '21

Thank you for sharing, this is amazing. I can’t wait to use this as a stick to clobber our C# devs with. C# is just Microsoft’s Java, right? Lol

2

u/[deleted] Apr 12 '21

I don't get the relevancy to C#. Do you think there's something showcased there that C# can't do?

1

u/koprulu_sector Apr 12 '21

Our company uses C# instead of Java, but many of the same programming practices, patterns, etc. apply. I was just saying the the repository's a great example of shitty enterprise practices that will be equally as applicable, but I can totally see the audience I share it with nitpicking that we don't use Java and then be lost on them.

1

u/Ran4 Apr 12 '21

The repository pattern is not even in the top 10 list of bad things about overly enterprise programming.

0

u/YMK1234 Apr 12 '21

This is the dumbest shit I've read all day

1

u/WJMazepas Apr 12 '21

I saw this sometimes and i never could understand anything at all.

To this day im scared to work with Java projects

31

u/knoam Apr 11 '21
@Enterprise("java code")
@Consists("of mostly")
@Annotations

3

u/inwegobingo Apr 12 '21

hahahaha that's brilliant!!

2

u/[deleted] Apr 12 '21

cries in spring beans xml configurations files

10

u/[deleted] Apr 11 '21

Definitely depends on the context, I've heard it used in a lot of different ways.

People generally refer to very strictly structured Java using Java EE (Jakarta EE now as the other user said).

What context did the article say "enterprise Java"? That would give us a clue into what they actually meant.

4

u/bentheone Apr 12 '21

Everything means anything in this field. Its a very disturbing fact considering this is 1 or 0 land. When I started and realized that everybody has a different definition of every basics concepts I felt let down big time.

1

u/[deleted] Apr 12 '21

The good news is that generally, while they have different names, the underlying concepts are "true".

While we might think "Enteprise Java" is vague, the concepts that Spring Boot uses like inversion of control and dependency injection, or how Java Beans are defined, are static and well documented.

Those are the things to grasp onto, everything else is a buzzword at one time or another.

1

u/bentheone Apr 12 '21

Yep the concepts are strong and reliable across platforms and languages but the lingo is not. When you have to figure it out by yourself with no actual human to ask like me its a pain in the ass.

5

u/CodeLobe Apr 12 '21

"Enterprise" Java... The Enterprise is the name of a vessel, like a pirate ship. Enterprise Java looks at your codebase and says, "That's a performant domain specific utility layer, it would be a shame if something happened to it" and gets your manager to institute design contracts where the logic is often written out in pseudo code of doc-comment @annotations.

After having a-crew'd enough technical debt The Enterprise Java scuttles the frameworks and utilities, and your business moves on to another language-of-the-month scripting tool.

Protip: Whisper "Enterprise Python" or "Enterprise PHP" to break the necks of senior engineers within earshot.

13

u/Marriaud Apr 11 '21

Might refer to Java EE (now called Jakarta EE) : https://en.wikipedia.org/wiki/Jakarta_EE

4

u/clooy Apr 12 '21

Having worked in large enterprise projects, real enterprise Java code has:

Multiple Layers of abstraction, usually split across business domains. Big companies have many teams, some dedicated completed to just a small part of the application tier. There may be a team that is entirely in charge of database and access. The database access layer will be complicated enough to justify almost an entire operations and development team. This layer will have extensive logging - each transaction logged in detail. Including who and where the request is coming, what was the data before the change, what was it after the change. Did it fail - then send it immediately for the operations team to review.

In addition, some consumers may be restricted to what rows, or even columns they can access - although some DB systems can do this (Oracle) not many do it right. Access may be baked into the data layer at more fine grained a level - for instance some consumers may only have access to particular product lines.

But wait, there's more. Redaction may be built into the database layer. You might be able to ask for the phone number, but you will only get a masked response back showing the last 3 digits.

All of this done in a proxy database layer developed in java. This is even before you write API code for the business logic.

3

u/ohsurethatllwork Apr 11 '21

Standard frameworks and templates for the overall processing (i.e. create and age an insurance policy); then the specific state rules would be custom business methods within the business layer’s framework.

1

u/isolatrum Apr 12 '21

It means it was a patchwork of half-baked features written for different customers but packed into the same codebase. Oh, and maybe it's scalable or something.

1

u/sehrgut Apr 12 '21

It means it's less readable, less maintainable, has more unnecessary classes, and cost more to develop than the equivalent "normal" Java code.