Need advice about which tool to choose?Ask the StackShare community!
Node.js vs Symfony: What are the differences?
Node.js is a runtime environment that allows developers to run JavaScript code server-side, while Symfony is a PHP web application framework known for its flexibility and modularity. Let's explore the key differences between them.
Architecture: Node.js is a JavaScript runtime environment built on the V8 JavaScript engine, allowing developers to execute JavaScript code on the server-side. Symfony, on the other hand, is a PHP framework that follows the MVC (Model-View-Controller) architectural pattern, providing a structure for organizing code.
Language: Node.js uses JavaScript as its programming language, which is a versatile and widely-used language with a large developer community. Symfony, on the other hand, is built with PHP, a server-side scripting language that is specifically designed for web development.
Concurrency: Node.js is known for its event-driven, non-blocking I/O architecture, which allows it to handle a large number of concurrent connections efficiently. This makes Node.js suitable for building highly scalable and real-time applications. Symfony, on the other hand, follows a traditional synchronous web server model, making it better suited for handling traditional request-response style applications.
Ecosystem: Node.js has a rich and vibrant ecosystem, with a vast number of open-source libraries and frameworks available through the NPM (Node Package Manager) registry. This allows developers to easily plug in and use various third-party modules in their Node.js projects. Symfony also has a large ecosystem, with a wide range of bundles and extensions available to extend its functionality.
Development Speed: Node.js is known for its fast development speed, as it allows developers to write both server-side and client-side code in JavaScript, reducing the need for context-switching between different languages. Symfony, on the other hand, being a full-fledged framework with a lot of built-in features, requires more initial setup and configuration, which can slow down the development process.
Community and Support: Node.js has a large and active community of developers, with many online resources, tutorials, and forums available for support. Symfony also has a strong community, with comprehensive documentation, developer blogs, and an active community forum.
In summary, Node.js, with its event-driven architecture and non-blocking I/O, excels in handling high-concurrency applications and real-time communication. In contrast, Symfony's robust ecosystem and convention-over-configuration approach make it well-suited for building complex web applications with ease and maintainability, especially in the PHP ecosystem.
As a newbie, trying to code an Avatar AI app from scratch - (I'm familiar with setting up the backend APIs on Flask), but blocked on choosing the frontend. Which of these JavaScript frameworks are preferred for development with Flask. Also, are there any UI tools / low-code tools which make development easy?
I don't say that is preferred, but I think Vue.js is friendly for those having first contact with this kind of technology, also I would recommend checking Quasar framework (vue.js based).
Quasar introduction: https://quasar.dev/introduction-to-quasar
Pure Vuejs (Free) 27min: https://vueschool.io/courses/vuejs-fundamentals
Hello, I'm trying to build an auction app with solidity and React but I need some server to handle data and internal logic and I don't know what tool to use for the backend for these reasons:
- when just using react and solidity it's not fast.
- when using Django and web3py, I can't transfer money with Metamask.
I've heard about Next.js and Node.js as the backend but I cant decide. I would appreciate any help.
The real question here is: "What is the best way to deploy a decentralized application with a React front-end."
Building a decentralized application and integrating things such as Metamask require you to write smart contracts. This process is language agnostic as long as the smart contract is written and deployed to the chosen blockchain correctly.
Using classic Full-Stack HTTP Application frameworks like Django will no longer work because when we create something with Django, the server is centralized, defeating the purpose of the Blockchain architecture.
That being said, now the question is, what programming language do you want to use to deploy this decentralized application? - https://eth-brownie.readthedocs.io/en/stable/ - is a Python framework for writing smart contracts.
As you have already learned and built with React, you might be better off sticking with the same runtime. NodeJS does have frameworks for deploying decentralized applications called the truffle suite: https://trufflesuite.com/.
This is a whole set of tools for writing decentralized applications using JavaScript and TypeScript.
Hope this helps.
Hello, I am trying to learn a backend framework besides Node.js. I am not sure what to pick between ASP.NET Core (C#) and Spring Boot (Java). Any advice, any suggestion is highly appreciated. I am planning to build only Web APIs (no desktop applications or something like that). One thing to mention is that I have no experience in Java or C#. I am trying to learn one of those 2 and stick to it.
UPDATE: The project I am trying to build is a SaaS using microservices that supports multi tenancy.
I'd recommend to learn Spring as it is very widespread in the industry and provides a lot of easy integration into most of the common backend tech stacks. Rather than learning Java you could look into Kotlin. It's a very consistent, stable and well-thought language in my opinion and not as verbose as Java. Many problems can be solved with Kotlin in a clear and elegant way while also always having the option to use data structures and libs in JVM. It is also has a very good support in Spring.
I have worked in a Spring environment for many years and I still love working with it. Super quick to get a base application running and get coding, thanks to Spring Boot's easy and straight forward integration with Tomcat. However, I will try and answer this question from another perspective: look at topics such as popularity of the language, average statistics on community contribution to their repositories and hiring availability from companies. If you are going down the API route for backend, leverege on your experience in the Node world by looking into ExpressJS (or even NestJS). The JavaScript world is really excellerating at a lightning speed, and I could recommend exploring those worlds a bit more, should it be a comfort level for you. However, my biased answer is tryout Java, followed by Spring afterwards. No disrespect to any .NET developers out there, as there are a few topics in there which are fantastically implemented.
Hi everyone! I'm starting a personal project that I've been postponing for a little while and I need a bit of advice. I thought that it will be a bit of a challenge but I figure the best way to learn is by doing!
The plan is to build an app with loads of automation build in for reporting which would make it very easy to perform tasks, The plan is to build something similar to an HR app using microservice architecture, separating services e.g. employee data, payroll (including calculations based on easily entered info like tax %), employee services (vacation, sick day allowance booking and tabulation) and automated reporting on a pre-defined schedule (bi-weekly, monthly).
I am considering Django (as I currently know a bit of Python) and Symfony (as a friend who is a developer recommended it) but I am well aware there are other (and probably better) tools out there for the job (like maybe ExpressJS/Node.js for the backend and React/Vue.js for the front).
Background:
I have got knowledge as a DevOps, Site Reliability and Cloud engineer so once the app is built I'm very comfortable taking it to deployment.
Thank you all for your help and responses.
Hi. I guess it all depends on what your goal is. If you wanna make fast prototyping Django or ExpressJNodeJS might be really good candidates. You can write your services quickly and easily by using anyone of them. Maybe we can also put Laravel in the same category.
Symfony is also another application framework that comes with many reusable components. It provides great flexibility with the configuration and dependency management solutions. So that you can inject or override anything, anytime without doing something hack-ish. You don't have to depend on any components that come with the framework and, replace them with whatever you prefer unless encounter any integration issues. I can say that Laravel also provides most of the Symfony futures as it uses its components under the hood. However, my personal experience with Laravel was not so good because it made me feel like I use a modernized version of Codeigniter. But anyway. :) So if I have to choose one of them, I would choose Symfony.
From the backend perspective, all of those have some pros and cons. For example, If strict type declaration is important for you and you don't like code magics like monkey patching etc., maybe Python and NodeJS might not be good candidates and maybe you could choose Symfony/php. However, in this case, you'll be missed out on the most powerful future of NodeJS which is non-blocking io. if you plan to do IO-intensive works, I think it would be a big loss.
So, maybe I can recommend you to have a look at typescript + NestJS also. https://nestjs.com/ The futures that NestJS provides might be a good balance between the strengths of Symfony and NodeJS.
As I'm backend dev., I haven't work too many frontend projects but from my personal experience, I loved ReactJS more than Vue although Vue was simpler. Maybe a front-end developer can give us more helpful details about those.
Hope it helps.
I've been approached by a business consultant for programming a website + web application for his client, which is a logistics company. The web application will have a tracking system for tracking their GPS enabled fleet (400 tricks).
Kindly advise me which scaleable stack can I use for the back-end. I'm planning to use React for the front-end.
And by back-end, I also include the database. I'm considering PostgreSQL as the database system.
Spring documentation is great. It makes it easy to learn and teach others when your application continues to grow.
Spring is a good decision for your needs, but you should build correct microservice architecture for good scaling. Work with database can be easy with ORM (e.g. Hibernate) and migrations (e.g. Liquibase) If you need the best performance and scaling on frontend, you can use Angular or React.
What should be used Node.js or Laravel to create a course search portal having about 50K courses, where users will create a profile and enter their academic credentials, scores, language tests, fee range, subject area, etc, and the system will filter and suggest courses meeting the entry requirements and other criteria. The applicant will then shortlist courses, he should be able to compare courses, apply for courses, upload documents and fill in application details, etc.
It's not a fair comparison. Laravel is a PHP web framework, Node is a web server runtime around JS. The question should be either:
- PHP or Node? => take what you know/can work fast in
- Laravel or ExpressJS/MeteorJS => take what you know/can work fast in
If it were up to me, I'd choose Laravel because I know it and can work fast in it :-)
I'm working as a full stack web developer and have been given an opportunity to re-frame the whole website which is written in PHP and JavaScript. Our website is required to be fast, efficient, having good analytics, easy to maintain and rework, and subject to frequent changes. It would be handling some medium size files like resumes, video recordings, etc. So I am thinking of changing the tech stack but confused for which backend to choose for the long run. Which back-end would prove to be better in terms of learning, development, and maintenance?
If it was me, then I would go with node.js because it has huge a number of packages,community,support & good dev experience and learning curve is also not that steep, if coupled with express.js, its gonna be efficient and fast in serving web requests, and if we adopt good design patterns and follow best practices, I guess it will be easy to maintain it as well, and for storing resumes, video rec etc.., I would use assest management tools like cloudinary etc.., rather than storing in db, coz Its gonna be much more faster this way.
Nuxt + Fastify + GraphQL + Nginx + Memcache = fast, confortable and a lot of plug-ins. Apache is realy slow :(. Nuxt is great and easy to use. Nginx, Memcache and Fastify it's very efficient. GraphQL require much more from You then REST, but give You flaxibility, order, plugin etc. We tried and don't regret .
I am about to complete my graduation with a computer science background. I want to pursue my career in software development. My front-end knowledge is very poor. I didn't like PHP so I didn't go for Laravel. My university offers a course on ASP.NET, I liked C# that's why I took asp.net. But now I think .net tech is unnecessarily complicated and most of the job offers available for .net are not for freshers. Should I try js and Node.js now? I mean as a fresher which tech stack should I choose for web development(Backend)?
Just don't .NET
. It was a failed idea from the start. Node and javascript are easier to learn, with much wider adoption, and more active communities.
.NET
is an old experiment in using a markup language to separate the UI from the business logic. The idea was that this would allow a small team of hyper-competent engineers to build the tooling and code for a large team of less-skilled front-end developers to leverage. In practice, leveraging that customized UI markup requires understanding and adjusting the underlying code. The result is that any UI change requires a hyper-competent .NET engineer.
However, many larger companies bought into it a long time ago, and now have a hard dependency on old monolithic .NET ecosystems, and they do need .NET developers to maintain them.
So, you can get a well paying .NET job without much difficulty. However, you'll neither like it, nor be doing anything interesting. There's no growth here, only a very long slow death of .NET (that'll probably take another 20 years).
Node and Javascript are sticking around, and still growing.
What I can see, you are confusing yourself, if you studied .Net now it's better to work as .Net developer, and you will find opportunities as fresh. Just search and don't waste your time. After you get more experience in .Net, then you can learn NodeJS if you still need to learn it.
Situation: I need to make a website for my Final Year Project. It's the website for brain analysis. The website features include chat, blogs, posts, users, payment methods. One of the main features includes the use of AI, which I know only in Python.
Decisions and Confusions: I decided to make two backends and one front-end. One backend will be using Django with GraphQL/RestAPI that will be running my AI models. The other backend is for the website. It will add users, chat, post, etc. I'm thinking of using TypeScript, Prisma, ExpressJS, GraphQL, MongoDB/PostgreSQL.
Please guide me to the latest and stable tech stack I can use. Because one of the requirements of our Final Year Project is to use the latest tech stacks. 1st Backend advice? (This will be used to run AI models) 2nd Backend advice? Frontend to 2nd Backend advice?
Thank you.
Hey there 👋,
Daniel from the Prisma team here.
I think your choice of a stack would work well for your final year project.
Some recommendations: - Use PostgreSQL if you need a stable stack. Prisma support for MongoDB is currently in Preview and therefore isn't stable. Moreover, PostgreSQL being a relational database enforces a schema more strictly than MongoDB which is useful given that your data model involves multiple relations. - If your Django backend exposes a REST API, you can also expose it over the GraphQL API by proxying requests from the GraphQL API to the REST API. That way, you have a unified API for all operations. This is typically known as wrapping. - Regarding the GraphQL part, I would consider looking at Nexus and nexus-prisma.
For inspiration, check out the Prisma Examples repository which contains many ready-to-run examples.
Here's another fully-fledged example using Prisma, Fastify, GraphQL, and PostgreSQL: https://github.com/2color/fastify-graphql-nexus-prisma
Hi. Maybe you can try use FastAPI instead Django https://fastapi.tiangolo.com It could be faster. The FastAPI documentation is so useful and elegant.
Also you can try split a little more the backend and use an "microservice" architecture. Using Kubernetes to deploy your services.
Hey everyone,
I am planning to start a personal project that would be yet another social media project with real-time communication facilities like one-to-one chat, group chat, and later voice and video chat using WebRTC.
The thing I am concerned about is Django being able to handle all the real-time stuff using websockets. I can use Django Channels, but I don't think that would be a very scalable solution. Moreover, django_channels
require alto of configurations, and deployment
is also a pain. My plan is to use a separate Node.js server to handle all the socket connections and have it talk to the main django
server through Redis.
My question is whether the above-mentioned solution is a good choice? If yes, how this can be achieved, keeping in mind all the authentication
other related problems. It might be simple, but I have never done this before, which might be the main reason I am concerned. But any suggestion will be appreciated.
Thanks in advance 😊
Try to do it with less - Nodejs + Redis + socket.io, optionally you can always communicate with django, but you can do it all in Nodejs, use pm2 and cluster too. For Redis you can also use Pub/Sub, is a good combination for future scaling.
NestJS has a very good documention. Furthermore, as a former django-user myself, I believe it is nice to finally get a backend node.js framework very much opiniated like Django. It may be related to what I previously said, but in terms of enterprise-used framework, it seems that Nest.js is the most popular.
For a full-stack app or just simple APIs I'd go 100% with Laravel. You get a clean architecture, beautiful documentation and friendly and always growing community: the project is yours, from A to Z. With their docs and resources like Laracast you can start from zero and build what you want, when you want. The learning curve is definitely smaller when compared to Symfony and, with the help of a bit of "magic" (Facades etc.) you get the same results in the half of the time with cleaner code.
Node Js have worked incredible great for me on every project I had. It is fast enough to support big and small apps, you do not have to worry about performance, because it is very capable of building a big REST API.
One advantage is that the learning curve is lower when you have used javascript on web browser as frontend, so, it is easy to migrate from Frontend to Backend with node.
Node Package Manager (NPM) has an incredible amount of packages from many developers, so you can use them on your project as you need them.
Code is easy to support, way different than Java Legacy code.
We choose Next.js for our React framework because it's very minimal and has a very organized file structure. Also, it offers key features like zero setups, automatic server rendering and code splitting, typescript support. Our app requires some loading time to process the video, server-side rendering will allow our website to display faster than client-side rending.
We actually initially wrote a lot of networking code in Kotlin but the complexities involved prompted us to try and compile NodeJS for Android and port over all the networking logic to Node and communicate with node over the Java Native Interface.
This turned out to be a great decision considering our battery usage fell by 40% and rate of development increased by a factor of 2.
As a small team, we wanted to pick the framework which allowed us to move quickly. There's no option better than Rails. Not having to solve the fundamentals means we can more quickly build our feature set. No other framework can beat ActiveRecord in terms of integration & ease-of use. To top it all of, there's a lot of attention paid to security in the framework, making almost everything safe-by-default.
Hey guys,
My backend set up is Prisma / GraphQL-Yoga at the moment, and I love it. It's so intuitive to learn and is really neat on the frontend too, however, there were a few gotchas when I was learning! Especially around understanding how it all pieces together (the stack). There isn't a great deal of information out there on exactly how to put into production my set up, which is a backend set up on a Digital Ocean droplet with Prisma/GraphQL Yoga in a Docker Container using Next & Apollo Client on the frontend somewhere else. It's such a niche subject, so I bet only a few hundred people have got a website with this stack in production. Anyway, I wrote a blog post to help those who might need help understanding it. Here it is, hope it helps!
This basically came down to two things: performance on compute-heavy tasks and a need for good tooling. We used to have a Meteor based Node.js application which worked great for RAD and getting a working prototype in a short time, but we felt pains trying to scale it, especially when doing anything involving crunching data, which Node sucks at. We also had bad experience with tooling support for doing large scale refactorings in Javascript compared to the best-in-class tools available for Java (IntelliJ). Given the heavy domain and very involved logic we wanted good tooling support to be able to do great refactorings that are just not possible in Javascript. Java is an old warhorse, but it performs fantastically and we have not regretted going down this route, avoiding "enterprise" smells and going as lightweight as we can, using Jdbi instead of Persistence API, a homegrown Actor Model library for massive concurrency, etc ...
I was researching multiple high performance, concurent//parallel languages for the needs of authentication and authorization server, to be built on microservice architecture and Linux OS. Node.js with its asynchronous behavior and event loop suits the case best. Python Django & Flash turns to be slower and .NET Core & Framework wasn't the best choice for the Linux environment at the time (summer 2018).
I also tested Go lang and Rust, although they didn't meet the quick prototyping criteria as both languages are young and lacking libraries or battle-tested ORM.
We builded Duomly with: BE: Node.JS & Nest.JS & TypeScript & PostgreSQL and FE: React & Sass & Javascript.
The whole of the stack is JS related what helps us to keep development on a track. When building backend we decided to go go for TS & Nest.js because we had experience with Javascript and still wanted to have control over types.
Pros of Node.js
- Npm1.4K
- Javascript1.3K
- Great libraries1.1K
- High-performance1K
- Open source805
- Great for apis486
- Asynchronous477
- Great community423
- Great for realtime apps390
- Great for command line utilities296
- Websockets84
- Node Modules83
- Uber Simple69
- Great modularity59
- Allows us to reuse code in the frontend58
- Easy to start42
- Great for Data Streaming35
- Realtime32
- Awesome28
- Non blocking IO25
- Can be used as a proxy18
- High performance, open source, scalable17
- Non-blocking and modular16
- Easy and Fun15
- Easy and powerful14
- Future of BackEnd13
- Same lang as AngularJS13
- Fullstack12
- Fast11
- Scalability10
- Cross platform10
- Simple9
- Mean Stack8
- Great for webapps7
- Easy concurrency7
- Typescript6
- Fast, simple code and async6
- React6
- Friendly6
- Control everything5
- Its amazingly fast and scalable5
- Easy to use and fast and goes well with JSONdb's5
- Scalable5
- Great speed5
- Fast development5
- It's fast4
- Easy to use4
- Isomorphic coolness4
- Great community3
- Not Python3
- Sooper easy for the Backend connectivity3
- TypeScript Support3
- Blazing fast3
- Performant and fast prototyping3
- Easy to learn3
- Easy3
- Scales, fast, simple, great community, npm, express3
- One language, end-to-end3
- Less boilerplate code3
- Npm i ape-updating2
- Event Driven2
- Lovely2
- Creat for apis1
- Node0
Pros of Symfony
- Open source177
- Php149
- Community130
- Dependency injection129
- Professional122
- Doctrine80
- Organized75
- Modular architecture71
- Smart programming47
- Solid45
- Documentation20
- LTS releases16
- Decoupled framework components10
- Robust10
- Easy to Learn10
- Good practices guideline8
- Service container8
- Bundle8
- Powerful7
- Simple7
- Flexible6
Sign up to add or upvote prosMake informed product decisions
Cons of Node.js
- Bound to a single CPU46
- New framework every day45
- Lots of terrible examples on the internet40
- Asynchronous programming is the worst33
- Callback24
- Javascript19
- Dependency hell11
- Dependency based on GitHub11
- Low computational power10
- Very very Slow7
- Can block whole server easily7
- Callback functions may not fire on expected sequence7
- Breaking updates4
- Unstable4
- Unneeded over complication3
- No standard approach3
- Bad transitive dependency management1
- Can't read server session1
Cons of Symfony
- Too many dependency10
- Lot of config files8
- YMAL4
- Feature creep3
- Bloated1