4 ms·
you don't have to make a monolith web app, or use React, Angular et.al, or transpilers, not even JQuery. State can be managed by observable pattern or event lis
by z3t4 9y ago
you don't have to make a monolith web app, or use React, Angular et.al, or transpilers, not even JQuery. State can be managed by observable pattern or event listeners. example:
app.on("new_private_msg", updateMsgBadge);
app.on("new_chat_msg", updateMsgBadge);
function updateMsgBadge() {
this.badge.newMessages =
PRIVATE_MSG.reduce(msg => msg.unread)
+ CHAT_MSG.reduce(msg => msg.unread);
}
Parts of the app can be abstracted into micro-services. For example the signup can be it's own micro-service.
Or using the plugin pattern each widget can be independent/untangled.