<?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 Farwabatool on Medium]]></title>
        <description><![CDATA[Stories by Farwabatool on Medium]]></description>
        <link>https://medium.com/@farwabatool600?source=rss-a5a798e27ec0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*oQPboY4GsQISK406</url>
            <title>Stories by Farwabatool on Medium</title>
            <link>https://medium.com/@farwabatool600?source=rss-a5a798e27ec0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 12:11:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@farwabatool600/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[Feign Client in Spring Boot: Simplifying Microservices Communication]]></title>
            <link>https://medium.com/@farwabatool600/feign-client-in-spring-boot-simplifying-microservices-communication-f4aeee144d77?source=rss-a5a798e27ec0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4aeee144d77</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Farwabatool]]></dc:creator>
            <pubDate>Thu, 03 Apr 2025 17:22:38 GMT</pubDate>
            <atom:updated>2025-04-03T17:22:38.965Z</atom:updated>
            <content:encoded><![CDATA[<p>Feign Client in Spring Boot: Simplifying Microservices Communication</p><p>Introduction</p><p>In a microservices architecture, efficient communication between services is crucial. Spring Boot provides multiple ways to achieve this, and Feign Client is one of the most elegant solutions. Feign simplifies RESTful API calls by providing a declarative way to define HTTP clients. In this article, we’ll explore Feign Client, its benefits, and how to implement it in a Spring Boot application.</p><p>---</p><p>What is Feign Client?</p><p>Feign is a Java HTTP client developed by Netflix and integrated into the Spring Cloud ecosystem. It allows developers to create REST clients using simple Java interfaces, eliminating the need for boilerplate code. Feign automatically handles request serialization, response deserialization, and load balancing when combined with Spring Cloud components like Ribbon and Eureka.</p><p>Why Use Feign?</p><p>Declarative HTTP Calls: No need to write complex RestTemplate or WebClient code.</p><p>Built-in Load Balancing: When used with Ribbon, it can distribute requests among multiple instances.</p><p>Resilience &amp; Fault Tolerance: Integrates with Hystrix to handle failures gracefully.</p><p>Interceptor &amp; Logging Support: Customize request headers, logging, and error handling.</p><p>---</p><p>Setting Up Feign Client in Spring Boot</p><p>Step 1: Add Dependencies</p><p>To use Feign in a Spring Boot project, add the following dependencies to your pom.xml:</p><p>&lt;dependency&gt;<br> &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;<br> &lt;artifactId&gt;spring-cloud-starter-openfeign&lt;/artifactId&gt;<br>&lt;/dependency&gt;</p><p>If you&#39;re using Gradle, add this to build.gradle:</p><p>dependencies {<br> implementation &#39;org.springframework.cloud:spring-cloud-starter-openfeign&#39;<br>}</p><p>Step 2: Enable Feign Client</p><p>In your Spring Boot application class, enable Feign with the @EnableFeignClients annotation:</p><p>@SpringBootApplication<br>@EnableFeignClients<br>public class FeignClientApplication {<br> public static void main(String[] args) {<br> SpringApplication.run(FeignClientApplication.class, args);<br> }<br>}</p><p>Step 3: Create a Feign Client Interface</p><p>Define an interface to specify how Feign should make API calls.</p><p>@FeignClient(name = &quot;user-service&quot;, url = &quot;http://localhost:8081&quot;)<br>public interface UserClient {<br> <br> @GetMapping(&quot;/users/{id}&quot;)<br> User getUserById(@PathVariable(&quot;id&quot;) Long id);<br>}</p><p>The @FeignClient annotation declares this interface as a Feign client.</p><p>The url attribute specifies the base URL of the service.</p><p>The method uses standard Spring MVC annotations (@GetMapping, @PathVariable) to define the API request.</p><p>Step 4: Use Feign Client in a Service</p><p>Inject the Feign client into a service class and use it to call external APIs.</p><p>@Service<br>public class UserService {<br> <br> private final UserClient userClient;<br> <br> @Autowired<br> public UserService(UserClient userClient) {<br> this.userClient = userClient;<br> }<br> <br> public User fetchUser(Long id) {<br> return userClient.getUserById(id);<br> }<br>}</p><p>Step 5: Configure Feign (Optional)</p><p>Feign provides various configuration options such as timeout settings, logging, and interceptors.</p><p>Set Timeout Properties in application.yml</p><p>feign:<br> client:<br> config:<br> default:<br> connectTimeout: 5000 # 5 seconds<br> readTimeout: 10000 # 10 seconds</p><p>Enable Feign Logging</p><p>logging:<br> level:<br> feign: DEBUG</p><p>Add Request Interceptor</p><p>You can customize Feign requests by adding interceptors.</p><p>@Component<br>public class FeignRequestInterceptor implements RequestInterceptor {<br> <br> @Override<br> public void apply(RequestTemplate template) {<br> template.header(&quot;Authorization&quot;, &quot;Bearer some-token&quot;);<br> }<br>}</p><p>---</p><p>Advanced Feign Features</p><p>Feign with Eureka (Service Discovery)</p><p>If you&#39;re using Spring Cloud Eureka, you can define a Feign client without specifying the url. Feign will automatically resolve the service using Eureka.</p><p>@FeignClient(name = &quot;user-service&quot;)<br>public interface UserClient {<br> @GetMapping(&quot;/users/{id}&quot;)<br> User getUserById(@PathVariable(&quot;id&quot;) Long id);<br>}</p><p>Feign with Hystrix (Circuit Breaker)</p><p>To handle failures gracefully, enable Hystrix by adding this dependency:</p><p>&lt;dependency&gt;<br> &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;<br> &lt;artifactId&gt;spring-cloud-starter-netflix-hystrix&lt;/artifactId&gt;<br>&lt;/dependency&gt;</p><p>Then, define a fallback mechanism:</p><p>@FeignClient(name = &quot;user-service&quot;, fallback = UserClientFallback.class)<br>public interface UserClient {<br> @GetMapping(&quot;/users/{id}&quot;)<br> User getUserById(@PathVariable(&quot;id&quot;) Long id);<br>}</p><p>@Component<br>class UserClientFallback implements UserClient {<br> @Override<br> public User getUserById(Long id) {<br> return new User(id, &quot;Fallback User&quot;);<br> }<br>}</p><p>---</p><p>Conclusion</p><p>Spring Boot Feign Client simplifies microservices communication by eliminating boilerplate REST calls. With its declarative approach, built-in support for service discovery, and seamless integration with resilience frameworks like Hystrix, Feign is an essential tool for scalable microservices architecture. By following the steps in this guide, you can efficiently implement and optimize Feign in your Spring Boot projects.</p><p>Do you use Feign in your applications? Share your thoughts in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4aeee144d77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jetpack Compose: Modern UI Toolkit for Android Development]]></title>
            <link>https://medium.com/@farwabatool600/jetpack-compose-modern-ui-toolkit-for-android-development-db359333b583?source=rss-a5a798e27ec0------2</link>
            <guid isPermaLink="false">https://medium.com/p/db359333b583</guid>
            <category><![CDATA[câmera]]></category>
            <category><![CDATA[andriod-apps]]></category>
            <category><![CDATA[how-to-learn-jetpack]]></category>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[jetpack]]></category>
            <dc:creator><![CDATA[Farwabatool]]></dc:creator>
            <pubDate>Thu, 20 Mar 2025 11:09:31 GMT</pubDate>
            <atom:updated>2025-03-20T11:09:31.219Z</atom:updated>
            <content:encoded><![CDATA[<p>Jetpack Compose is Google’s modern UI toolkit for building native Android applications. It simplifies UI development with a declarative approach, reducing boilerplate code and improving readability. In this blog, we will explore Jetpack Compose with coding examples to get you started.</p><h3>Why Jetpack Compose?</h3><ol><li><strong>Declarative UI</strong>: Compose allows developers to define UI components using functions, making it easy to understand and modify.</li><li><strong>Less Boilerplate</strong>: Compared to XML-based layouts, Compose reduces the amount of code required.</li><li><strong>State Management</strong>: Built-in support for state handling makes UI updates efficient.</li><li><strong>Interoperability</strong>: Works seamlessly with existing Views and ViewModels.</li><li><strong>Faster Development</strong>: Live Preview and Hot Reload accelerate the development process.</li></ol><h3>Setting Up Jetpack Compose</h3><p>To use Jetpack Compose in your Android project, update your build.gradle file:</p><h3>Creating a Simple UI with Jetpack Compose</h3><p>Let’s create a basic UI using Compose:</p><h3>Creating a Camera App with Jetpack Compose</h3><p>Let’s create a simple camera app using Jetpack Compose and CameraX:</p><h3>Add Dependencies</h3><p>In your build.gradle file, add the following dependencies:</p><h3>Camera Preview in Compose</h3><h3>Using CameraPreview in UI</h3><p><a href="http://twitter.com/Composable">@Composable</a><br>fun CameraScreen(context: Context) {<br> Column(modifier = Modifier.fillMaxSize()) {<br> CameraPreview(modifier = Modifier.weight(1f), context = context)<br> }<br>}</p><h3>Calling CameraScreen in MainActivity</h3><p>To display the camera preview when the app starts, modify your MainActivity:</p><pre>class MainActivity : ComponentActivity() {<br>    override fun onCreate(savedInstanceState: Bundle?) {<br>        super.onCreate(savedInstanceState)<br>        setContent {<br>            CameraScreen(context = this)<br>        }<br>    }<br>}</pre><h3>Understanding the Code</h3><ul><li><strong>CameraX API</strong>: Used to access the device camera.</li><li><strong>CameraProvider</strong>: Manages camera lifecycle.</li><li><strong>Preview</strong>: Displays the camera output.</li><li><strong>AndroidView</strong>: Embeds a traditional Android View inside a Compose UI.</li></ul><h3>Conclusion</h3><p>Jetpack Compose makes Android UI development easier and more efficient with its declarative syntax, powerful state management, and reduced boilerplate code. Additionally, integrating CameraX with Compose allows developers to create camera applications with minimal effort. Start using Jetpack Compose today to build modern, scalable Android applications!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db359333b583" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Journey as a Developer: From Learning to Building Scalable Solutions]]></title>
            <link>https://medium.com/@farwabatool600/my-journey-as-a-developer-from-learning-to-building-scalable-solutions-f090e07cbfc4?source=rss-a5a798e27ec0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f090e07cbfc4</guid>
            <category><![CDATA[andriod-developer]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[backend-developer]]></category>
            <dc:creator><![CDATA[Farwabatool]]></dc:creator>
            <pubDate>Mon, 17 Mar 2025 07:09:01 GMT</pubDate>
            <atom:updated>2025-03-17T07:09:01.814Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>When I started my journey as a developer, I was fascinated by how technology could solve real-world problems. Over time, I transitioned from learning the basics of programming to building scalable applications, working with Android development, backend technologies, and microservices. In this blog, I’ll share my experience, the projects I’ve worked on, and the technologies I’ve explored.</p><h3>Getting Started: The Learning Phase</h3><p>I began my development journey with core Java and gradually moved into Android development. My early projects were simple mobile applications, but as I gained experience, I started working with more complex architectures like MVVM, Jetpack Compose, and Retrofit.</p><p>On the backend side, I explored Spring Boot, MyBatis, and REST APIs, which allowed me to create scalable solutions. Over time, I learned about microservices, Quartz Scheduler for batch processing, and cloud deployments using Docker and Kubernetes.</p><h3>Notable Projects I’ve Built</h3><h3>1. Student Management System (Spring Boot + MyBatis + Quartz Scheduler)</h3><p>This was one of the most impactful projects I worked on. It involved managing student data, scheduling batch processes, and handling real-time updates.</p><p><strong>Tech Stack:</strong></p><ul><li>Spring Boot for backend</li><li>MyBatis for database interaction</li><li>Quartz Scheduler for batch processing</li><li>NFS storage for handling large file uploads</li></ul><p><strong>Key Learnings:</strong></p><ul><li>Optimizing database queries with MyBatis mappers</li><li>Implementing batch scheduling with Quartz for efficient processing</li><li>Handling file uploads in a distributed environment</li></ul><h3>2. Job Scheduler Service for Image Processing</h3><p>In this project, I built a scheduler to process 100 images per minute and upload them to an NFS drive. The scheduling logic was implemented using Quartz Runner and Cron expressions.</p><p><strong>Challenges Faced &amp; Solutions:</strong></p><ul><li><strong>High Volume Processing:</strong> Used batch processing with Quartz to avoid overloading the system.</li><li><strong>Concurrency Issues:</strong> Optimized job scheduling to ensure seamless execution.</li><li><strong>File Handling:</strong> Implemented efficient NFS storage access to manage large datasets.</li></ul><h3>3. Android Task Management App</h3><p>To improve my Android development skills, I created a task management app using MVVM architecture.</p><p><strong>Features:</strong></p><ul><li>Firebase Authentication for user login</li><li>Room Database for offline storage</li><li>Push notifications for task reminders</li></ul><p><strong>What I Learned:</strong></p><ul><li>Implementing real-time data sync using Firebase</li><li>Writing modular and maintainable Android code</li></ul><h3>The Shift to Microservices</h3><p>As I gained more experience, I moved into microservices development. Working with event-driven architectures and containerization with Docker helped me build highly scalable applications.</p><p>One of my favorite projects was building an <strong>e-commerce backend using Spring Boot microservices</strong>, where I:</p><ul><li>Designed RESTful APIs for product and order management</li><li>Used Swagger and Postman for testing APIs .</li><li>Deployed services using Docker and Kubernetes</li></ul><h3>Lessons Learned in My Developer Journey</h3><ol><li><strong>Never stop learning</strong> — The tech industry evolves fast, and keeping up with new frameworks is essential.</li><li><strong>Hands-on experience matters</strong> — The best way to learn is by building real-world projects.</li><li><strong>Code optimization is key</strong> — Writing efficient code saves time and resources in the long run.</li><li><strong>Contribute to open-source</strong> — Engaging with the developer community helps improve coding skills and networking opportunities.</li></ol><h3>What’s Next?</h3><p>As I continue to grow as a developer, I aim to:</p><ul><li>Deepen my expertise in cloud-native applications</li><li>Explore AI and machine learning integrations in backend services</li><li>Contribute more to open-source projects</li></ul><h3>Conclusion</h3><p>My journey as a developer has been filled with learning, challenges, and achievements. From building Android apps to managing scalable backend solutions, every project has taught me something valuable. I hope sharing my experience inspires other developers to keep building, learning, and growing in this ever-evolving field.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f090e07cbfc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>