Posts

What is TLS and digital certificates, How to secure your website using https

Image
  As per the internetsociety.org Transport Layer Security (TLS) is a cryptographic protocol that provides end-to-end security of data sent between applications over the Internet. TLS encrypts data sent over the Internet to ensure that eavesdroppers and hackers are unable to see what you transmit which is particularly useful for private and sensitive information such as passwords, credit card numbers, and personal correspondence TLS is normally implemented on top of TCP in order to encrypt Application Layer protocols such as HTTP, FTP, SMTP and IMAP. TLS used in HTTP is called HTTPS, where the additional 'S' represents secure connection. In HTTP the communication is plain and unecrypted, anyone connected to the same network and access to network logs can see the data you are sending. But using HTTPS lets your data encrypted at client and can be decrypted only at sever end, so even anyone eaves drops on your network, all they can see is the encrypted data. A typical https h...

How shared libraries work in ModuleFederationPlugin.

Image
courtesy: https://scriptedalchemy.medium.com/micro-fe-architecture-webpack-5-module-federation-and-custom-startup-code-9cb3fcd066c This is in continuation to the previous article https://mytechlearns.blogspot.com/2022/06/single-spa-using-single-spa-react-and.html . Application discussed below refers to the application mentioned in the previous article and code is shared in GitHub In this article lets see how shared libraries work in the ModuleFederationPlugin and also how we can run the two different versions of react can run in the host application (host uses the react version of 17.0.2 and remote uses version 18.2.0). Lets take a look into the shared section of MFP. Shared section represents the shared libs that will be shared with the host application or with the other remote application or with both. Similar to split chunks plugin, MFP splits your application into multiple chunks based on the shared dependencies provided. For example with the above configuration if we run webpa...

Single SPA using single-spa-react and ModuleFederationPlugin

Image
  SPA applications using single-spa framework and SystemJS is discussed in the below 2 articles Part1: https://mytechlearns.blogspot.com/2022/06/micro-frontend-and-implementation-using.html Part2 : https://mytechlearns.blogspot.com/2022/06/micro-frontend-and-implementation-using_27.html In this article we will see how to integrate remotes with host using ModuleFederationPlugin (MFP), and also we will use the single-SPA framework also (although not required using MFP) as discussed in the above 2 articles. What is a ModuleFederationPlugin (available in webpack v5.0+): As per the author of the plugin  “ A scalable solution to sharing code between independent applications has never been convenient, and near impossible at scale. The closest we had was externals or DLLPlugin, forcing centralized dependency on a external file. It was a hassle to share code, the separate applications were not truly standalone and usually, a limited number of dependencies are shared. Moreover, sharing ...