Micro front ends and monoliths - micro-frontend

Im interested in talking to anybody who has migrated or started to migrate a monolith using the Micro Front End Architecture.
The monolith Im looking to migrate is a single page application based upon a in house built framework.
Which approach did you take? Iframes, WebComponents etc?
Which tools/libraries did you use to help this process?

We just started implementing micro front-end to existing application. we started with single spa. it is a framework for micro front-end. the advantage is each module can write in different languages (vue, react, angular, etc...).
there is an another way like creating webcomponents and include without any framework vue-cli.

Much like Vishnu, we took the single-spa route. We've combined 2 independent applications so far.

Related

How should I go about creating a web app using node.js

I was using flask with python, but I want to develope with node.js because of the libraries, and syntax of javascript, but I am having trouble with finding any good resources for my level
I found Vuejs to be a good framework with plenty of tutorials and a good learning curve. This is good to build a web app.
If you want a simple server to respond to http requests, I'd suggest expressjs
A mix of the two is good for a micro service architecture.

Django vs Node(Express) vs Flask for RESTful API with high security and real-time

I have a few questions regarding some popular web frameworks. I can find pros and cons about all the frameworks, but which fits best regarding theese criteria:
The website needs to be as secure as possible. It will need a lot of real-time feautures, an own mobile app (native or hybrid, with notifications) and the application will also run a lot of background processes.
Django has some nice security features included, but suits bad for mobile development. The solution is then probably making a completely RESTful API tougheter with Angular and Ionic, but doesn't you loose most of Django's built in security solutions? Will it then be just as safe using a Node framework like Express, and manually escape user input, and manually prevent database injection? Will a good user authentication system then be equal as much work?
In addition, will it be painful to mix synchronous and asynchronous programing using Django channels to implement websockets and real-time features. I don't have any experience using Django channels, but I really likes the simplicity of Socket IO together with Express. Even if it can be challenging to program asynchronous in a Node environment, will it be just as hard using Django channels at the end? And since Django is a full framework, will you after a while have to rewrite a lot of the inbuilt classes and functions? Is it still easier than using Flask with Flask SocketIo? Will it be a good idea to use Python for background jobs beside the Node environment?
I know there already exists enough framework vs framework questions, but i would appreciate any advice and experiences.
Just go ahead and use the socketio in node or flask it is much more adviceable than using the socketio libary in Django.

Best Project Approach in Node JS

I'm new to Node JS development. As an ASP.NET MVC developer, I normally use Repository Design Pattern where I have separate projects for Front-End and Database access in one solution. In addition, when creating a REST api, this can be added to the existing solution. So when publish, it api and front-end is separated by a different route.
I've just created a REST Service in Node JS and it's really simple and I like it. However, when it comes to Front-end I was looking at ReactJS, I've seen a blog (unfortunately, I can't find the link) where it separates the process between the REST service and react front end. I'm just wondering if this is a common design pattern in nodeJS using ReactJS. And if there's a benefit on doing this. Specially nowadays, Full Stack developers are a common thing. I can see the benefit of it from a maintenance stand point but I'm just wondering if there's a benefit in terms of server resources i.e. memory, cpu. Should the OS handle 1 vs 2 nodejs process? Will this differ from using linux vs windows?
I see a huge benefit of separating the frontend from the backend so I would propose you to have your Node backend running in its own project and let's say a React solution running on its own. The React client can then consume that API together with other APIs later. By separating you have the benefit of scaling later.
If you've already built the REST service in node, you can access it via proxy in the React project's package.json by adding
"proxy": "http://127.0.0.1:5001/"
It helps manage CORS issues.

Nodejs within Grails app

Sorry if I come off as a novice. I am front end dev. I am going to work on creating new mobile views in a grails app. I am planning to use Reactjs for the front end development but I am not sure if or how can I use Nodejs within the Grails app. I am not a grail dev, hence the question. Any practical advice or links that can help me understand how node works with Grails will be appreciated.
Thanks.
No, this doesn't make much sense. React is a front end framework which can work with any back end framework that can create the data in a format it uses and process its requests. But Grails and Node.js are back end frameworks and are based on completely different underlying infrastructure. Grails works on the JVM and Node.js uses V8.
Technically yes, you can use Node.js in the JVM, using Nashorn, but it's currently slower than using it natively and doesn't support all of the features of native Node.js.
You can partition your back end into multiple parts though, and implement each in whatever tech you wish (Grails, Spring, Node.js, Rails, Python, etc.) You could go the full microservice route, or just write them in a way that each part does a focused subset of the overall functionality and implement the necessary communication between them.

Is this a good web application architecture?

I'm trying to build a website myself but I also want to build a native mobile application that will access the same DB in the future.
What I'm thinking now is using Node.js to build Web Services wrapper for the DB and every DB operation will be executed via web service API. And for the website framework, I'm going to use Rails.
Please let me know whether this is a good architecture or not. I'm not sure whether encapsulate data with Web Services is a good idea. Will there be any performance issue? And if it's feasible, which DB should I use? And can rails communicate with DB via web services?
Thanks a lot!
Update
Why do people down vote this question??
I think you have more technology than needed in your architecture right now.
Personally I would create a REST api on top of the DB (using either node or Rails - both are super easy to do this with and both can use pretty well any db)
Then you can write any number of "apps" for the front end process, whether they are web apps, ios apps, android apps, etc... They will all get their data from your REST api on the backend.
You might even consider writing the front end as a single page app using Angular, Knockout or Backbone, something like that. If you do that with node, your entire stack will essentially be written in javascript. It can get confusing for a newb, but it's super powerful.

Resources