Usually we organize our javascript apps either by what they are or by what they do. The first is like rails: separate directories like componentscontainersreducers, etc. And the second more or less like feature/DDD: usercart, and so on. Tho both of these options are very mainstream and solid they contain some constraints.

When you structure the code files tree by what they are you tend to keep every component of the same feature so distant that it’s very difficult to connect the pieces. Therefore you dive into some troubles like the path hell; a lot of require('../../../etc') in your code. And everything is extremely coupled to the directory structure.

In the other hand, when you are driven by what they do everything is more isolated and maintainable. But there’s a lot of duplication. And the communication between the features either is based on a weak contract or depends upon some infrastructure. Both of these options are prone to raise some bugs.

Pods it’s an evolution of the last one. You can think about pods like the microservices of the front applications. A pod is an isolated and completely independent microapp which can communicate 100% with other pods. Therefore, you get code base which is composable, extendable, reusableand extremely easy to test. Tho, the main benefit is that you completely erase the inter components side effects. Once a pod is failing you are totally sure that it’s because itself has something wrong; not an external piece.

A pod is an isolated and completely independent microapp which can communicate 100% with other pods

The unique requirement of the pods is to driven all the pods intercommunication through an event bus. If you’re already using any Flux pattern, lib or framework it’s gonna be very easy to lead this communication to the dispatcher; which is actually a single point for the events.

For a pod is not mandatory to have the logic, presentational and communication layers. Can have all of just one of them. Imagine a router pod. It has the logic and communication layer but doesn’t expose any view. Or the opposite, a form pod which only exposes a presentational layer and depends 100% on the arguments received (see React props).

Because every pod acts like and independent application we place the tests inside them. This means two things: stop duplicating the files tree, and making code coverage meaningful. When you have 100% coverage with a pod you know that it won’t fail. No side effects.

In a nutshell, by working with pods you get a secure and very flexible structure. Very easy to test and without side effects. It scales from 0 to millions without worrying about big refactors due to the fact that every pod is isolated but available to communicate with all the other pods.

In case you want to see some code here’s a Github repository with a simple pod architecture. Give it a look and check the benefits the pods can offer. If you have some doubts or proposals don’t hesitate to open an issue or comment here. This is a living pattern. We’re using the pods at Ulabox and they’re proving to be the solution to a lot of structural codebase problems. Tho, we’re willing to listen about your thoughts and concerns.

The journey is long, take some pods.

Previous ArticleNext Article

Leave a Reply

Your email address will not be published. Required fields are marked *

E.

Essential Podcasts for Entrepreneurs & Tech Lovers

Podcasts are a great way to discover new subjects and new people. Whether you are a tech lover or an entrepreneur, bellow you will discover podcasts for entrepreneurs you should – without a doubt – listen to. 

Itnig Podcast with César Migueláñez, Bernat Farrero and Carlos Pierre
Itnig Podcast with César Migueláñez, Bernat Farrero and Carlos Pierre

« Masters of Scale » 

with Reid Hoffman

The host: Reid Hoffman decides to turn to the corporate world instead of pursuing a university carrier. He worked for Apple, Fujitsu for then starting his own business: SocialNet and left it in 2000 to join Confinity. Confinity gives life to Paypal after fusionning. Finally, in 2003, Hoffman co-founds LinkedIn. He is Master of Scale’s host. 

About: The podcast welcomes some of the greatest entrepreneurs. You will discover throughout the talk how they managed to take their companies from 0 to a lot of zeros. You can listen to Masters of Scale’s special guests like Mark Zuckerberg (Facebook), Selina Tobaccowalla (Evite), Brian Chesky (Airbnb) or Nancy Lublin (Crisis Text Line). Must-hear: one of the top tech podcasts for entrepreneurs.

Listen to the podcast: On their website, Apple Podcasts, Spotify and Youtube

The Team: Reid Hoffman, June Cohen, Deron Triff and Jai Punjabi

« Rocket » 

with Christina Warren, Simone de Rochefort and Brianna Wu

The hosts: Christina Warren started as a Freelance Writer. Then, she worked at Mashable as a Senior Tech Analyst and Tech Correspondent and ended the journey at Microsoft as a Senior Cloud Developer Advocate. About Simone de Rochefort, she is  Senior Video Producer and co-host of The Polygon Show. Brianna Wu founded her first startup at the age of 19, Giant Spacekat. She was Head of Development at the time. She is now running for US Congress. 

About: In this podcast, you will discover three passionate women and their “geek conversation” as they like to call it.  No guest speakers, but you will be able to listen to a panel of tech subjects from Apple to Comics, you will not be disappointed. 

Listen to the podcast: On their website, Apple Podcasts, Overcast, Pocket Casts, Spotify and Castro

« This week in Startups »

with Jason Calacanis

The host: Jason Calacanis starts as an internet industry journalist in New-York. In 2003, he co-founded Weblogs, Inc and then a few years later he joined Sequoia Capital, launched the web directory Mahalo. He also founded ThisWeekIn.com. Furthermore, he created This Week in Startups podcast and a startup named Inside.com. Finally, he was part of the creation of the Sydney Launch Festival. 

About: Either you are looking to start your own company, or you are a successful entrepreneur, or you just love technology, this podcast will give you a peek to the entrepreneurship world. You will hear stories of all kinds! On his website, you will also find his events and some research on transportation, healthcare and more. This is one is part of the tech podcasts for entrepreneurs not to be missed.

Listen to the podcast: Apple Podcasts, Youtube, SoundCloud and RSS Feed

You can also subscribe to their newsletter in order to receive episodes directly. 

The Team: Jason Calacanis, Jacqui Deegan, and Tony Agapiou

« Recode / Decode » 

with Kara Swisher

The host: Kara Swisher is an American journalist specialized in the technology industry. She first started to work for an alternative newspaper in Washington for then working for the Washington Post. She wrote articles for the Wall Street Journal and New York Times and wrote her own books. Finally, in 2014, she created Recode, a website dedicated to the latest technology news. In 2015, she initiates Recode Decode. 

About: The weekly podcast welcomes tech experts and great entrepreneurs. They review how they got there, what’s on their mind about the current industry and what they would improve or create. Her recent guests were Elon Musk (Tesla CEO), former Secretary of State Hillary Clinton and Mark Zuckerberg. 

Listen to the podcast: Apple Podcasts, Google Podcasts, Spotify, Stitcher, and TuneIn

« K Fund PodKast »

with Jaime Novoa

The host: Jaime Novoa’s background is quite diverse. He is a writer and an investor, but he also worked in data analysis and social media analysis. In 2014, he founded Novobrief, a newsletter for startups. Then, in 2016, he becomes an investor at K Fund and he founds, in 2019, Dealflow, a weekly tech newsletter. 

About: The podcast discusses startups, entrepreneurs and Venture Capital. You will discover enterprises and their story. From data science, unicorns or digital platforms, you sure will find more than one interesting podcast. 

Listen to the podcast: On their website and Soundcloud

« Clockwise »

with Dan Moren and Mikah Sargent

The hosts: Dan Moren is an active author and writer as well as podcaster. He was a Senior Editor at Macworld. Today, he hosts two podcast shows: Clockwise and The Rebound. As for Mikah Sargent, he started as a Website Designer and Developer for then switching as a Senior Editor at Newsy. He now hosts few podcasts such as Clockwise on Replay FM or on TWiT.tv. 

About: The weekly podcast discusses technology and welcomes each time 2 special guests. For 30 minutes, they address 4 topics where all four speakers get to elaborate on the matter, highlight the issues and expose their thoughts. 

Listen to the podcast: On their website, Apple Podcasts, Overcast, Pocket Casts, Spotify and Castro

« Itnig Podcast»

with Bernat Farrero

The host: Bernat Farrero starts his career as a Developer. In 2009, he founded Itnig, a startup ecosystem that organizes entrepreneurship events. They also have a coworking for startups, a podcast and a fund for early-stage projects. Furthermore, he is a Founder of Factorial, Quipu and Camaloon. He is also a Board Member of Playfullbet, GymForLess and Parkimeter. Finally, he hosts Itnig’s weekly Podcast. 

About: The podcast welcomes every week a new guest. If you wish to learn from successful entrepreneurs, you are on the right platform. The discussions turn around Technology and its industry. You will come across guests like Carlos Pierre (Badi), Vincent Rosso (BlaBlaCar) or Oscar Pierre (Glovo).

Listen to the podcast: Youtube, Spotify, Apple Podcasts, Ivoox, and Google Podcasts

You can subscribe to their newsletter if you want to receive the podcast’s link every Monday. 

Whether you are at an early stage of your project, an investor or you are just curious, these podcasts for entrepreneurs give you the opportunity to be updated on tech and business news. Also, you get to learn from successful international entrepreneurs, which can definitely be very useful for your business.