How should I go about creating a web app using node.js - 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.

Related

Nodejs + Express vs Django: Choosing the best suitable backend component for given requirements

I'm trying to build a software architecture for my web development. The main requirements of the website are as follows:
visualize real-time data
carry out machine learning analysis
Report visualization information via Email or SMS
The concept for such an web application consists of a database, a backend and a frontend component. I have already selected a time series database.
Despite my research, I cannot determine which backend component best meets the requirements: Nodejs + Expressjs or Django. My programming knowledge in Javascript and Python is on the same level.
Why Node:
its Single Threaded Event Loop Model for real-time web applications
same programming language for selecting a javascript framework on the frontend-side (but python for machine learning analysis)
More flexibility than Django due to its MTV pattern
(usually) less execution time than python-Code
Why Django:
Django Channels for real-time web applications
python language in backend, frontend and for data analysis
quicker development process because of the language simplicity
more secure due to its build-in security tools
Question:
Are there any other technical arguments why I should consider choosing Nodejs or Django or any arguments for not choosing one of them?
Well Django is also very flexible and powerful in the sense that you have to write less boilerplate code and gives you many solutions out of the box like admin panel, authentication and many more...
yes its true nodejs is fast as compared to django but tell me how fast? does it really matter?
Django also has concept like celery which are used for background tasks such as sending mails. A possible nodejs threading alternative.
In nodejs you have websockets while in django you have channels
You can do machine learning in both, nodejs also has tenserflow support and many other libs.
Conclusion: In my opinion you should go either with Django, laravel or Rails or something mature like that, Reason is nodejs web frameworks are pretty young in the market, where as django has been for more than 20 years now I guess, and same for laravel etc. Express is lot of boiler plate code, and as for nestjs, its also pretty young.
Hope my suggestion help you. Personally I also started with nodejs and now switched to Django. I am not saying nodejs is bad, its awesome but Time matters, if you want to develop stuff fast, then nodejs is not a good solution.

Is Express.js necessary in learning Node.js?

Most books on Node.js have Express.js sections. Most Node tutorials I've seen are about web development with Node and Express. So, is the knowledge of Express required for a deep understanding of Node?
No, It isn't,
ExpressJs is framework build on top of nodejs, as they are many framework in different programming language it is the same for Javascript in the backend side.
Here is some of example of Framework
Loopback
Sails.js
Koa
Express
In the nodejs world ExpressJS is the popular one, so in many books it's normal to talk about It, as Javascript was firstly build for the web.
But NodeJS can be use for so many kind of application like
Data Streaming Apps
Server-Side Proxy
Big Data Analytics
Wireless Connectivity
System Monitoring Dashboard
Chatbots
And other many sort of application.
In the web world ExpressJS is the popular one.
So you don't have to learn ExpressJS to deep undestand nodejs. And you don't have to learn it if you would not build web application or API. You can also rely packages shiped with nodejs to build any sort of application even web application but it will take you more time than using existing package.]
You can search for any sort of package at NPM
no, a framework is never necessary to learn the language but the opposite, Learning the language is absolutely necessary to learn the framework.
According to express.js: "Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications." thats all.

Micro front ends and monoliths

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.

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.

Can expressjs be learnt without learning nodejs

I've background in java swing programming with basic working knowledge of spring, javascript, angularjs, http.
I want to learn web server side programming using express js. Will i need to first learn nodejs and then be able to use expressjs or starting express js directly will be possible?
I'm planning on creating rest apis using express and then consuming them with angular js.
I will like to answer this question based on your past experience. Can you learn Java Swing framework without learning Java? No you can't. because you should understand concepts of Java to best use the Swing package. Similarly, you should understand the concepts of Javascript and Node.js to best understand Express Framework.
I would suggest you to start with a small project of setting up a server using express and node.js. And dig deep into node concepts whereever you face problems.

Resources