<?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>DEV Community: Mohammed Taha Khamed </title>
    <description>The latest articles on DEV Community by Mohammed Taha Khamed  (@khamedtaha).</description>
    <link>https://dev.to/khamedtaha</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3326228%2F246871f0-7586-4b50-b576-ea1bce0a95aa.jpeg</url>
      <title>DEV Community: Mohammed Taha Khamed </title>
      <link>https://dev.to/khamedtaha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khamedtaha"/>
    <language>en</language>
    <item>
      <title>Factory Pattern in Django Projects : Why Should You Care?</title>
      <dc:creator>Mohammed Taha Khamed </dc:creator>
      <pubDate>Wed, 12 Aug 2026 09:41:20 +0000</pubDate>
      <link>https://dev.to/khamedtaha/factory-pattern-in-django-projects-why-should-you-care-3mol</link>
      <guid>https://dev.to/khamedtaha/factory-pattern-in-django-projects-why-should-you-care-3mol</guid>
      <description>&lt;p&gt;As Django applications grow, object creation can quickly become scattered across views, services, and models. This is where the Factory Pattern becomes valuable.&lt;br&gt;
Instead of creating objects directly, delegate the creation process to a dedicated factory. This makes your code cleaner, more maintainable, and easier to extend.&lt;br&gt;
Example use cases in Django:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating different notification providers (Email, SMS, Push)&lt;/li&gt;
&lt;li&gt;Selecting payment gateways (Stripe, PayPal, Chargily...)&lt;/li&gt;
&lt;li&gt;Instantiating AI providers (OpenAI, Gemini, Claude)&lt;/li&gt;
&lt;li&gt;Exporting reports (PDF, Excel, CSV)&lt;/li&gt;
&lt;li&gt;Integrating multiple external APIs
Without Factory:
Multiple if/elif statements everywhere.
Tight coupling between business logic and implementation.
With Factory:
Single responsibility.
Easy to add new providers.
Better testing and dependency management.
Cleaner architecture following SOLID principles.
One of my favorite applications is using a factory to dynamically select services based on configuration, allowing the business logic to remain unchanged when introducing new integrations.
Design Patterns are not just academic concepts—they solve real engineering problems when applied at the right time.
Question for Django developers:
Where have you found the Factory Pattern most useful in your projects?&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>softwareengineering</category>
      <category>django</category>
      <category>python</category>
      <category>backend</category>
    </item>
    <item>
      <title>Google Login in Django : Is It Always the Right Choice ?</title>
      <dc:creator>Mohammed Taha Khamed </dc:creator>
      <pubDate>Sat, 05 Jul 2025 16:15:11 +0000</pubDate>
      <link>https://dev.to/khamedtaha/google-login-in-django-is-it-always-the-right-choice--60o</link>
      <guid>https://dev.to/khamedtaha/google-login-in-django-is-it-always-the-right-choice--60o</guid>
      <description>&lt;p&gt;Google authentication is widely used in modern web apps &lt;br&gt;
and in the Django ecosystem, there's a well-known library called django-allauth that enables this integration.&lt;/p&gt;

&lt;p&gt;But just because it’s popular and powerful, doesn’t mean it’s always the right architectural decision.&lt;/p&gt;

&lt;p&gt;Let’s break it down&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Pros (in the Django context) : &lt;br&gt;
Fast integration with Allauth &lt;br&gt;
Smooth user experience &lt;br&gt;
Improved security &lt;br&gt;
Automatic user creation + login in one step &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cons (especially in Django projects) : &lt;br&gt;
Google-only restriction &lt;br&gt;
Customization in Allauth can get tricky &lt;br&gt;
Conflicts with Django’s built-in permissions system &lt;br&gt;
Third-party dependency &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When to use Google Auth in Django : &lt;br&gt;
B2C platforms (e-commerce, blogs, learning portals) &lt;br&gt;
MVPs and SaaS apps that need rapid onboarding &lt;br&gt;
When user experience and low signup friction is critical &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When not to rely on it : &lt;br&gt;
Internal Systems (universities, HR systems, admin panels) &lt;br&gt;
Your project requires complex, role-based permissions &lt;br&gt;
Your users aren’t in Google’s ecosystem &lt;br&gt;
You’re operating in restricted or offline environments (VPNs, intranets) &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s discuss .&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
