Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The Three Ages of React: Components, Metadata, and Graph Architecture
Feb 3, 2025
514 views
Written by Prashant Basnet
<section class="bg-white dark:bg-gray-900 px-4 py-8 max-w-2xl mx-auto text-gray-800 dark:text-gray-200">
<h1 class="text-2xl sm:text-3xl font-signature italic font-semibold text-center mb-4">
👋 Welcome — You’ve Landed on My Signature Page
</h1>
<p class="text-base sm:text-lg mb-4">
Hey, I’m <strong class="text-black dark:text-white">Prashant Basnet</strong> — software developmemt engineer at
<a href="https://unisala.com" class="text-indigo-600 dark:text-indigo-400 underline hover:no-underline" target="_blank" rel="noopener noreferrer">
Unisala.com
</a>.
</p>
<p class="text-base sm:text-lg mb-6">
You’re viewing my <strong>Signature</strong>, a digital space where I share what I’m learning, building, and reflecting on, all in one place.
</p>
<div class="border-l-4 border-indigo-400 dark:border-indigo-500 pl-4 italic mb-6 text-sm sm:text-base text-gray-700 dark:text-gray-400">
📍 Found this page via LinkedIn, my personal site, or a shared link?
<br />
This isn’t a traditional portfolio. It’s my public digital notebook where I document useful ideas, experiments, and lessons I’ve learned as I build.
</div>
<h2 class="text-lg font-semibold mb-2">What You’ll Find Here:</h2>
<ul class="list-disc list-inside space-y-1 text-sm sm:text-base">
<li>✍️ Thoughts on algorithms, systems, and software design</li>
<li>🧠 Insights from building at Unisala</li>
<li>🔗 Direct links to everything I’ve published on Unisala</li>
</ul>
</section>
Every components starts simple enough, a few fields. Some basic state, clean, straightforward and manageable.But then reality hits.
More fields. More validation. More business logic. More state. Before you know it, you're staring at a 500-line component and it’s still growing. And this is just one component.
During my previous work at a major telecom company, I experienced what seemed like a revolutionary solution: metadata-driven component configuration.
This article is a journey through:
Let me share what I learnt, and the interesting solution that emerged from an unlikely source.
A Classic Example: Building a component
Here’s how we used to build form at Unisala:
1. Create form component:
As the app starts to grow:
The Traditional Approach:
In modern app development, we’ve accepted certain patterns as normal:
As your app scales, this pattern repeats across dozens or hundreds of components. What began as a simple solution becomes a maintenance nightmare.
The Core Problems:
1. Component Hell
2. Change Management Nightmare
Problem: Every new field introduces multiple layers of complexity:
Impact:
So what's the solution?
The Twist: A Metadata-Driven Approach
While working at a major telecom company, I encountered a different approach: defining forms through metadata.
Big thanks to Basanth, my CTO for this one he introduced me to this whole metadata way of building components. It really opened my eyes to different ways of thinking about component architecture.
At first glance, the metadata-driven approach seemed like a game-changer. Instead of manually coding each component, forms were defined through configuration. The idea was to make components highly customisable and reduce the need for repetitive manual coding.
For example, Instead of manually coding each component, components are defined through configuration (metadata):
This approach promised to:
By defining forms and components through configuration, developers could dynamically adjust behavior and appearance without touching the underlying code. This approach had significant upsides.
Instead of writing components traditionally, we defined everything through metadata.
What was pioneered as an elegant solution turned into configuration hell.
If we want a simple changes in the input, we need to replicated the whole metaData for that input:
This approach became a major issue. Frustration grew quickly as it was difficult to comprehend . This make me reflect on how this architecture is not scalable. Metadata grew so absurd in some files, it grew more than tens of thousands of lines.
While this approach seemed promising, it introduced its own challenges:
The New Problems: 2.0
Conclusion: A Need for a Better Way
The root problem isn’t just about forms or components—it’s about how we structure our UI architecture. We need a fundamentally different approach that:
This realisation suggests that the solution lies not in choosing between code and configuration, but in finding a scalable, maintainable architecture that addresses complexity at its core.
In the next thread, we’ll explore how graph data structures can address these challenges by modeling the relationships between components and their configurations in a more intuitive and scalable way.
This approach aims to combine the benefits of abstraction and reusability while avoiding the pitfalls of metadata-driven development.
#softwareDevelopment #GraphDataStructure #ComponentsAsNode #frontendDevelopment #newAlgorithmicParadigm #differentApproach