<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Muhammad Adil</title>
    <description>The latest articles on Forem by Muhammad Adil (@madildev).</description>
    <link>https://forem.com/madildev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F486747%2F5e3d7730-e3bc-48ae-bc07-e71d592922e6.jpg</url>
      <title>Forem: Muhammad Adil</title>
      <link>https://forem.com/madildev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/madildev"/>
    <language>en</language>
    <item>
      <title>✨ Defense Against the Dark Arts of SaaS: Single vs Multi-Tenancy</title>
      <dc:creator>Muhammad Adil</dc:creator>
      <pubDate>Fri, 26 Sep 2025 19:20:42 +0000</pubDate>
      <link>https://forem.com/madildev/defense-against-the-dark-arts-of-saas-single-vs-multi-tenancy-2d39</link>
      <guid>https://forem.com/madildev/defense-against-the-dark-arts-of-saas-single-vs-multi-tenancy-2d39</guid>
      <description>&lt;p&gt;Imagine you’re at Hogwarts. Every wizard needs a wand, but here’s the problem: do you give each wizard their own wand, or do you enchant one wand to be shared among many?&lt;/p&gt;

&lt;p&gt;That’s exactly the choice we face when building SaaS (Software-as-a-Service) applications.&lt;/p&gt;

&lt;p&gt;Think of SaaS Application as a magical shop in Diagon Alley. Instead of everyone brewing their own potion at home, they subscribe to your shop and use your ready-made potions. Examples: Gmail, Slack, Notion. You don’t install them yourself; you “rent” the service.&lt;/p&gt;

&lt;p&gt;The catch? How do you handle all these customers (tenants)? That’s where tenancy models come in.&lt;/p&gt;

&lt;p&gt;🧙 Single-Tenant (Each Wizard Has Their Own Wand) &lt;br&gt;
Every customer gets their own dedicated resources (database, instance, or server).&lt;br&gt;
Pros:&lt;br&gt;
✅ Strong isolation (Hermione’s spells won’t mess up Ron’s work). &lt;br&gt;
✅ Easier compliance/security. &lt;br&gt;
Cons: &lt;br&gt;
❌ Costly to scale (imagine crafting a new wand for every wizard). &lt;br&gt;
❌ Harder to maintain (every wand might break differently). &lt;/p&gt;

&lt;p&gt;🧙 Multi-Tenant (One Wand Shared by Many Wizards) &lt;br&gt;
All customers share the same app/resources, but data is partitioned logically.&lt;br&gt;
Pros:&lt;br&gt;
✅ Cost-efficient (fewer wands to make). &lt;br&gt;
✅ Easier to upgrade everyone at once (one spell = everyone benefits). &lt;br&gt;
Cons:&lt;br&gt;
❌ Isolation is tricky (if Voldemort corrupts the wand, everyone’s in trouble). &lt;br&gt;
❌ Performance tuning gets complex.&lt;/p&gt;

&lt;p&gt;⚡ Why Does This Matter ?&lt;br&gt;
Startups often go Multi-Tenant → cheaper, faster.&lt;br&gt;
Enterprises may prefer Single-Tenant → secure, compliance-friendly. &lt;br&gt;
Some systems even offer a hybrid model — the Sorting Hat decides based on the customer’s needs. &lt;/p&gt;

&lt;p&gt;💡 Takeaway :&lt;br&gt;
Building SaaS applications isn’t just about coding features. It’s about choosing the right tenancy model to balance cost, performance, and security. &lt;/p&gt;

&lt;p&gt;In the next lessons of this “Wizarding Series,” we’ll dive deeper into: &lt;/p&gt;

&lt;p&gt;🔮 Levels of isolation in a multi-tenant environment.&lt;br&gt;
🔮 Implementation strategies with a real world projects. &lt;br&gt;
🔮 Best practices to stop Voldemort (downtime, breaches, scaling nightmares).&lt;/p&gt;

&lt;p&gt;So, apprentice wizards, sharpen your wands and IDEs — this is your first Defense Against the Dark Arts class in SaaS! 🧙‍♂️✨&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffs19fjzd6p3hicfd3c6h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffs19fjzd6p3hicfd3c6h.png" alt="Comparison for Multi-vs-Single Tenancy" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>software</category>
      <category>learning</category>
    </item>
    <item>
      <title>🚀Life of a Software Engineer: How I Patched an NPM Package and Saved the Day</title>
      <dc:creator>Muhammad Adil</dc:creator>
      <pubDate>Fri, 19 Sep 2025 15:36:10 +0000</pubDate>
      <link>https://forem.com/madildev/life-of-a-software-engineer-how-i-patched-an-npm-package-and-saved-the-day-b3e</link>
      <guid>https://forem.com/madildev/life-of-a-software-engineer-how-i-patched-an-npm-package-and-saved-the-day-b3e</guid>
      <description>&lt;p&gt;A couple of days ago, we hit a real wall in one of our projects. If you’ve ever worked with client-side PDF/doc generation, you’ll know this pain 👀.&lt;/p&gt;

&lt;p&gt;With the latest Chrome update, some internal style and rendering changes came in. Sounds good for browsers… but for us? 💥 Boom — all our client-side PDF generation went from a few seconds ⏱️ to a terrifying 10–15 minutes. The app froze, users got frustrated, and our docs feature was basically unusable.&lt;/p&gt;

&lt;p&gt;The culprit: our trusted but aging library &lt;strong&gt;html2pdf.js&lt;/strong&gt;, which relies on &lt;strong&gt;html2canvas&lt;/strong&gt; to render HTML into a canvas and then stuff it into a PDF. Pretty cool stuff, but not so cool when Chrome breaks it.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Red flag reminder&lt;/strong&gt;: Client-side doc generation was never ideal. Server-side is always the safer bet. But since the project was already built this way, we had to roll with it.&lt;/p&gt;

&lt;p&gt;Now here’s where things got interesting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tried server-side generation with Puppeteer + templates — worked for simple docs ✅, broke for complex ones ❌&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dug through GitHub issues like a detective 🕵️‍♂️.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally found a gem 💎: a library called &lt;strong&gt;Snapdom&lt;/strong&gt;, which could step in for &lt;strong&gt;html2canvas&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I rolled up my sleeves, pulled down the &lt;strong&gt;HTML2PDF&lt;/strong&gt; source code, and after hours of poking around, found the “hidden goblin” 🐉 — a single function where html2canvas was doing the heavy lifting. Swapped it out for Snapdom, did some param tweaking, bundled it back into Angular, and… &lt;strong&gt;VOILÀ&lt;/strong&gt; 🎉.&lt;/p&gt;

&lt;p&gt;⚡ With minimal changes to our existing code, docs were back to downloading in seconds. The fix took a day of focused work — way better than the wild goose chase with headless browsers.&lt;/p&gt;

&lt;p&gt;✨ &lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Always pay attention to NPM warnings ⚠️ — ignoring them is like an ostrich burying its head in the sand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Before diving headfirst into code, research 🧑‍💻. Someone might’ve already hit (and solved) the same issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Temporary fixes are fine — they buy you time to work on the real, long-term solution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the end of the day, sometimes the fastest way forward is not rewriting everything, but tweaking just the right piece in the puzzle 🧩.&lt;/p&gt;

&lt;p&gt;💡 Have you ever patched a dependency yourself to save a project? Would love to hear your war stories!&lt;/p&gt;

&lt;p&gt;Here is the code change comparion:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxky741ar5dylya8brw6c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxky741ar5dylya8brw6c.jpg" alt=" " width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>learning</category>
      <category>frontend</category>
    </item>
    <item>
      <title>My First Hacktoberfest</title>
      <dc:creator>Muhammad Adil</dc:creator>
      <pubDate>Wed, 28 Oct 2020 17:48:56 +0000</pubDate>
      <link>https://forem.com/madildev/my-first-hacktoberfest-51cd</link>
      <guid>https://forem.com/madildev/my-first-hacktoberfest-51cd</guid>
      <description>&lt;h3&gt;
  
  
  [Introduction]
&lt;/h3&gt;

&lt;p&gt;My name is Muhammad Adil. I am a Computer Science student currently pursuing my Bs CS degree from UET,Lahore. I am a passionate Front End developer(Vue.js) and Desktop Developer(C++).&lt;br&gt;
I decided to join Dev Community because one of our DSC Leads told us that Dev Community is a social media platform for Developers and every developer should be a part of this community.&lt;/p&gt;

&lt;h3&gt;
  
  
  Background
&lt;/h3&gt;

&lt;p&gt;I have been coding for around two years now and still I was unaware of what Open Source is, untill last year in 2019 when I joined DSC(Developers Student Clubs) community and I came to know about Open-Sourcing and Github. I was very fascinated by the idea of sharing your code online and I started using Git and Github. &lt;/p&gt;

&lt;h3&gt;
  
  
  Progress
&lt;/h3&gt;

&lt;p&gt;"I love coding, its my passion" but I hesitated to participate in the "Hacktoberfest 2019" and thought whether I am good enough to participate in the Event. Finally, this year I participated in the "Hactoberfest" and completed the challenge. This gave me the confidence to contribute more to the open-source community.   &lt;/p&gt;

&lt;h3&gt;
  
  
  Contributions
&lt;/h3&gt;

&lt;p&gt;The contributions I made in this Hactoberfest are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A Protfolio design template (&lt;a href="https://github.com/Muhammad-Adil-arch/website-for-company/tree/master/Muhammad-Adil-arch_%2310" rel="noopener noreferrer"&gt;https://github.com/Muhammad-Adil-arch/website-for-company/tree/master/Muhammad-Adil-arch_%2310&lt;/a&gt;) &lt;br&gt;
I chose this project because really like to try different designs for protfolios.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A covid-19 stats web app (&lt;a href="https://github.com/Muhammad-Adil-arch/Covid-19-Stats" rel="noopener noreferrer"&gt;https://github.com/Muhammad-Adil-arch/Covid-19-Stats&lt;/a&gt;)&lt;br&gt;
I chose this project because I had seen many similar web  applications and I wanted to try one.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A simple Contact Management System in C++ (&lt;a href="https://github.com/Muhammad-Adil-arch/Contribute-to-HacktoberFest2020/tree/main/Projects/Contact%20Management%20System" rel="noopener noreferrer"&gt;https://github.com/Muhammad-Adil-arch/Contribute-to-HacktoberFest2020/tree/main/Projects/Contact%20Management%20System&lt;/a&gt;)&lt;br&gt;
I chose this project because I really like to create Console and GUI desktop Applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A Simple C++ Function to swap the values without using temporary variable (&lt;a href="https://github.com/Muhammad-Adil-arch/Hacktoberfest-2020/blob/main/Programs/Swap.cpp" rel="noopener noreferrer"&gt;https://github.com/Muhammad-Adil-arch/Hacktoberfest-2020/blob/main/Programs/Swap.cpp&lt;/a&gt;)&lt;/p&gt;
&lt;h3&gt;
  
  
  Reflections
&lt;/h3&gt;



&lt;p&gt;Overall, my Hactoberfest experience was really great. I learned alot new things like how to clone a repository and then contribute in it. This event also showed me that there is alot more things that I need to learn about the latest web and desktop technologies. &lt;br&gt;
Since it was my first hacktoberfest, I will surely participate next year. &lt;br&gt;
Before, Hacktoberfest I hardly had any followers and now I have around 11 followers and I am very happy with it.&lt;br&gt;
For next step, I really want to contribute for the Vue.js Community as the community is growing and it still needs help to grow into a big Open-Source Community like React.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for this great experience.&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
