<?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: Safvan P</title>
    <description>The latest articles on DEV Community by Safvan P (@safvan_8).</description>
    <link>https://dev.to/safvan_8</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%2F816151%2F7af5623c-f5e3-422c-a82a-2ff333c9a685.jpeg</url>
      <title>DEV Community: Safvan P</title>
      <link>https://dev.to/safvan_8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/safvan_8"/>
    <language>en</language>
    <item>
      <title>Java Messaging Service ( JMS )</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Mon, 23 Oct 2023 05:56:06 +0000</pubDate>
      <link>https://dev.to/safvan_8/java-messaging-service-jms--2aeb</link>
      <guid>https://dev.to/safvan_8/java-messaging-service-jms--2aeb</guid>
      <description>&lt;p&gt;In today's digital world, communication is at the heart of everything. Computers, like us, have conversations using a language of their own. This secret language is what makes digital magic happen. In the world of Java, the wizard behind these digital conversations is known as JMS (Java Messaging Service). JMS is the key to unlocking seamless digital communication, and in this article, we'll explore JMS in detail. We'll also explore the two primary types of JMS, so you can understand them better.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Need for JMS: Simplifying Digital Conversations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine two friends, Andrew and Bob, who live in different cities. They want to share news and tasks. To achieve this, they exchange letters. In the world of computers, these letters are like messages. But, unlike Andrew and Bob, computers can't simply pass messages from hand to hand. This is where JMS comes in.&lt;/p&gt;

&lt;p&gt;Think of JMS as a trustworthy postal service for computers. It ensures that digital letters, which are actually messages, travel safely and reach their destination in the right order. Just like a postal service takes care of all the logistics, JMS takes care of the complexities of message delivery.&lt;/p&gt;

&lt;p&gt;But let's break down JMS into simpler terms. It mainly involves two roles - the sender, also known as the producer, and the receiver, known as the consumer. The producer creates messages and places them in a virtual mailbox (think of it as an inbox for computers). The consumer retrieves these messages and handles them. This communication can be like a private chat (similar to Andrew sending a letter to Bob) or a broadcast to a group of recipients (like Andrew sending letters to multiple friends).&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Two Primary Types of JMS:&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Point-to-Point Communication:&lt;/strong&gt;
This is the digital equivalent of Andrew sending a letter directly to Bob. In JMS, it's called point-to-point or P2P communication. It's a straightforward, private conversation where one sender and one receiver exchange messages. Just like when you send a text or email to a specific person. Well-known technologies that excel in enabling this one-on-one JMS communication include &lt;strong&gt;Apache ActiveMQ, Solace, IBM MQ,&lt;/strong&gt; and many more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish-Subscribe Communication:&lt;/strong&gt;
Now, let's imagine that Andrew wants to send a message to a whole community of friends. In the digital realm, this is similar to broadcasting a message to a group of people or subscribers. JMS calls this the publish-subscribe model. It's like posting a message on a public bulletin board, and anyone interested can read it. Technologies like &lt;strong&gt;Apache Kafka&lt;/strong&gt; are experts in managing this type of communication.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Magic of Messaging Queues: Enabling Asynchronous Communication&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;But why do we need messaging queues, and what's the big deal about asynchronous communication?&lt;/p&gt;

&lt;p&gt;In our daily lives, we often do multiple tasks simultaneously. For example, you might cook dinner while enjoying your favorite music and checking your phone for messages. These tasks can all happen concurrently. You don't have to wait for one task to finish before starting another. This parallelism is precisely how messaging queues work in distributed applications.&lt;/p&gt;

&lt;p&gt;Let's say you're running an e-commerce platform, and customers from all over the world are placing orders. You want to ensure that your order processing system runs smoothly. Here's where messaging queues come into play. They allow your application to handle multiple tasks at once. When an order comes in, it's added to a queue, like people waiting in line at a ticket counter. Your system can process these orders in the order they arrive. This is the beauty of asynchronous communication. Tasks can progress independently without waiting for each other.&lt;/p&gt;

&lt;p&gt;Famous JMS players like &lt;strong&gt;Apache ActiveMQ&lt;/strong&gt; are your go-to partners for ensuring these orders get processed efficiently, no matter how many come in. These systems maintain the order, manage priorities, and guarantee safe delivery.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Spring Boot: Your Reliable Messaging Assistant&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;But here's the best part: Spring Boot simplifies this whole process. It's like having a super-smart assistant who takes care of all the details, so you can enjoy a seamless conversation.&lt;/p&gt;

&lt;p&gt;Spring Boot's magic lies in its ability to seamlessly integrate with JMS. It provides an easy way to configure message queues and listeners. Just as you open your mailbox to find letters, Spring Boot helps your application fetch messages from JMS queues.&lt;/p&gt;

&lt;p&gt;In summary, JMS is the digital postal service, and Spring Boot is your trusty assistant, making it super easy to send and receive messages. Whether it's one-on-one conversations or broadcasting messages to a community, they work together harmoniously.&lt;/p&gt;

&lt;p&gt;In the next part of our journey, we'll go deeper into one-on-one communication using JMS and Spring Boot. You'll learn how to set up a messaging queue to ensure your digital letters reach their destination safely. So, stay tuned !&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🛡️The Ultimate Defense: Introduction to Spring Security 🔐</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Wed, 30 Aug 2023 02:56:53 +0000</pubDate>
      <link>https://dev.to/safvan_8/the-ultimate-defense-introduction-to-spring-security-9de</link>
      <guid>https://dev.to/safvan_8/the-ultimate-defense-introduction-to-spring-security-9de</guid>
      <description>&lt;p&gt;&lt;em&gt;Last time, we expolored Servlet security and higlighted limitations. Now, let's take a step further and discover how Spring Security emerges as the ultimate solution to overcome these challenges.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In today's digital age, keeping our web applications secure is crucial. Even if companies have strong security measures for their servers, the safety of our web apps remains highly important. This is especially true when our apps are accessible online to everyone, which exposes them to potential risks. 👨‍💻Hackers work tirelessly every day to attempt breaches.&lt;/p&gt;

&lt;p&gt;This is where Spring Security comes in. It offers a robust framework with a lot of features. By simply integrating Spring Security, we're automatically protected against common vulnerabilities like CSRF. Therefore, understanding and implementing Spring Security is of utmost importance. 🌐🔒&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spring Security: What's the Big Deal?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you are aleardy familoar with web development, especially with the Spring framework, you'd know that securing your applications is crucial. And Spring Security is the tool for this job. It’s like having a digital watchman, always alert, ensuring everything's in order. 🕵️‍♂️🔒&lt;/p&gt;

&lt;p&gt;Now, let's understand the important features of Spring Security:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Authentication: Are You Who You Say You Are?&lt;/strong&gt;&lt;br&gt;
When someone tries to access your application, the first thing you'd want to know is if they're really who they claim to be. This process of confirming someone's identity is called authentication. It's like the guard at the entrance of a gated community, asking for an ID card. If you show it, you get in; otherwise, you stay out. &lt;/p&gt;

&lt;p&gt;Spring Security offers tools to do just this. Whether you're developing using Servlet or WebFlux, Spring Security has your back. 🕶️🔑&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Defense Against Dark Arts: Stopping the Bad Guys&lt;/strong&gt;&lt;br&gt;
It's not just about who's coming in; it's also about stopping bad things from happening. Just as a good guard checks for any mischief, Spring Security checks for any sneaky attacks on your application.&lt;/p&gt;

&lt;p&gt;Spring Security offers multiple layers of protection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSRF (Cross-Site Request Forgery):&lt;/strong&gt; Stops attackers from tricking your users into performing actions without their knowledge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Headers:&lt;/strong&gt; Ensures that the communication between your user's browser and your server is secure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Requests:&lt;/strong&gt; Checks that incoming requests are genuine and not from someone trying to harm your app. 🛡️🚫&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Making Friends: Integration with Other Tools&lt;/strong&gt;&lt;br&gt;
Spring Security isn't a lone ranger. It works great with other tools and technologies, enhancing its capabilities. Think of it as a member of a cricket team, where every player has their own specialty but they play best when together.&lt;/p&gt;

&lt;p&gt;Here's a glimpse of its partnerships:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cryptography:&lt;/strong&gt; Secures data by transforming it into a code to prevent unauthorized access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Data:&lt;/strong&gt; Works hand in hand with databases, ensuring only the right data is accessed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Java’s Concurrency APIs:&lt;/strong&gt; Manages multiple tasks at once efficiently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jackson:&lt;/strong&gt; Helps in data binding and converting Java objects to JSON and vice-versa.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Localization:&lt;/strong&gt; Adapts the application for different regions or languages. 🤝🌍&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A Peek into the Digital World&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that we've understood the nuts and bolts of Spring Security, it's evident how invaluable it is in the digital realm. With hackers and cyber threats looming around, tools like Spring Security act as our knights in shining armor. They might seem complex on the outside, but at their heart, they're simple tools designed to keep the bad guys out and let the good guys in.&lt;/p&gt;

&lt;p&gt;Keep exploring, keep learning, and always ensure that your digital treasures are well-guarded. After all, as they say, it's better to be safe than sorry! 🌟🔐🚀&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>springsecurity</category>
      <category>spring</category>
    </item>
    <item>
      <title>Simplifying Servlet Security: Keeping Your Web Apps Safe</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Sat, 26 Aug 2023 05:04:17 +0000</pubDate>
      <link>https://dev.to/safvan_8/simplifying-servlet-security-keeping-your-web-apps-safe-ce0</link>
      <guid>https://dev.to/safvan_8/simplifying-servlet-security-keeping-your-web-apps-safe-ce0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In our digital world, safeguarding web applications is of paramount importance. Imagine your application as a secure vault, and servlet security as the lock that guards it. In this blog post, we'll delve into servlet security step by step and explore the power of various authentication methods that ensure the safety of both our applications and users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Servlet Security
&lt;/h2&gt;

&lt;p&gt;Imagine having created an impressive web application. Now, how can you ensure that only authorized individuals access it? This is where &lt;strong&gt;authentication&lt;/strong&gt; comes into play – think of it as a secret passphrase granting you access to an exclusive club. Your application wants to confirm your identity before granting you entry.&lt;/p&gt;

&lt;p&gt;To implement the first three authentication methods, you'll need to add the following to your &lt;code&gt;tomcat-users.xml&lt;/code&gt; file, usually found in Tomcat's &lt;code&gt;conf&lt;/code&gt; directory:&lt;/p&gt;

&lt;p&gt;this will act as security realm (authentication pprovider)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;role&lt;/span&gt; &lt;span class="na"&gt;rolename=&lt;/span&gt;&lt;span class="s"&gt;"ADMIN"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;role&lt;/span&gt; &lt;span class="na"&gt;rolename=&lt;/span&gt;&lt;span class="s"&gt;"CUSTOMER"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;role&lt;/span&gt; &lt;span class="na"&gt;rolename=&lt;/span&gt;&lt;span class="s"&gt;"CLERK"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;user&lt;/span&gt; &lt;span class="na"&gt;username=&lt;/span&gt;&lt;span class="s"&gt;"safvan"&lt;/span&gt; &lt;span class="na"&gt;password=&lt;/span&gt;&lt;span class="s"&gt;"123"&lt;/span&gt; &lt;span class="na"&gt;roles=&lt;/span&gt;&lt;span class="s"&gt;"CUSTOMER"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;user&lt;/span&gt; &lt;span class="na"&gt;username=&lt;/span&gt;&lt;span class="s"&gt;"user1"&lt;/span&gt; &lt;span class="na"&gt;password=&lt;/span&gt;&lt;span class="s"&gt;"123"&lt;/span&gt; &lt;span class="na"&gt;roles=&lt;/span&gt;&lt;span class="s"&gt;"CLERK"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;user&lt;/span&gt; &lt;span class="na"&gt;username=&lt;/span&gt;&lt;span class="s"&gt;"admin"&lt;/span&gt; &lt;span class="na"&gt;password=&lt;/span&gt;&lt;span class="s"&gt;"^*&amp;amp;^*&amp;amp;hghsd"&lt;/span&gt; &lt;span class="na"&gt;roles=&lt;/span&gt;&lt;span class="s"&gt;"ADMIN,CUSTOMER"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Different Approaches to Verification
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. BASIC Authentication: Simplicity at Its Best
&lt;/h3&gt;

&lt;p&gt;Consider &lt;strong&gt;BASIC authentication&lt;/strong&gt; as a friendly doorman who asks for your name and password. It's like saying, "Hey, I recognize you! Come on in." However, bear in mind that this method is suitable for non-sensitive information.&lt;/p&gt;

&lt;p&gt;In BASIC Authentication, the client sends a request containing the username and password in plain text. The server responds with the requested information or an error. The syntax for BASIC Authentication is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;Authorization: Basic &amp;lt;base64-encoded(username:password)&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since the username and password are base64 encoded, this method is not recommended for real-world applications due to security concerns.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. DIGEST Authentication: A Secure Puzzle
&lt;/h3&gt;

&lt;p&gt;Next, we have &lt;strong&gt;DIGEST authentication&lt;/strong&gt;. Imagine sending a secret message that gets scrambled before being sent. The recipient deciphers it and verifies your identity. It's like a puzzle only you and the server can solve, ensuring your secrets remain secure.&lt;/p&gt;

&lt;p&gt;DIGEST Authentication is a more intricate form of authentication. The client initiates a request to the server, which responds with a nonce (a one-time-use number) and requests the client's authentication. The client then responds with the nonce and an encrypted version of the username, password, and realm (a hash). The server validates the client hash against its own hash, and either provides the requested information or returns an error if the hashes don't match.&lt;/p&gt;

&lt;p&gt;To configure DIGEST Authentication in a Java Servlet application, add the following to your &lt;code&gt;web.xml&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;security-constraint&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;web-resource-collection&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- Define your secure URLs here --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;url-pattern&amp;gt;&lt;/span&gt;/secure-path/*&lt;span class="nt"&gt;&amp;lt;/url-pattern&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/web-resource-collection&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;auth-constraint&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;role-name&amp;gt;&lt;/span&gt;ROLE_MANAGER&lt;span class="nt"&gt;&amp;lt;/role-name&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/auth-constraint&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/security-constraint&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;login-config&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;auth-method&amp;gt;&lt;/span&gt;DIGEST&lt;span class="nt"&gt;&amp;lt;/auth-method&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;realm-name&amp;gt;&lt;/span&gt;myrealm&lt;span class="nt"&gt;&amp;lt;/realm-name&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/login-config&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep in mind that DIGEST Authentication should be used over a secure connection due to its vulnerabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. FORM Authentication: Your Personalized Access Card
&lt;/h3&gt;

&lt;p&gt;Now, envision &lt;strong&gt;FORM authentication&lt;/strong&gt; as a personalized invitation to an exclusive event. You fill in your details on the invitation card, and the app welcomes you stylishly. Developers have the flexibility to craft an appealing login page and manage errors gracefully.&lt;/p&gt;

&lt;p&gt;FORM Authentication involves sending user credentials within the body of a POST request. This method is widely used for web applications:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"color:red;text-align:center;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Login Page&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"j_security_check"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;table&lt;/span&gt; &lt;span class="na"&gt;border=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;bgcolor=&lt;/span&gt;&lt;span class="s"&gt;"cyan"&lt;/span&gt; &lt;span class="na"&gt;align=&lt;/span&gt;&lt;span class="s"&gt;"center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;Username:&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"j_username"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;Password:&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"j_password"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&lt;/span&gt; &lt;span class="na"&gt;colspan=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Login"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. CLIENT-CERT Authentication: The Digital Passport
&lt;/h3&gt;

&lt;p&gt;Have you heard of &lt;strong&gt;CLIENT-CERT authentication&lt;/strong&gt;? It's like having a digital passport. Instead of a password, you present your digital certificate – a unique ID only you possess. The server verifies it, and upon confirmation, grants you access. This method is ideal for confidential transactions, such as sharing credit card information.&lt;/p&gt;

&lt;p&gt;CLIENT-CERT Authentication involves the client providing a digital certificate for authentication. The server then validates this certificate to ensure its legitimacy.&lt;/p&gt;

&lt;p&gt;To create Digital certificate using JDK supplied tool (key tool)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OTLe2SW6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dp721utkig1c0abyc2p0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OTLe2SW6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dp721utkig1c0abyc2p0.png" alt="Image description" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To configure CLIENT-CERT Authentication, use the &lt;code&gt;keytool&lt;/code&gt; tool provided by the JDK to generate a digital certificate using the RSA algorithm. Here's a sample of how to set it up in the &lt;code&gt;server.xml&lt;/code&gt; configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Connector&lt;/span&gt;
    &lt;span class="na"&gt;protocol=&lt;/span&gt;&lt;span class="s"&gt;"org.apache.coyote.http11.Http11NioProtocol"&lt;/span&gt;
    &lt;span class="na"&gt;port=&lt;/span&gt;&lt;span class="s"&gt;"8443"&lt;/span&gt;
    &lt;span class="na"&gt;maxThreads=&lt;/span&gt;&lt;span class="s"&gt;"150"&lt;/span&gt;
    &lt;span class="na"&gt;SSLEnabled=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;SSLHostConfig&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;Certificate&lt;/span&gt;
            &lt;span class="na"&gt;certificateKeystoreFile=&lt;/span&gt;&lt;span class="s"&gt;"/path/to/mykeystore.keystore"&lt;/span&gt;  &lt;span class="err"&gt;&amp;lt;!--&lt;/span&gt; &lt;span class="err"&gt;Default:&lt;/span&gt; &lt;span class="err"&gt;{user.home}/.keystore&lt;/span&gt; &lt;span class="err"&gt;--&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            certificateKeystorePassword="keystore_password"
            type="RSA"/&amp;gt;
    &lt;span class="nt"&gt;&amp;lt;/SSLHostConfig&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/Connector&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Blending Modes for Enhanced Security
&lt;/h3&gt;

&lt;p&gt;The exciting news is that you don't have to stick to just one authentication method. With servlet security, you can combine and match these authentication methods, similar to adding various toppings to a pizza. By using BASIC, DIGEST, FORM, and CLIENT-CERT methods in harmony, you can create a robust shield for your application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Essential Considerations
&lt;/h3&gt;

&lt;p&gt;While these authentication methods provide trustworthy protection, they do have limitations. For instance, CLIENT-CERT requires server support for HTTPS. Therefore, ensure your digital fortress possesses the necessary tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Drawbacks of Manual Authentication and Authorization
&lt;/h3&gt;

&lt;p&gt;When it comes to manually securing a servlet, there are certain downsides to be aware of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Limited Protection:&lt;/strong&gt; Manual methods might lack advanced security features offered by specialized security frameworks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complexity:&lt;/strong&gt; Implementing manual security can be intricate and prone to errors, especially when managing multiple user roles and permissions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintenance Challenges:&lt;/strong&gt; Manual security can lead to tightly coupled code, complicating maintenance and updates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inconsistent Implementation:&lt;/strong&gt; Manual approaches can result in inconsistent security measures across different parts of the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human Errors:&lt;/strong&gt; Mistakes during implementation can introduce vulnerabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Centralized Management:&lt;/strong&gt; Managing user accounts, roles, and permissions manually becomes complex as the application scales.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited Auditing:&lt;/strong&gt; Manual methods might lack comprehensive auditing and logging features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability Issues:&lt;/strong&gt; As the application grows, manual management becomes more complex and can impact performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expertise Dependence:&lt;/strong&gt; Manual security relies on developer expertise, which can vary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance Challenges:&lt;/strong&gt; Meeting regulatory requirements can be tough without dedicated security frameworks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration Limitations:&lt;/strong&gt; Manual methods might not integrate&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>java</category>
      <category>security</category>
    </item>
    <item>
      <title>How JDBC Paved the Way for Java Frameworks! 🛤️</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Sat, 26 Aug 2023 04:10:58 +0000</pubDate>
      <link>https://dev.to/safvan_8/how-jdbc-paved-the-way-for-java-frameworks-4maf</link>
      <guid>https://dev.to/safvan_8/how-jdbc-paved-the-way-for-java-frameworks-4maf</guid>
      <description>&lt;p&gt;Let's talk about JDBC and its magic in the Java world. &lt;/p&gt;

&lt;p&gt;So, what's JDBC? It's like a messenger. It helps our Java programs talk to databases. It's been around for a long time and has done a lot of good work.&lt;/p&gt;

&lt;p&gt;Because of JDBC:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Starting Point&lt;/strong&gt;: JDBC was one of the first tools for Java to connect with databases. It made a clear path for others to follow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Building Blocks&lt;/strong&gt;: Many of our favorite Java tools and frameworks are built on top of JDBC. Think of JDBC as the foundation stone of a big building.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inspiration&lt;/strong&gt;: By showing how Java can talk to databases, JDBC inspired many to create new and better tools. It's like the first person who made a wheel, and then others made cars and bikes using that idea.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;: With JDBC, we have the freedom to connect to many different databases. This freedom helped others to think big and design flexible tools.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In short, JDBC has been like a guiding light. Because of it, many smart people created great tools for us to work with databases more easily in Java.&lt;/p&gt;

&lt;p&gt;So, even with all the new tools around, it's good to remember and thank JDBC for starting it all!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>java</category>
      <category>springboot</category>
      <category>jdbc</category>
    </item>
    <item>
      <title>Demystifying BDD: A Game-Changer for Software Testing 🎮</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Mon, 21 Aug 2023 16:53:29 +0000</pubDate>
      <link>https://dev.to/safvan_8/demystifying-bdd-a-game-changer-for-software-testing-16ob</link>
      <guid>https://dev.to/safvan_8/demystifying-bdd-a-game-changer-for-software-testing-16ob</guid>
      <description>&lt;p&gt;In the world of programming, sometimes we get lost in tech talk, leaving our buddies who aren't tech wizards scratching their heads. So, let's unpack a cool concept called Behavior Driven Development (BDD) in plain English. Think of it like explaining your favorite game to a friend!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;What's BDD All About? 🤔&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Imagine you're teaching your friend how to play a video game. Before diving into the action, you lay down the game rules:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What's the objective?&lt;br&gt;
    What should happen at different stages?&lt;br&gt;
    What's the winning move?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;BDD is a bit like this. Instead of coding blindly (not literally, of course!), you define precisely how a piece of code should behave.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Breaking It Down: The Game Analogy 🎮&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**Given** - Picture it as the starting point of your game. Your character is loaded, and you're ready to roll.

**When** - This is when the game is in full swing. You're making moves, battling foes, and collecting points.

**Then** - The end goal of the game. You've reached the final level, maybe defeated the boss, and celebrated your victory.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now, translate this to coding, especially with tools like Mockito:&lt;/p&gt;

&lt;p&gt;Given - We set up the initial game conditions.&lt;br&gt;
When - A specific action or event happens in the game.&lt;br&gt;
Then - We expect a particular outcome, just like reaching a winning stage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;A Real-Life Example: The Food Delivery App 🍔&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you're building a food delivery app. A key feature is applying discounts during a food festival.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Given - The app displays regular prices of items.
When - The food festival starts.
Then - Items on the app should show their festival discounts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Using Mockito's BDD features, it's like saying:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;given(menuService.getAllItems()).willReturn(allItems);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
In simple words, you're telling the app that if someone wants to see all the items, it should show the list of items we've set up.&lt;br&gt;
Summing It Up 🎮&lt;/p&gt;

&lt;p&gt;For folks who know programming but are new to Mockito and fancy testing tools, I hope this made BDD crystal clear. It's all about setting the rules for your code, much like explaining the rules of a game. This ensures smooth sailing without any unexpected glitches!&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>discuss</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Exploring the Enchantment of Software Testing: An Easy Guide</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Sun, 20 Aug 2023 11:16:46 +0000</pubDate>
      <link>https://dev.to/safvan_8/exploring-the-enchantment-of-software-testing-an-easy-guide-1i51</link>
      <guid>https://dev.to/safvan_8/exploring-the-enchantment-of-software-testing-an-easy-guide-1i51</guid>
      <description>&lt;p&gt;Have you ever watched a movie and wondered how those high-flying stunts are performed? Well, testing in software development is a bit like having stunt doubles for your code. Let's dive into this exciting world of testing and unveil the mystery behind it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's this "Testing" Thing, Anyway?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you're baking a cake. You wouldn't just throw the ingredients together and hope for the best, right? You'd taste a bit of the batter before baking it to make sure it's turning out delicious. That's testing in the software world – making sure your code works as expected before sharing it with the world.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&amp;gt; Introducing Test Doubles: Your Secret Actors&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In movies, stunt doubles step in for actors during risky scenes. Similarly, in software testing, we have "test doubles" that replace real parts of our code when things get complicated. Just like a stunt double keeps actors safe, test doubles keep our code safe by letting us test it in controlled environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Different Types of Test Doubles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) Fake:&lt;/p&gt;

&lt;p&gt;Stunt doubles in movies for dangerous scenes instead of the main actors. For instance, you might replace a real database with an in-memory database to make your tests faster and simpler.&lt;/p&gt;

&lt;p&gt;2)Dummy: &lt;/p&gt;

&lt;p&gt;Picture having extras on a movie set who don't say anything. Dummies are objects we put in our tests that don't really matter but keep the scene realistic.&lt;/p&gt;

&lt;p&gt;3)Stub: &lt;/p&gt;

&lt;p&gt;Think of an actor delivering lines as scripted in a play. A stubbed method is like giving our code hardcoded answers during testing. It helps us see how our code reacts to different situations.&lt;/p&gt;

&lt;p&gt;4) Spy:&lt;/p&gt;

&lt;p&gt;Ever seen a detective gathering evidence undercover? That's a spy. In testing, a spy watches and records interactions between parts of our code. It's like being the detective of our software.&lt;/p&gt;

&lt;p&gt;5) Mock: Think of a play director guiding actors to perform perfectly. Mocks let us set up expectations for how our code should behave. They help us ensure that our code does what it's supposed to do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Do We Need Test Doubles?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine a recipe that needs an ingredient from the moon – not easy, right? Similarly, some parts of our code depend on things that are hard to use in tests, like real databases or networks. Test doubles step in and make our tests achievable, just like stunt doubles make action scenes achievable.&lt;/p&gt;

&lt;p&gt;If you're interested in delving further into software testing and related topics, feel free to follow me or stay tuned for more insightful content.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>testing</category>
      <category>programming</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Navigating Code Testing Waters with Mockito: Your Testing Crew for Smooth Sailing</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Sat, 19 Aug 2023 08:17:41 +0000</pubDate>
      <link>https://dev.to/safvan_8/navigating-code-testing-waters-with-mockito-your-testing-crew-for-smooth-sailing-3hgk</link>
      <guid>https://dev.to/safvan_8/navigating-code-testing-waters-with-mockito-your-testing-crew-for-smooth-sailing-3hgk</guid>
      <description>&lt;p&gt;Imagine you're the captain of a ship, and you need to make sure it sails smoothly in any weather. This ship is like your code, and you want to test it to be sure it works well. That's where Mockito comes in – it's like having a helpful crew that makes testing easier.&lt;/p&gt;

&lt;p&gt;The Captain's Worry:&lt;/p&gt;

&lt;p&gt;When you're testing, you want to focus on your code's behavior, not on outside systems it relies on. But what if those outside systems are not ready or behaving strangely? It's like trying to sail your ship without a working compass or wind!&lt;/p&gt;

&lt;p&gt;Enter Mockito, Your Crew:&lt;/p&gt;

&lt;p&gt;Mockito is like having a team of crew members who create pretend versions of those outside systems. These pretend versions, or "mocks," act just like the real systems, even when the real ones are not ready or misbehaving.&lt;/p&gt;

&lt;p&gt;The Ship Sails Smoothly:&lt;/p&gt;

&lt;p&gt;With Mockito, you can test your code as if everything is working perfectly, even when it's not. Just like your crew can simulate a working compass and wind to help your ship sail smoothly, Mockito's mocks simulate those outside systems for your code.&lt;/p&gt;

&lt;p&gt;So, think of Mockito as your testing companion, making sure your code's journey is free of obstacles, just like a captain's crew ensures the ship's journey is trouble-free. It's like having your own secret weapon to conquer testing challenges!&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>testing</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🍽️ Enhanicing a Restaurant with Microservices Architecture! 🍽️</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Mon, 17 Jul 2023 11:50:22 +0000</pubDate>
      <link>https://dev.to/safvan_8/enhanicing-a-restaurant-with-microservices-architecture-2df9</link>
      <guid>https://dev.to/safvan_8/enhanicing-a-restaurant-with-microservices-architecture-2df9</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JMzMCLKA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75mneog9kq0fksbld6ov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JMzMCLKA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75mneog9kq0fksbld6ov.png" alt="Image description" width="800" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine you're running a busy restaurant with different departments, each offering its own special dishes. 🏙️ Now, let's see how Microservices Architecture can totally transform the way your restaurant works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;📋 Service Registry (Restaurant Reservation System):&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Just like a reservation system at the restaurant's front desk, the Service Registry keeps track of all the specialized staff members (microservices) available in your restaurant. Each staff member has a unique role, like a chef, bartender, waiter, and dessert expert. When a new staff member joins or changes their expertise, you update the reservation system, ensuring smooth coordination and excellent service.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;👩‍🍳 Micro-Services (Specialized Staff):&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think of each specialized staff member in your restaurant as a microservice. The chef expertly prepares mouthwatering dishes, the bartender crafts delightful cocktails, the waiter ensures impeccable service, and the dessert expert creates delectable sweets. Each staff member focuses on their own area of expertise, just like microservices handle specific tasks in your restaurant.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;🚪 API Gateway (Restaurant Host/Hostess):&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The API Gateway acts as the restaurant's host/hostess and main service counter at the entrance. 🎉 Customers (clients) walk in, place their orders at the main service counter, and the host/hostess (API Gateway) greets them, arranges their seating, and guides each customer to the right specialized staff member (microservice) based on their preferences and needs.&lt;/p&gt;

&lt;p&gt;🌟 The Magic of Microservices:🌟&lt;/p&gt;

&lt;p&gt;With Microservices Architecture in place, your restaurant flourishes with efficiency, scalability, and seamless teamwork:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🚀 Speedy Service &amp;amp; Smooth Operations: Specialized staff members (microservices) work independently, reducing wait times and providing faster service to customers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🎯 Efficient Use of Resources: Each microservice focuses on its specific job, optimizing resource usage and ensuring top-quality in every aspect.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🔁 Flexibility &amp;amp; Creativity: Your restaurant can easily adapt to changing trends and customer demands. New dishes, cocktails, and services can be added or modified without any hassle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;💼 Freedom for Teams &amp;amp; Better Collaboration: Just like each staff member excels in their role, your development teams can work independently on microservices. This autonomy boosts innovation and fosters excellent teamwork, resulting in outstanding outcomes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, the next time your customers enjoy a delightful dining experience at your restaurant, they'll know that you've embraced Microservices Architecture to create an amazing feast! 🍴&lt;/p&gt;

&lt;h1&gt;
  
  
  Microservices #SoftwareArchitecture #RestaurantAnalogy #Efficiency #Scalability #Innovation #Teamwork #TechnologyTrends #CustomerExperience #DevelopmentParadigm
&lt;/h1&gt;

</description>
      <category>microservices</category>
      <category>softwareengineering</category>
      <category>learning</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Number Guessing Game using Java 🎮</title>
      <dc:creator>Safvan P</dc:creator>
      <pubDate>Thu, 04 Aug 2022 05:57:00 +0000</pubDate>
      <link>https://dev.to/safvan_8/number-guessing-game-49l4</link>
      <guid>https://dev.to/safvan_8/number-guessing-game-49l4</guid>
      <description>&lt;p&gt;The game contains 5 players. One Umpire, one Guesser and three Players.&lt;br&gt;
The guesser guesses a number between 1 and 10 and tell it to the umpire secretly. The remaining 3 players try to  predict the number guessed by   the guesser. &lt;br&gt;
The one who predicts the number accurately is the winner of the game.&lt;br&gt;
 If  more than one Player predicts the right number, all of them are winners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Class Diagram for the game:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U3P5lqcP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbm6b4fyv0pflwgd20x7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U3P5lqcP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbm6b4fyv0pflwgd20x7.png" alt="Image description" width="800" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The guessing game involves an ‘Umpire’ object , 'Guesser' object and three ‘player’ objects. All the  objects are created by instantiating the above 3 classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Features Included in this game:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;⇒ Restricted the all the players and guesser to guess  a number between 1 and 10. Even if they predict/guess a number out of this range, then the program will prompt to re-enter the input until they're choosing a value with in allowed range. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FIiMrXER--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v1b45qb6m4pli9oien5j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FIiMrXER--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v1b45qb6m4pli9oien5j.png" alt="Image description" width="800" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h4vnlZAH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/flynygt34owkrbuefswi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h4vnlZAH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/flynygt34owkrbuefswi.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⇒ added a counter to print player numbers in the console. &lt;/p&gt;

&lt;p&gt;⇒ Print summary of the game after finding the winner. The summary includes Accuracy of prediction of players who lost the game.&lt;br&gt;
    Accuracy is displayed in terms of, how close number predicted by players towards the number guesser by guesser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xpFuzP2S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obrpykbkwsusepbza031.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xpFuzP2S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obrpykbkwsusepbza031.png" alt="Image description" width="679" height="233"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;🖥The source code of the game is uploaded on GitHub: &lt;br&gt;
&lt;a href="https://bit.ly/3vGfAXo"&gt;https://bit.ly/3vGfAXo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🌎Connect with me on LinkedIn : &lt;a href="https://www.linkedin.com/in/safvan-p/"&gt;https://www.linkedin.com/in/safvan-p/&lt;/a&gt;&lt;/p&gt;

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