Yaprak Ayazoğlu
ConfrontJS 2018
@yaprakaya
Yaprak Ayazoğlu
Freelance Frontend Engineer
Google Developer Expert in Web Tecnologies
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
Webshop ->Sellers
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
Monolith
Seller Dashboards
Returns
Orders
My Assortiment
...
Downstreams
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
Monolith
Seller Dashboards
Returns
Orders
My Assortiment
...
Downstreams
@yaprakaya
Monolith
Seller Dashboards
Returns
Orders
My Assortiment
...
Downstreams
FE
BE
@yaprakaya
Backend for Frontend is a shim to help organize microservice architectures and coordinate functionality across a diverse, wide system. A BFF is a layer between the downstream services and UI.
A composition of techniques, strategies and recipes for building a modern web app with multiple teams using different JavaScript frameworks.
@yaprakaya
@yaprakaya
@yaprakaya
Monolith
Seller Dashboards
Returns
Orders
My Assortiment
...
Downstreams
FE
BE
FE
BE
...
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
Application
1
Application
2
Application
3
@yaprakaya
<html>
<head>
…
<script src=“/wrapper/bundle.js”></script>
<script src=“/application-1/bundle.js”></script>
<script src=“/application-2/bundle.js”></script>
<script src=“/application-3/bundle.js”></script>
…
</head>
…
</html>
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@Injectable()
export class PackingListService {
private packingListUrl = 'url/to/packing-list';
constructor(public http: HttpClient) { }
public getPackingList(listId: string):
Observable<SendStockItem[]> {
return this.http
.get(`${this.packingListUrl}?list-id=${listId}`)
.map((json: any) => {
const packingList = PackingListDto.fromJson(json);
return packingList.lines;
});
}
}
@yaprakaya
import { SendStockItem } from './send-stock-item';
export class PackingListDto {
id: string;
retailerId: string;
sendStockItems: SendStockItem[];
static fromJson(json: any): PackingListDto {
return PackingListDtoSerializer.fromJson(json);
}
}
class PackingListDtoSerializer {
static fromJson(json: any): PackingListDto {
const packingListDto = new PackingListDto();
packingListDto.id = json.id;
packingListDto.retailerId = json.retailerId;
packingListDto.sendStockItems = json.lines.map((line) => {
return SendStockItem.fromJson(line);
});
return packingListDto;
}
}
@yaprakaya
import { FormGroup } from '@angular/forms';
export class SendStockItem {
id: string;
selectedQuantityFormItem?: FormGroup;
static fromJson(json: any): SendStockItem {
return SendStockItemSerializer.fromJson(json);
}
}
class SendStockItemSerializer {
static fromJson(json: any): SendStockItem {
const sendStockItem = new SendStockItem();
sendStockItem.id = json.id;
return sendStockItem;
}
}
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
@yaprakaya
https://frontconnect.nl/
info@frontconnect.nl
https://slides.com/yaprakayazoglu/monolith-to-microfrontend/