(+)Microservices

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/3

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

4 Terms

1
New cards

What is microservices?

Microservice is architectural style where application is broken down into small services.

They are losely coupled, independently deployable, testable, mainaable, each of them mostly shaped around single business capability.

They commucate each other via rest services or message queues.

2
New cards

(+)Software testing

Do you write test in your project. ?

Yes we are wrting unit test with 85 persent covarage. and integrations.  We are using Junit and Mocito. Karate

Also we are writing integration test as well.

Unit Tests;  Focus on verifying the functionalty of individual units or components, method or service

Mochito: is used to simulate the behavior of service or function. We can define return value when certain method calls. and verify if certain method call

Integration Tests; Focuses how different units work together as a group. we interact module like api or databes correctly.

Test driven architecture.  is a development process where tests are wrtting before the actual code. then we write actual code.

in Behaviour driven desing we can use plain english or turkish to define process, and test them from user behaivious perpecttive, so Cucember fully support BDD, with grichin syntax, with its own keyword like Given, When, Then, And, But.

3
New cards

(+)Solid

Solid principles are set of guideline or principles to make our code more understandable, maintable and flexibale.

 

Single responsiblity principle;  A class should only one reason to change, means a class should serve only one purpose.

 

 

Open Closed Principle; A class or object can be open to extend but close to modification.

 

 

Iiscov substute Principle;  Subtypes should be substutable with their base class without efecting correctness of program. Lest say we have a class Bird with method fly(), and subclass Penguen, so penguen cant fly. LSP.

instated of this, we can fly separte interface.

 

 

Interface Segragiation Principle; Clients should be forced to implement method which is unnecessrary fot them. Lets say Worker, has eat(), sleep (), work() method, but robot can work, but cant eat.

 

 

Depedency Inversion Principle;  High level modules should not be depended to low level modules. Like SQL Mongo.

Send Email, Notification service.

4
New cards

(+)Polimorfizm and Abstraction

How do we use abstraction and polimorphism in Java.

 

We use abstract class and interfaces.

In abstract class, we we can use abstract method (withoud implementation) or we non abstract class means with implementation. Abstract class cant be inititialized with new keyword

but in interface, interface is kind a contract, if you implement a interface, you have to implement all methods. also we dont have method body in interface. except default method in java 8. We can define method body in interface default method.

 

 

 

Polomorfizm,  Method  overloading, and method overwrting.