Sunday, April 18, 2021

Adobe XD - UI, UX , Product- Wireframe, Mockup, Prototype






Product Designer >  UX  Designer > UI  Designer

UI Designer - means Designing wireframes, UI (Fonts, Icons, Color) and handing it to developers

UX Designer - UX means Designing wireframes, UI (Fonts, Icons, Color) and Navigation Pathways and Actually Testing them from End user pov

Product Designer - Highlevel View, Budgets, Timelines, Client Approval + UI/UX role



Wireframes, Mockup, Prototype
Wireframes : 1 Color, 1 Font Size, Monochromatic - Usually Black and White - Skeleton Design - Sketches etc [https://www.wireframe.cc]
Mockup : All Screens with Higher Fidelity - Real colors, Real Fonts, Icons , Images etc. but no functionality, You basically cannot click anywhere
Prototype : All Things in a mockup + Functionality (Clickable Links navigating between screens)

Fidelity
Fidelity means level of detail - Color, Fonts, Icon, Logo, Images, Sizes in design

https://www.w3schools.com/tags/tag_canvas.asp
The <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript).


Monday, April 12, 2021

Spring Cloud, Netflix, Microservices - V V IMP

https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-ribbon.html


https://cloud.spring.io/spring-cloud-netflix/1.0.x/

https://stackoverflow.com/questions/39587317/difference-between-ribbonclient-and-loadbalanced

https://www.baeldung.com/spring-cloud-rest-client-with-netflix-ribbon

https://howtodoinjava.com/spring-cloud/spring-boot-ribbon-eureka/#ribbon

https://dzone.com/articles/using-new-spring-cloud-load-balancer-in-microservi

@EnableEurekaClient

@EnableDiscoveryClient


@RibbonClient(name="")

https://stackoverflow.com/questions/31976236/whats-the-difference-between-enableeurekaclient-and-enablediscoveryclient

https://piotrminkowski.com/2020/05/13/a-deep-dive-into-spring-cloud-load-balancer/

A New Era of Spring Cloud. While almost all of Spring Cloud Netflix components will be removed in the next release, it seems that the biggest change is a replacement of Ribbon client into Spring Cloud Load Balancer.

---------------------------------------------------------------------------------------------------

https://www.baeldung.com/spring-component-scanning

@ComponentScan Without Arguments

we use the @ComponentScan annotation along with @Configuration annotation to specify the packages that we want to be scanned. 
@ComponentScan without arguments tells Spring to scan the current package and all of its sub-packages.

The trick with Spring Boot is that many things happen implicitly. 
We use the @SpringBootApplication annotation, but it's just a combination of three annotations:
Using @ComponentScan in a Spring Boot Application.

@Configuration
@EnableAutoConfiguration
@ComponentScan
@ComponentScan With Arguments
@ComponentScan(basePackages = "com.baeldung.componentscan.springapp.animals")

spring.application.name=user-service
server.port=8888

1
2
3
4
5
6
spring:
  application:
    name: user

server:
  port: 8888






Microservices - Client Side Load Balancing

https://spring.io/blog/2020/03/25/spring-tips-spring-cloud-loadbalancer


Spring Cloud Load Balancer, we need to have a service registry up and running. 
A service registry makes it trivial to programmatically query for the location of a given service in a system. There are several popular implementations for service registries, including 
  • Apache Zookeeper, 
  • Netflix’s Eureka, 
  • Hashicorp Consul
  • Kubernetes 
  • Cloud Foundry
---------------------------------------------------------------------------------------------------------



Microservices don't use server side load balancing. They use client side load balancing.

Client Side Load Balancing

To understand client side load balancing, let's recap microservices architecture. We generally create a service discovery like Eureka or Consul, where each service instance registers when bootstrapped. Eureka server maintains a service registry; it maintains all the instances of the service as a key/value map, where the {service id} of your microservice serves as the key and instances serve as the value. Now, if one microservice wants to communicate with another microservice, it generally looks up the service registry using DiscoveryClient and Eureka server returns all the instances of the calling microservice to the caller service. Then it was a caller service headache which instance it calls. Here, client side load balancing stepped in. Client side load balancing maintains an algorithm like round robin or zone specific, by which it can invoke instances of calling services. The advantage is s service registry always updates itself; if one instance goes down, it removes it from its registry, so when the client side load balancer talks to the Eureka server, it always updates itself, so there is no manual intervention- unlike server side load balancing- to remove an instance.

Another advantage is, as the load balancer is in the client side, you can control its load balancing algorithm programmatically. Ribbon provides this facility, so we will use Ribbon for client side load balancing.

----------------------------------------------------------------------------------------------------------

https://spring.io/blog/2020/03/25/spring-tips-spring-cloud-loadbalancer

The @LoadBalanced Annotation

In this final example, we’ll have Spring Cloud configure the WebClient instance for us. This approach is excellent if all requests that pass through that shared WebClient instance require load balancing. Just define a provider method for the WebClient.Builder and annotate it with @LoadBalanced. You can then use that WebClient.Builder to define a WebClient that’ll load balance automatically for us.


@Bean @LoadBalanced WebClient.Builder builder() { return WebClient.builder(); } @Bean WebClient webClient(WebClient.Builder builder) { return builder.build(); }

Intellij IDEA Shortcuts – System.out.println shortcut

https://mkyong.com/intellij/intellij-idea-system-out-println-shortcut/


In IDEA, you can type sout and press Tab to generate System.out.println automatically.


https://intellij-support.jetbrains.com/hc/en-us/community/posts/206274579-How-to-quickly-view-method-signature-

https://mkyong.com/intellij/intellij-idea-how-to-show-method-signature/#:~:text=In%20IDEA%2C%20clicks%20on%20the,to%20show%20the%20available%20parameters.


Show Signature

Ctrl-Q (Quick Javadoc) or, within the parenthesis of the method, Ctrl-P (Show Parameters).

Git ignore all files of a certain type except in all subdirectories of a certain directory?


# Package Files #
*.jar
*.war
*.nar
*.ear
*.tar.gz
*.rar


#Exceptions to File Types based on Locations
!LB/**/*.jar

Multiple Instances, LoadBalancer, @LoadBalanced

@LoadBalanced

import org.springframework.cloud.client.loadbalancer.LoadBalanced;

Why We place @LoadBalanced on RestTemplate because RestTemplate is used to to fetch Server IP Address and port from Eureka Registry and its also used for Client side Load Balancing


@EnableEurekaClient
public class MovieCatalogServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(MovieCatalogServiceApplication.class, args);
    }

    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
See , In , Image Below, How Multiple Instances are registered of same application
We achieved by running application in an executable Jar in separate port

java -Dserver.port=8084 -jar movie-info-service-0.0.1-SNAPSHOT.jar


IntelliJ - Multiple Maven Projects Back into 1 Single Workspace/Window

How to merge Multiple Maven Projects Back into 1 Single Workspace/Window

https://stackoverflow.com/questions/8774024/intellij-working-on-multiple-projects/14637761#14637761


View > Tool Windows > Maven > An inline Window Opens > Click on Plus(+) Sign > Choose POM File of the Project You want to add in Workspace/Window > OK


Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass