Posts

Featured post

 A Complete Guide to Understanding JWT and Implementing It in Your Applications

JSON Web Tokens (JWT) have become a popular choice for authentication and authorization in web applications due to their compact size, security, and ease of use. In this blog post, we will dive deep into the mechanics of JWT, how it works, and how to implement it securely and effectively. Whether you’re a beginner or an expert, this guide will help you gain a solid understanding of JWT. What is JWT? JWT, short for JSON Web Token , is a compact, URL-safe way of representing claims to be transferred between two parties. These claims are typically used for authentication and authorization, making JWT an essential tool for securing web applications. JWTs are widely used because they: Are self-contained : JWTs include all the information needed to authenticate the user. Are compact and URL-safe : Their structure is small enough to be included in HTTP headers, making them easy to transmit. The Structure of a JWT A JWT is made up of three parts: Header Payload Signature Each of these parts se...

Spring Boot - No Need to Restart the Development Server for Each Time

It's time for thinking about fastening your development on Spring Boot, Let's do some changes in dependency management and achieve the goals Spring Boot Developer Tools dependency doing a great job on change detection and refresh your current development server.   Just adding the following dependency on the pom.xml, if you are working with maven <dependencies> <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-devtools </artifactId> <optional> true </optional> </dependency> </dependencies> If you are going with Gradle dependencies { compile( "org.springframework.boot:spring-boot-devtools" ) }

Hide the navigation bar in jHipster Angular 2

Image
H iding a navigation bar is the easiest solution on Angular 2 version of jHipster . For this, you need to create a NavService and implement it on every component you need to show the navigation bar. Let's first create a service in the directory of your navigation component resides. import { Injectable } from '@angular/core'; @Injectable() export class NavbarService {   visible: boolean;   constructor() { this.visible = false; }   hide() { this.visible = false; }   show() { this.visible = true; }   toggle() { this.visible = !this.visible; } } There after you need to call this service on your navigation component constructor import { Component } from '@angular/core'; import { NavbarService } from './navbar.service'; @Component({   moduleId: module.id,   selector: 'sd-navbar',   templateUrl: 'navbar.component.html' }) export class NavbarComponent {   constructor( public nav: NavbarService ) {} } After the...

Debug your Laravel Application on PhpStrom

Image
Debugging is the key concept while we writing thousands of lines in code. In most of the cases, developers set the breakpoints and test the code it is work as expected.  In PHP framework like laravel, normally we are using var_dump(), echo and dd command to see the values. But do you think it is a proper way to debug?  In this session, I give you some few steps to debug your laravel applications using PhpStrom and Xdebug. Just follow the step one by one. Download the Xdebug and Configure with your PHP installation Go to the Xdebug download page and download the proper version of xdebug of your PHP version. If you find difficult to find the correct version of Xdebug better go to custom installation instructions link on the same page.  If you click the custom installation page follow the instruction to install Xdebug and configure it. After that install the browser extension for Xdebug.  Chrome Xdebug Helper   Firefox The easies...

Web Optimisation

Image
Web optimisation is the key part of web development and it is the trick to increase the viewers count. Seeing as 47% of users expect a webpage to load in under 2 seconds, and 40% will abandon a page that takes more than 3 seconds to load Eliminating the unnecessary downloads.   Web pages are the systems installation not required. They are always downloaded from the server and show the application view to the users. So if we are not optimised the page. It is downloading whole resources and shows to the users it takes more time. So we need more concern on optimising the downloads to the user what he really wants.  Encode and optimise the transfer size. Improve the page speed, we have to optimise the overall download size and minimised it by using the following techniques.  Data Compression  The next step in the optimisation is to compressing the resources the browser has ready to download. we are able to do the pre-processing to compress the ...

Angular 2+ Forms - Validating the Template Driven Forms

In this mini session we are going to look after how to validate a template driven from in Angular 2 + application. Here is the plunker : Here we can able to use the 4 built-in type validation like HTML form validations. required, pattern, minlength and maxlength

Angular 2+ Forms - Nesting Form Data

Image
Another interesting part of the Angular 2 forms is Nesting the forms data.  Example in complex forms like sign up form to getting lot of information from the users. It is easy to grouping the data into relevant groups.  Let's go to the real feel. Check on the below plunker and you would be feel better on filling the group field and read the JSON response rather than read from the long list of JSON