Need advice about which tool to choose?Ask the StackShare community!
Next.js vs Symfony: What are the differences?
Key Differences between Next.js and Symfony
Next.js and Symfony are both popular frameworks used in web development, but they have several key differences.
Server-side Rendering vs. Full-stack Framework: Next.js is primarily a server-side rendering (SSR) framework for creating React applications. It focuses on providing a seamless user experience by pre-rendering pages on the server. Symfony, on the other hand, is a full-stack PHP framework that includes components for both frontend and backend development.
Language and Ecosystem: Next.js is built with JavaScript/TypeScript and is part of the React ecosystem. It allows developers to leverage existing JavaScript libraries and tools. Symfony is written in PHP and has its own ecosystem that includes a wide range of libraries and extensions.
Routing: Next.js uses file-based routing, where each page has its own file in the pages directory. This makes it easy to organize and locate specific routes within the project. Symfony uses a routing configuration file that maps URLs to controllers, providing more flexibility and customization options.
Development Speed: Next.js is known for its fast development speed due to its simple and intuitive setup. It includes features like hot module replacement, which allows for instant updates without refreshing the page. Symfony, being a full-stack framework, takes more time to set up and configure, but provides a wide range of features out of the box.
Community and Support: Next.js has a large and active community, with extensive documentation and resources available. It is widely adopted by many companies and developers. Symfony, being one of the oldest PHP frameworks, also has a strong community and a wealth of resources. It has been used in numerous high-profile projects and has a mature ecosystem.
Scalability: Next.js supports serverless deployment through platforms like Vercel, which allows for easy scalability and automatic scaling based on demand. Symfony can also be scaled effectively using techniques like load balancing and caching, but it requires more configuration and setup compared to Next.js.
In Summary, Next.js is a server-side rendering framework for React applications with a JavaScript/TypeScript ecosystem, file-based routing, and fast development speed. Symfony, on the other hand, is a full-stack PHP framework with its own ecosystem, routing configuration file, and support for scalability.
I'm about to begin working on an API, for which I plan to add GraphQL connectivity for processing data. The data processed will mainly be audio files being downloaded/uploaded with some user messaging & authentication.
I don't mind the difficulty in any service since I've used C++ (for data structures & algorithms at least) and would also say I am patient and can learn fairly quickly. My main concerns would be their performance, libraries/community, and job marketability.
Why I'm stuck between these three...
Symfony: I've programmed in PHP for back-end in a previous internship and may do so again in a few months.
Node.js: It's newer than PHP, and it's JavaScript where my front-end stack will be React and (likely) React Native.
Go: It's newer than PHP, I've heard of its good performance, and it would be nice to learn a new (growing) language.
Go with Node.js. There's something really satisfying about being able to use a single language across your entire tech stack. Especially once you integrate GraphQL, which is effectively JSON.
Your second best option is Go, but the ecosystem around Node.js is quite a bit stronger. This will play a big factor when you start building functionality like file management, messaging (especially in real-time), and authentication. The libraries and documentation are just stronger for Node.
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’re a new startup so we need to be able to deliver quick changes as we find our product market fit. We’ve also got to ensure that we’re moving money safely, and keeping perfect records. The technologies we’ve chosen mix mature but well maintained frameworks like Django, with modern web-first and api-first front ends like GraphQL, NextJS, and Chakra. We use a little Golang sparingly in our backend to ensure that when we interact with financial services, we do so with statically compiled, strongly typed, and strictly limited and reviewed code.
You can read all about it in our linked blog post.
Next.js is probably the most enjoyable React framework our team could have picked. The development is an extremely smooth process, the file structure is beautiful and organized, and the speed is no joke. Our work with Next.js comes out much faster than if it was built on pure React or frameworks alike. We were previously developing all of our projects in Meteor before making the switch. We left Meteor due to the slow compiler and website speed. We deploy all of our Next.js projects on Vercel.
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!
Pros of Next.js
- Automatic server rendering and code splitting49
- Built with React43
- Easy setup33
- TypeScript26
- Universal JavaScript24
- Zero setup22
- Static site generator21
- Simple deployment12
- Just JavaScript12
- Incremental static regeneration12
- Filesystem as an API10
- Frictionless development10
- Everything is a function9
- Well Documented9
- Has many examples and integrations8
- Testing8
- Isomorphic React applications7
- File based routing + hooks built in4
- Deployment2
- SEO1
Pros of Symfony
- Open source177
- Php149
- Community130
- Dependency injection129
- Professional122
- Doctrine80
- Organized75
- Modular architecture71
- Smart programming47
- Solid45
- Documentation20
- LTS releases15
- Easy to Learn10
- Decoupled framework components9
- Robust9
- Service container8
- Bundle8
- Good practices guideline8
- Simple7
- Powerful7
- Flexible6
Sign up to add or upvote prosMake informed product decisions
Cons of Next.js
- Structure is weak compared to Angular(2+)9
Cons of Symfony
- Too many dependency10
- Lot of config files8
- YMAL4
- Feature creep3
- Bloated1