← Back to list

The Difference Between Sharing Code and Sharing Ownership

The Most Expensive Word In Angular Projects

Dipak Ahirav in Angular Engineering · 2026-06-29 13:09 · 9 claps · 3.0 min read paywalled
#angular #software-architecture #software-engineering #architecture #software-development
Open on Medium ↗
Wiki topics: 🌐 · Web Development 🏛️ · Architecture

The Difference Between Sharing Code and Sharing Ownership

The Most Expensive Word In Angular Projects

There is one sentence that appears in almost every enterprise Angular project.

“Let’s move it to the Shared folder.”

Sometimes that’s the right decision.

Very often…

It isn’t.

Because teams confuse two completely different ideas.

Sharing code.

And sharing ownership.

They sound similar.

Architecturally, they’re completely different.

**Not a Member? Read for FREE here.**

It Starts With Good Intentions

Imagine the Customer feature has a beautiful table component.

Another team working on Orders notices it.

They ask:

“Can we reuse that?”

Someone replies:

“Sure. Let’s move it into shared.”

Problem solved.

Or so it seems.

Shared Code Is Easy

Moving a file takes seconds.

customers/
    customer-table.component.ts
↓
shared/
    table.component.ts

The application still works.

No tests fail.

Everything compiles.

But something invisible has changed.

Ownership.

Who Owns It Now?

Originally:

Customer Team owned the component.

Now:

Customer Team.

Orders Team.

Reports Team.

Invoices Team.

Everyone depends on it.

So who decides when it changes?

Who reviews pull requests?

Who accepts breaking changes?

Who owns the roadmap?

Nobody really knows.

The component has become everyone’s responsibility.

Which often means…

It’s nobody’s responsibility.

Sharing Creates Coordination

Imagine Orders needs one extra column.

Customer doesn’t.

Reports need a different layout.

Analytics needs another configuration.

Soon the once-simple component gains:

  • More inputs
  • More outputs
  • Feature flags
  • Conditional templates
  • Configuration objects

The component isn’t becoming reusable.

It’s becoming generic.

You’ve seen this story before.

Code Can Be Shared Without Sharing Decisions

Enterprise architecture is less about files…

And more about decision making.

A feature can expose a stable contract.

Other features consume the contract.

The feature still owns the implementation.

Consumers don’t.

That’s very different from everyone editing the same files.

Think Like A Product Team

Imagine a Payment API.

Many applications use it.

That doesn’t mean every application owns it.

The Payments team owns it.

Everyone else consumes it.

Angular features should work the same way.

Ownership stays local.

Usage becomes global.

The Shared Folder Isn’t A Business Domain

The shared/ folder shouldn't become a second application.

It should contain things that are truly universal.

Examples:

  • Buttons
  • Dialogs
  • Icons
  • Generic form controls
  • Pipes
  • Utility directives

Not:

  • Customer validation
  • Order workflow
  • Invoice calculations
  • Payment rules

Business logic belongs with the business feature.

Sharing Business Logic Is Different

Suppose three features need customer permissions.

The answer isn’t always:

shared/

The better question is:

Which feature actually owns customer permissions?

Ownership determines location.

Not the number of consumers.

Architecture Is About Responsibility

A useful question during every code review:

Are we sharing implementation…

Or are we sharing responsibility?

Implementation can often be reused.

Responsibility should remain clear.

The moment responsibility becomes ambiguous…

Architecture starts to decay.

A Practical Rule

Before moving code into shared/, ask:

Would this code still exist if the Customer feature disappeared?

If the answer is no

It probably belongs to the Customer feature.

If the answer is yes

It might be a genuine shared abstraction.

What Great Teams Optimize

Junior teams optimize for fewer files.

Senior teams optimize for clearer ownership.

Those goals sometimes overlap.

Often they don’t.

Long-term maintainability depends much more on ownership than on reducing duplication.

Final Thoughts

Sharing code feels efficient.

Less duplication.

Fewer files.

More reuse.

But software isn’t maintained by files.

It’s maintained by people.

And people work best when responsibilities are obvious.

The strongest Angular architectures don’t move everything into shared/.

They keep ownership where it belongs.

Because sharing code is a technical decision.

Sharing ownership is an architectural decision.

And the second one has consequences that last much longer.

[embed]Why Great Angular Architecture Looks Boring The Best Angular Projects Rarely Impress Youmedium.com

Connect with Me

If you enjoyed this post and would like to stay updated with more content like this, feel free to connect with me on social media:

Email: Email me on dipaksahirav@gmail.com for any questions, collaborations, or just to say hi!

I appreciate your support and look forward to connecting with you!


메타데이터
post_id
bee20df2a9df
slug
the-difference-between-sharing-code-and-sharing-ownership-bee20df2a9df
url
https://medium.com/angular-engineering/the-difference-between-sharing-code-and-sharing-ownership-bee20df2a9df
canonical_url
https://medium.com/angular-engineering/the-difference-between-sharing-code-and-sharing-ownership-bee20df2a9df
author_url
https://medium.com/@dipaksahirav
status
ok
fetched_at
2026-07-09 13:13:48