<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by mehrdad Ss on Medium]]></title>
        <description><![CDATA[Stories by mehrdad Ss on Medium]]></description>
        <link>https://medium.com/@mehrdadmmb2?source=rss-7e4cf9c9f02------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_KI6jfV2C14VkY4UvgzzAQ.jpeg</url>
            <title>Stories by mehrdad Ss on Medium</title>
            <link>https://medium.com/@mehrdadmmb2?source=rss-7e4cf9c9f02------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:14:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mehrdadmmb2/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Say Goodbye to the Cluttered Application Class!]]></title>
            <link>https://medium.com/@mehrdadmmb2/say-goodbye-to-the-cluttered-application-class-609d502ecc07?source=rss-7e4cf9c9f02------2</link>
            <guid isPermaLink="false">https://medium.com/p/609d502ecc07</guid>
            <category><![CDATA[android-performance]]></category>
            <category><![CDATA[android-jetpack]]></category>
            <category><![CDATA[android-architecture]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-development]]></category>
            <dc:creator><![CDATA[mehrdad Ss]]></dc:creator>
            <pubDate>Mon, 09 Jun 2025 08:03:29 GMT</pubDate>
            <atom:updated>2025-06-09T08:03:29.263Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tVd_WAhsNmavP7_cdkm68g.png" /></figure><p>If you’re an Android developer, you’re likely familiar with this scene: your Application.kt file has become a monstrous entity, filled with calls to Analytics.init(), Logger.init(), Database.init(), and dozens of other initialization methods. It&#39;s code that&#39;s hard to maintain, its execution order is fragile, and its impact on your app&#39;s startup time is uncertain.</p><p>But what if I told you there’s a better way? A modern, efficient, and Google-endorsed solution that not only eliminates this clutter but also significantly improves your app’s startup speed.</p><p>Meet the <strong>androidx.startup</strong> library.</p><p>The Old Problem: Why the Application Class Is No Longer Enough</p><p>Using the onCreate() method in a custom Application class has been a common solution for years. But as projects grow, its disadvantages become glaringly obvious:</p><ul><li><strong>No Dependency Management:</strong> If your analytics library needs your logger to be ready first, you have to manually ensure the call order. This process is brittle and error-prone.</li><li><strong>Unclear Responsibility:</strong> The logic for initializing a library is forced into the Application class, rather than being encapsulated within the library itself.</li><li><strong>Performance Hits:</strong> In the past, many libraries used their own ContentProvider for automatic initialization. Having multiple ContentProviders in your app was a key factor in slow startup times due to the heavy overhead of creating each one.</li></ul><p>The Modern Solution: androidx.startup.Initializer</p><p>The App Startup library solves these issues by introducing a simple yet powerful interface: Initializer&lt;T&gt;. Each Initializer is a small, self-contained set of instructions for launching a single component. It has two key methods:</p><ul><li>create(context: Context): T: The heart of the Initializer. All your component&#39;s initialization logic goes here.</li><li>dependencies(): List&lt;Class&lt;out Initializer&lt;*&gt;&gt;&gt;: The real magic happens here. This is where you declare which other Initializers must run <em>before</em> this one.</li></ul><h3>Let’s See a Practical Example: Initializing Timber</h3><h3>Let’s See a Practical Example: Initializing Timber</h3><p>Suppose we want to initialize the popular logging library, Timber, using App Startup.</p><p><strong>Step 1: Add the Dependency</strong> Add the library dependency to your build.gradle file:</p><pre>implementation(&quot;androidx.startup:startup-runtime:1.1.1&quot;)</pre><p><strong>Step 2: Create the </strong><strong>Initializer</strong> Create a new class to initialize Timber:</p><pre>import android.content.Context<br>import androidx.startup.Initializer<br>import timber.log.Timber<br>// We use Unit because this Initializer just performs an action and returns no result.<br>class TimberInitializer : Initializer&lt;Unit&gt; {<br>// The initialization logic goes here.<br> override fun create(context: Context) {<br> if (BuildConfig.DEBUG) {<br> Timber.plant(Timber.DebugTree())<br> Timber.d(&quot;TimberInitializer has been initialized.&quot;)<br> }<br> }<br>// This Initializer has no other dependencies.<br> override fun dependencies(): List&lt;Class&lt;out Initializer&lt;*&gt;&gt;&gt; {<br> return emptyList()<br> }<br>}</pre><p><strong>Step 3: Register in </strong><strong>AndroidManifest.xml</strong> Now, we introduce our Initializer to the system:</p><pre>&lt;provider<br>    android:name=&quot;androidx.startup.InitializationProvider&quot;<br>    android:authorities=&quot;${applicationId}.androidx-startup&quot;<br>    android:exported=&quot;false&quot;<br>    tools:node=&quot;merge&quot;&gt;<br><br>    &lt;meta-data<br>        android:name=&quot;com.example.myapp.TimberInitializer&quot;<br>        android:value=&quot;androidx.startup&quot; /&gt;<br><br>&lt;/provider&gt;</pre><p>And that’s it! It’s that simple. Timber will now be initialized automatically, efficiently, and at the earliest possible moment.</p><h3>What Happens Behind the Scenes &amp; Why Is It Faster?</h3><p>You might be wondering, how does this actually improve speed? The answer lies in one component: <strong>InitializationProvider</strong>.</p><p>Instead of each library having its own costly ContentProvider, the App Startup library uses a <strong>single, shared </strong><strong>ContentProvider</strong>. At startup, this provider discovers all registered Initializers in the manifest, builds a dependency graph, and then executes them in the correct, optimized order.</p><blockquote><strong><em>Simple Analogy:</em></strong><em> It’s like sending one delivery truck with an optimized route for 10 packages, instead of sending 10 separate trucks for each package. The overhead cost is paid only once.</em></blockquote><h3>The Real Power: Dependency Management and Lazy Initialization</h3><p>The beauty of App Startup truly shines when your libraries depend on each other. Simply declare the dependency in the dependencies() method, and the library handles the rest.</p><pre>class AnalyticsInitializer : Initializer&lt;AnalyticsLibrary&gt; {<br>    // ...<br>    override fun dependencies(): List&lt;Class&lt;out Initializer&lt;*&gt;&gt;&gt; {<br>        // Guarantees that TimberInitializer always runs before this.<br>        return listOf(TimberInitializer::class.java)<br>    }<br>}</pre><p>Furthermore, you can opt any Initializer out of automatic startup and invoke it &quot;lazily&quot; when needed. This is perfect for components that you don&#39;t always need right at the beginning.</p><h3>Conclusion: Why You Should Migrate Today</h3><p>Using androidx.startup isn&#39;t just a choice; it&#39;s a smart step toward modern Android development. The benefits are clear:</p><ul><li><strong>Faster Startup Times:</strong> Reduce startup overhead by eliminating multiple ContentProviders.</li><li><strong>Clean and Modular Code:</strong> Initialization logic is encapsulated where it belongs, not in your Application class.</li><li><strong>Guaranteed Dependency Order:</strong> Say goodbye to fragile, manual ordering of init() calls.</li><li><strong>Lazy and Efficient Initialization:</strong> Only consume resources when you actually need them.</li></ul><p>It’s time to say goodbye to the cluttered Application class and take control of your app&#39;s startup process the smart way. The App Startup library is waiting for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=609d502ecc07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ VisionMatch — An Open Source AI-Powered Image Search Tool]]></title>
            <link>https://medium.com/@mehrdadmmb2/visionmatch-an-open-source-ai-powered-image-search-tool-3f16f022ce97?source=rss-7e4cf9c9f02------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f16f022ce97</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[mehrdad Ss]]></dc:creator>
            <pubDate>Sun, 20 Apr 2025 07:47:19 GMT</pubDate>
            <atom:updated>2025-04-20T07:47:19.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>🔍 VisionMatch — An Open Source AI-Powered Image Search Tool</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*veAFbE0d3QnKn0u5c8UbLg.gif" /></figure><p>Have you ever wondered how platforms find similar images from a huge dataset?<br> Well, I recently built a simple yet powerful <strong>image similarity search tool</strong> using the help of modern <strong>AI tools</strong> — without being an AI expert myself!</p><h3>🚀 What is VisionMatch?</h3><p><strong>VisionMatch</strong> is an open-source project that allows you to upload an image and find similar images from a local dataset using <strong>AI-powered feature extraction and comparison</strong>.</p><p>It’s a lightweight, beginner-friendly solution for anyone curious about how reverse image search works — without needing to know deep machine learning.</p><h3>💡 How It Works</h3><ul><li>Upload an image via a simple frontend.</li><li>The image is processed and converted into a vector representation using a pre-trained AI model.</li><li>The system searches through a local database of indexed images and finds the most similar ones.</li></ul><p>All running <strong>locally</strong> — no cloud, no API keys, no hidden fees.</p><h3>🌟 Why I Built This</h3><p>I’m not a data scientist or machine learning engineer.<br> I’m just someone who loves experimenting with technology.<br> Thanks to open source tools like FastAPI, Transformers, and Faiss, I was able to build this project in just a few days.</p><p>If I can do it, so can you.</p><h3>📂 GitHub Repository</h3><p>You can find the full project with setup instructions here:<br> 👉 <a href="https://github.com/mehrdadmmb2/VisionMatch-similar-image-search-ai">https://github.com/mehrdadmmb2/VisionMatch-similar-image-search-ai</a></p><h3>❤️ Support the Project</h3><p>If you find this project useful, consider showing support:</p><ul><li>⭐ Star the repo on GitHub</li><li>💰 Donate with <strong>Tether (USDT)</strong> or <strong>Bitcoin (BTC)</strong> — links in the GitHub README</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f16f022ce97" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[مقایسه ی React native، Xamarin، Flutter و Ionic]]></title>
            <link>https://medium.com/@mehrdadmmb2/%D9%85%D9%82%D8%A7%DB%8C%D8%B3%D9%87-%DB%8C-react-native-xamarin-flutter-%D9%88-ionic-17c1003e8acb?source=rss-7e4cf9c9f02------2</link>
            <guid isPermaLink="false">https://medium.com/p/17c1003e8acb</guid>
            <category><![CDATA[ری-اکت]]></category>
            <category><![CDATA[مقایسه-ی-فلاتر]]></category>
            <category><![CDATA[آموزش-فلاتر]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[mehrdad Ss]]></dc:creator>
            <pubDate>Fri, 06 Sep 2019 07:22:41 GMT</pubDate>
            <atom:updated>2019-09-06T07:22:41.512Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*J5rsS-2ebZAMoN4fzaWNlw.gif" /></figure><p>سلام مجدد به همه ی همراهان عزیز.</p><p>مدتیه که شرکت های مختلف مدام دارن روش هایی رو ارائه میدن که برنامه نویسا بتونن تحت یه کد نویسی واحد برای سیستم عامل های <a href="http://hamyardeveloper.ir/"><strong>Android</strong> </a>و <strong>IOS</strong> کد بزنن. به این شکل که شما به یه زبون خاصی کد مینویسی و بعد برای سیستم عامل دلخواه خروجی میگیری. همیشه دغدغه ی برنامه نویسا مخصوصا برنامه نویس های جوان این بوده که بالاخره کدوم بهتره یا کدوم آینده ی بهتری داره که شروع کنن به یادگیری. توی این مقاله در سایت همیار توسعه دهنده میخوام بین ابزار های ارائه شده یه مقایسه انجام بدم تا بتونه به همه ی کسایی که تو این زمینه مشکل دارن کمک کنه.</p><p>مقایسه ی <strong>React native</strong>، <strong>Xamarin</strong>، <strong>Flutter</strong> و <strong>Ionic</strong> که چهار ابزار معروف ارائه شده از طرف شرکت های مطرح هستن و مدتیه که سر و صدا کردن. البته چند وقت پیش یدونه جدید پیدا کردم به اسم <a href="https://www.nativescript.org/"><strong>Native Script</strong></a> که چون تازه اومده نمیتونم دربارش خیلی نظر بدم. فقط در این حد که میتونید با فریم ورکهای جاوا اسکریپت مثل Vue.js یا Angular اپ های Native با Performance خوب تولید کنید.</p><p><strong>برای درک بهتر مقایسه ها، مطالب رو دسته بندی کردم و از چند جهت مقایسه میکنم:</strong><br><strong>زبان برنامه نویسی، Performance، المنت های استفاده شده در UI، پشتیبانی توسط سازنده یا برنامه نویس های دیگه، کارایی، اپ های نوشته شد و هزینه و Open source بودن.</strong></p><h3>اگر دوست داشتید به وب سایت ما سر بزنید</h3><h3>1- زبان برنامه نویسی</h3><ul><li><strong>React Native</strong>: توی <a href="http://hamyardeveloper.ir/%d9%85%d9%82%d8%a7%db%8c%d8%b3%d9%87-%db%8c-react-native%d8%8c-xamarin%d8%8c-flutter-%d9%88-ionic/">React Native</a> شما بیشتر با جاوا اسکریپت کد میزنید و تماما استاندارد های ES6 رو رعایت میکنید. اگر قبلا با فریم ورک react js کار کرده باشید و به اون مسلط باشید یه نقطه ی قوت بزرگ براتون محسوب میشه و میتونید خیلی سریع پیش برید. همچنین اگر توی گیت هاب کامپوننتی پیدا نکردید و یا قصد دارید از یه کتابخونه ی خاص Native استفاده کنید که برای ری اکت نیتیو وجود نداشت میتونید اون رو توی کد های اندرویدش import کنید و در واقع این تیکه رو به زبان خود java یا Swift یا obj-c کد بزنید.</li><li><strong>Xamarin</strong>: توی زامارین شما باید به زبون C# تحت dot net enviroment کد بزنید که برای برنامه نویس های سی شارپ خیلی خبر خوبیه. مخصوصا اینکه میتونید از Xamarin forms استفاده کنید که البته خوب نیست تو بخش های بعدی بهتون میگم.</li><li><strong>Ionic</strong>: توی ionic شما تماما مثل طراحی سایت به زبون های html,css,js کد میزنید که البته type script هم توش پشتیبانی میشه.</li><li><strong>Flutter</strong>: زبان استفاده شده در فلاتر زبان تازه تاسیس Dart هستش که خیلی شبیه جاواست و برای برنامه نویس هایی که قبلا جاوا کار کردن دستورات خیلی به چشم آشنا میاد.</li></ul><h3>2- Performance</h3><ul><li><strong>React Native</strong>: ری اکت نیتیو از ویو های کاملا نیتیو استفاده میکنه و به لحاظ performance نزدیک به نمونه ی Native کار میکنه و خیلی روون و دلچسبه. اگر بخوایم بهش نمره بدیم میتونیم بگیم حدودا 4 از 5.</li><li><strong>Xamarin</strong>: اگر از Xamarin forms استفاده کنید خیلی پرفرومنس بالایی حس نمیکنید و میشه بهش 3 از 5 داد اما درحالت جدا جدا یعنی android یا ios تقربا چیزی شبیه نیتیو بهتون تحویل میده و میشه بهش 4 از 5 داد..</li><li><strong>Ionic</strong>: بخاطر اینکه کل برنامه ی شما عملا یه وب ویوی سادس نهایتا بشه بهش 2 از 5 داد. واقعا کنده.</li><li><strong>Flutter</strong>: فلاتر از ویوهای اختصاصی خودش استفاده میکنه و اصلا کاری به ویوهای Native نداره. بخاطر همین پردازش های خاص خودش رو هم داره و در نهایت یه پرفرومنس عالی ارائه میده. به نظر میاد خیلی راحت بشه برنده ی این بخش معرفیش کرد و 5 از 5 رو بهش اختصاص داد.</li></ul><h3>3- المنت های طراحی UI</h3><ul><li><strong>React Native</strong>: ری اکت نیتیو از ویوهای کاملا نیتیو استفاده میکنه</li><li><strong>Xamarin</strong>: زامارین با ویوهای کاملا نیتیو کار میکنه</li><li><strong>Ionic</strong>: این دوست عزیز فقط از html , css استفاده میکنه</li><li><a href="http://hamyardeveloper.ir/%d9%85%d9%82%d8%a7%db%8c%d8%b3%d9%87-%db%8c-react-native%d8%8c-xamarin%d8%8c-flutter-%d9%88-ionic/"><strong>Flutter</strong></a>: فلاتر با ویوهای کاملا اختصاصی که اسمشون ویجت هست کار میکنه.</li></ul><h3>4- پشتیبانی ها و مشارکت برنامه نویسان</h3><ul><li><strong>React Native</strong>: بیشترین مشارکت رو توی توسعه از طرف برنامه نویسا داره و برنده ای این بخش با امتیاز 5.</li><li><strong>Xamarin</strong>: مشارکت برنامه نویسا توی توسعه ی زامارین خیلی خوبه و پشتیبانی خوبی هم داره و میشه بهش 3.5 از 5 داد.</li><li><strong>Ionic</strong>: باورم نمیشه که هنوز برنامه نویسا دارن اینو توسعه میدن ولی خوب میشه بهش 3.5 داد.</li><li><strong>Flutter</strong>: فلاتر خیلی معروف نبود اما یه شیب عجیب روبه بالا تو ماه های اخیر باعث شد امتیازی که میخوایم بهش بدیم از 2 به 5 برسه و کنار ری اکت نیتیو قرار بگیره.</li></ul><h3>5- کارایی در طراحی</h3><ul><li><strong>React Native</strong>: با ری اکت نیتیو میتونید 100% اپ هایی که میخواید رو تولید کنید و محدودیت خاصی از این نظر دیگه وجود نداره.</li><li><strong>Xamarin</strong>: زامارین بخاطر محدودیت هایی که داره خیلی نمیشه روش مانور داد و شما میتونید با اون برنامه های ساده بنویسید شاید 80درصد کارایی براتون داشته باشه.</li><li><strong>Ionic</strong>: اینم مثل زامارین فقط میتونه اپ های ساده بهتون بده نهایتا 60 درصد اپ هارو بتونه براتون طراحی کنه.</li><li><strong>Flutter</strong>: فلاتر قدرت بالایی از خودش نشون داده و درست مثل ری اکت میتونید 100% اپلیکیشن ها رو باهاش پیاده سازی کنید</li></ul><h3>6- اپلیکیشن های نوشته شده</h3><ul><li><strong>React Native</strong>: فیسبوک و اینستاگرام بزرگترین برنامه های نوشته شده با ری اکت هستن</li><li><strong>Xamarin</strong>: برنامه های oio,ther world bank و storyo که هیچکدوم هم نمیشناسم با زامارین نوشتن</li><li><strong>Ionic</strong>: برنامه های justwatch و pacifica</li><li><strong>Flutter</strong>: هنوز کسی ریسک آنچنانی سر فلاتر نکرده الان فقط برنامه ی Hamilton رو میشناسم که با فلاتر نوشتن</li></ul><h3>7- هزینه ها</h3><p>همه ی ابزار ها از طرف سازنده به صورت Opern Source ارائه شده و کاملا رایگانن.</p><h3>8- نتیجه</h3><p>میدونم از این جمله بدتون میاد اما مجبورم بازم بگم که کاملا بستگی به خودتون داره. اول و آخر هچکدوم از راه های بالا مثل Native کار کردن نمیشه اما اگر میخواید برید سمت سیستم های Cross Platform روی ری اکت نیتیو و فلاتر تمرکز کنید و وقتتون رو برای بقیه ی موارد تلف نکنید.<br><strong>ترتیب بندی نهایی:<br>1- React Native , Flutter<br>2- Xamarin<br>3- Native Script<br>4- Ionic</strong></p><p>خوب این مقاله هم با پایان رسید. امیدوارم جواب سوالاتتون رو گرفته باشید. اگر ابزار جدیدی ارائه شده که ازش خبر نداشتم توی نظرات بگید و همچنین اگر سوالی نکته ای حرفی حدیثی پانوشتی چیزی دارین حتما نظر بزارید.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17c1003e8acb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>