I work in a startup where the backend is PHP laravel
My tech lead told me while node(expressJS) is faster its not production ready and the server cost is also very high which eats into the profitability and cannot handle loads similar to laravel
I have kind of enjoyed laravel since it comes with so many things baked in the framework itself. But That being said is there any truth of what he said ? . He is a not a bullshitter since he has credible experience working in startups and has really deep knowledge.
So I know since this is the laravel subreddit answers might be slightly biased but I would really appreciate unbiased opinions. I switched to node js some time ago and before switching, I was a laravel user for a year. My main reason being the faster/better performance of node js.
I know that performance doesn't matter when your project is small but my whole mindest was "what if my website suddenly becomes popular and a lot of people visit it?". My budget most of times is limited so I want a server that is fast and can handle a lot of requests pretty well. Nodejs seemed to handle that scenario better but now that I checked out laravel again, some even say that laravel octane is faster than node js. Is that true? Can I have high performance REST APIs (since I build mostly build SPAs) using octane or node will still be my best bet? Thanks
Videos
Hello everyone can I get some advice which I learn.What best in the market right now Laravel or NodeJS?
I'm working on a side project- to put it simply it's a fitness application that will primarily be used as a mobile app. I'm new to using RN but have experience with react. I've most commonly seen RN used with node, but I have more experience using laravel. My question is: should I stick with Laravel rather than using Node or are there advantages to using Node? And if Node is the better option, what backend framework would you recommend? Keep in mind I have some experience using Node a couple years ago in school and am very familiar with JS so switching to a Node JS backend shouldn't be much of an issue.
I know there are similar questions asked but some of them are 5y and some are 1yr. And so much changes in a short time.
So I will start working on a project with DBs, APIs involved as well. I have used Node.js with express and react for small projects and I like them very much. But because this project is going to be a big project I am hesitant to go with Node.js. I know basic php and looked at laravel looks appealing as it makes some parts so much easy.
If you have experience with both or only with laravel please share your experiences with the framework.
Let's just focus on the backend part, because it's also no problem to have a laravel app with a react frontend.
The key difference for me is that Laravel brings a well-documented database access layer and orm, solid authentication and a lot of nice features (such as automated paging for rest apis), where Express focuses on solely handling endpoints for you (tell me if I'm wrong, my Express knowledge is some years old and I haven't done larger projects with it).
This means that Express is very small and you can do almost everything just the way you wish (including installing some form of auth + orm on top), but you won't get the headstart and security you would get from Laravel, which gives you a solid base to build upon.
Therefore, as others have said, Laravel seems to be a good fit for monolithic web-apps and Express for microservices. Keep in mind though, that microservices really pay off only in certain scenarios (very large apps and teams, need for independent scalability...) and are also easy to fuck up.
So: If you need authentification and db access, I'd say stick to Laravel, you'll be fine.
Laravel, if you have no time fuck around and just wanna get shit done to collect your paycheck.
I just started and my goal is to develop some ai tool.
I don't know whether to pick laravel or node js. I have basic knowledge of php and javascript.
Any advice is greatly appreciated.
In the last period, I'm working on too many services that a backend with mongodb or Postgress it's depends on the project, also I need sometimes to use socket.io for realtime. All services are require authentication.
So my question, should I use nodejs with express or Laravel,
I'm familiar with both
In this article, we will do a detailed comparison of 2 new technologies Laravel VS NodeJS, that are intended to make computing and problem solving simple and convenient for the developers.
During the 21st century, several technologies were introduced in the market to make computing and problem-solving easy. Such technologies address the fundamental coding problem.
Laravel and NodeJS are 2 such most advanced web frameworks and both have their own set of unique features as per the best tool set required to solve a particular set of problem. So cannot predict easily which one is best out of the two.
Web Frameworks are essentially software packages that ease the web development complexities. They comply with many built-in features that are standard in web development, reducing development time, resulting in a smooth transition from the phase of development to the phase of production.
Each fundamental programming or scripting language used to build web applications, web services, and web APIs has a web framework for their users to benefit from rapid growth. This helps standardize the Web Development process, too.
What is Node JS?
Node.js is an open-source, cross-platform runtime environment designed to build server-side applications. It has built-in JavaScript programs that can be run on OS X, Microsoft Windows, and Linux within Node.js runtime.
It also provides an excellent library of various JavaScript modules which greatly simplifies web application creation using Node.js.
Pros of Node JS
Total application performance established using node is greater than other applications.
Performs effectively when building APIs.
Node comes with an outstanding package manager.
It is providing enormous user group support.
Fast and simple handling of consequent requests from users.
Cons of Node JS
Node js requires asynchronous programming is not readily grasped by all developers and may be hard to deal with.
Since it is single-threaded, it doesn’t work well with CPU intensive devices.
What is Laravel?
Laravel is a versatile, simple to comprehend, open-source PHP framework. It follows the design pattern of a model-view-controller.
Laravel uses existing components from various frameworks that help to build a web application. The built web application is more organized and pragmatic.
Laravel provides a rich collection of features that integrates the key components of PHP frameworks such as CodeIgniter, Yii, and other programming languages such as Ruby on Rails.
Pros of Laravel
-
Best framework option for PHP developers.
-
Quick and simple to understand with concise documentation that makes PHP and Laravel the finest choice.
-
It removes the need to write simple HTML codes, based on the MVC template.
-
Assisted by ORM, aids in abstraction and automation.
-
Simple integration of logic with blade design engine inside the website
-
Comprises dependency injection functionality, allowing for fast testing and automation.
Cons of Laravel
-
It has no built-in software and needs third-party integration to build custom websites.
-
Laravel is surprisingly slow, and programmers need to be professional at PHP before they operate on Laravel.
To Conclude
After going through this detailed comparison on Laravel Vs NodeJS, we concluded that-
Both the frameworks are considered unique and have their own benefits and drawbacks.
It all depends on the type of product you want to create, that determines which platform is better suited to product complexity.
To get a better overview of comparison check this article - https://codersera.com/blog/laravel-vs-node-js-which-one-is-better/
Hey so I need some advice, I’m 16 and I’ve already invested so much time into laravel and I’ve used for a couple personal projects and I don’t have any problems with i it but everyone shits on php and says that node is the the future and that you should learn but I’m hesitant to throw my laravel experience down the drain. What do I do?
A brief background:
I'm a novice programmer to be fair. I learned some frontend two years earlier, and mastered HTML, CSS, and JS. During this period I was mostly doing frontendmentor.io challenges to enhance my CSS skills, and I was pretty good at it. Then, I learned things like AJAX, fetch, DOM manipulation, web workers, etc.., I did get into react for some time, though I didn't continue due to its large bundle size and the fact that it isn't really necessary to build a website/app. I regret this decision btw.
At some point during my frontend learning, I was somehow exposed to some PHP code. My curiosity had the better of me and I soon installed XAMPP and started watching PHP tutorials. It was really fun. Then, I opted for Node.js due to its simplicity and minimalism, I thought this would help me learn the ins and outs of how the backend and HTTP worked. And this was a really good decision, as I learned CORS, SOP, preflight requests, basic authentication, cookie-based authentication, CSRF attacks and CSRF prevention patterns like double submit cookie. This was all achieved with Express. And I also learned TypeScript.
My problem with Node.js started when I was building a REST API. And I'm not talking about some janky CRUD API, I was building one of those bloated and complex REST APIs with consistent request/response format and powerful URL options like pagination and filtering, if you don't know what I mean, it's like JSON:APIs. Express doesn't quite cut it. Express is known as a minimalist library for making backend development a little easier, but I think it's not suited for a complex project like this unless I integrate a bunch of bloated libraries, utilize TypeScript with all its acrobatics, strange workarounds and caveats, and follow some style guidelines for folder structure and design patterns. I don't like this.
To remedy this, I started learning a more opinionated framework like Nest.js. And to be fair I paused learning and just went back to Express. That's because Nest is so obsessed with autistic design patterns like having a separate DTO class in a separate file for every route. Maybe I didn't give Nest a fair chance, but I hope I'll do that in the future. At this point, my plan was to learn the basics with Node.js, and then transition to a more enjoyable experience with Ruby On Rails, Laravel, Django, ASP.NET or SpringBoot.
Yesterday, I started working as an intern for a small business. The person I was working with was using Laravel to build a dashboard, and has assigned me the task of fixing some bugs in the frontend. Looking at the codebase, I was amazed by how fantastic Laravel is; it just handles everything while you focus on the more fun stuff. Work with the database? Just write a class with some attributes. Validation? Use the built-in validator. Logging? Use Log facade and the output is in the log files, no need for custom helpers and loggers.
I still have a lot to learn though, like JWT and API design. Should I continue using Node.js? If so, what framework is most suitable for my case? And, is Laravel suited for learning? I don't think so because it's not as low-level as Node.js.
Hello, I've been a fullstack dev for a few years now. I studied graphic design, and always had my focus on user interface and experience.
I do the dev on my web projects, mostly medium sized websites. I like coding, but the only languages I know are PHP ("pure", no frameworks), JavaScript (I really like and use a lot of Jquery). I write the HTML and CSS (SCSS) for my projects too, and I did code and use my own CMS (with PHP, JS and mysql).
I enjoy the dev side of my job, and I want to keep up with the new stuff, I was thinking about a PHP framework like laravel, or node.js, what you guys think for my situation? I want to invest my time with something usefull, with a bright futuro ahead.
If you like MVC, learn Laravel. It's fantastic and integrates well with a frontend view library like Vue or React.
IMO Laravel is a good future bet. It's not just a fully featured framework, but a comprehensive ecosystem with some of the best learning resources available. Laravel provides a "cradle to grave" first party tooling support from VM based development environments through to provisioning and deployment.
Node is a little more... sketchy. There are multiple frameworks, with Express being the dominant. The scope and role of Express is much more limited than Laravel, by design. Node is great, and a valuable skill to have. But in terms of building and delivering quality software, and in terms of doing so commercially, I'd say Laravel will be your best bet.
Hi, I've tried to leave Laravel in favor of SvelteKit for a simple reason - I wanted to have one language for both BE and FE. Not having to care which composer packages and which npm packages i'm using, not caring for both php and node version, just one of those.
However, I feel like JS ecosystem is not ready yet.
We have breeze auth and we have sanctum. In js there is lucia, auth0, authjs, nextauth, passportjs, etc.
We have eloquent orm with db query builder and migrations and everything seems so nice. In js land im constantly reading or watching about how prisma's performance is so bad, how drizzle has some problems and is not ready yet, use raw sql.
What's not even talked about - Laravel provides great way to place business logic where it should be. As I'm mostly working on saas products, i cant imagine leaving models and services atop of controllers, which have eloquent relationships, scopes, getAttributes and so on. I feel like i would have to implement all those things on my own in next or nuxt or sveltekit.
One more thing that bugs me about Laravel is that even tho inertia is great and im happy i chose this path, its developers didnt put as much focus on svelte, even tho its possible. But that's on me, i'll try to make some prs.
Anyway - to my question - have you tried leaving Laravel? Did you stay? Did you leave? What was your thoughtprocess and what helped you decide?
Hey guys,
I'm currently getting more proficient in react.js and I really like it. I would like to learn a backend language so I can develop in full stack. I find it hard to deicde whether I should go for node vs php with a framework. I already know php, but never tried to use it in synch with react.
In theory I would prefer node because there are many online courses who show the integration of react and node. But then I hear that node is much harder than php and I already know php (even though not very well).
Also, I'm planning to do freelance work (not wordpress), so should I stick with php after all? Is node js bad for freelancing jobs of creating small websites or websites for smaller companies etc. ?
Thanks in advance
Curiosity drove me to investigate Angular, React, Django, and Node.
First and foremost, your analogy is unfair... While PHP is a programming language, NodeJS is a platform that runs JavaScript outside of the browser. After that, let's compare the learning curves of PHP and JavaScript.
Learning your first framework, in my opinion, is the most difficult because you are inexperienced with the MVC design pattern. Switching frameworks is simple once you've learned it. After Laravel, I found node to be pretty simple, however, I haven't done anything with it other than play around with it.
When comparing PHP to JavaScript, I'd say PHP is easier, but JavaScript has several ugly quirks and numerous variations like ES6, Typescript, and so on that complicate matters. Javascript is becoming increasingly vital in the ever-changing world of web development. In fact, I've agreed to terms with a new firm in the same wage range since I truly feel that Javascript is the future and that learning NodeJS now will only benefit me later.
I'm not going to criticize PHP. I adore Laravel; I believe it is a terrific framework that will only improve with PHP 7's enhanced performance, security, and design. However, I still prefer Javascript and NodeJS.
I hope this helps!
Hi,
I've been writing Laravel for 11 years, Vue for 7 years, and React for 4 years. Do you think I need extra experience for a Node JS job?
I've got a large "old-school" procedural structure PHP Web application (LAMP stack) that I am getting ready to start designing Version 2. Notice I said designing, not programming. I have 25 years experience mainly in procedural structure PHP applications for small-mid size businesses. I am wanting to hand over the responsibility of code development and maintenance both front-end and back-end. The overall goal is keeping with the KISS principle (Keep It Simple Stupid). I have Javascript experience, but again, I'm not doing the coding this time around. I'm having someone else do that.
+ This is not for a Fortune 1000 company. It is mainly an internal application for a mid-size business with a handful of external users. It will be run on a WHM/Cpanel based server (on top of AlmaLinux or Uubuntu)
+ The app is basically a Case Management Ssytem with three user groups: the back office project managers, the Field Tech workers, and the end clients businesses. Think like an Electrician or Plumbing business sort of thing. The Tech Field workers use phones and tablets and just using the built-in browser and responsive CSS is adequate instead of developing a mobile-specific app.
+ I don't want to hire a front-end developer separately. I will have a full-stack developer handle all the coding.
+ I want to remain on MySQL or Maria databases.
+ I want to be able to change coders if the need arises with minimal learning curve for the new coder to pick up where the old coder left off.
+ I don't want an unecessarily complicated framework but something that has a large coder community with no significant risk of it dying out.
I'm going back and forth between Laravel + Vue.js or Node.js + Express.js or NestJs. I don't have to run on WHM/Cpanel as a requirement so also wondering if looking into Heroku is worthwhile? The downside of not going Laravel from my perspective is that I'll have a hard time understanding the code myself, but, I'M GETTING OUT OF THE CODING BUSINESS! So why care? Of course, I could just continue to really keep it simple and go non-framework pure object oriented PHP with Jquery, Bootstrap etc. but my gut is telling me that is probably not wise.
So overall my two main objective are minimizing the time/cost of development and keeping the SysAdmin/DevOps complication to also to a minimum. My gut is leaning towards Node.js + Express.js, but the long-time PHP Developer in mean is having a tough time not sticking with PHP but I have to remind myself again and again, I'M NOT DOING THE CODING!
I don't mean to start an ideological war, but witch one do you prefer the most and why? (in terms of development speed, learning, curve, loading speed, maintenance..)
I've used them all commercially so I'm happy to give a bit of insight. First off, be aware that the first two are full on frameworks, while Node.js is still just a language (JavaScript).
There is no clear winner in terms of Node.js frameworks, however the one I'm using most at the moment is called Sails.js, which is very much along the same lines as Laravel/RoR in terms of MVC, ORM etc. But be aware that JavaScript is an asynchronous language which means the approach to coding with it will be a little different.
PHP is really easy to get up and running, and you can get dirt cheap hosting. Laravel is very much using PHP the right way, structured well, tested and it has great documentation. However, the Laravel wave is still very new, so there is a lot of movement in that area. Heaps of new packages turning up all the time, the PHP community is moving towards better testing practices and there is tonnes of support. If you know PHP, Laravel is a fantastic framework that will make you a much better coder.
Ruby and Rails are a little more difficult to get up and running, and the language is very different from what people are used to. However, Rails is a fantastic framework. For so long I stuck with Laravel waiting for it to catch up, but Rails really is a long way ahead - so many things are just so easy in Rails, even though they're already incredibly easy in Laravel. Much better support for testing, built-in generators and a beautiful, clean Ruby syntax.
Of course, it comes down to what language you know. If you know PHP, Laravel is amazing and is way ahead of any competition. If you know Ruby, Rails is the same. If you know JavaScript, well, I'd try and hang on till a good framework comes along (don't say Meteor).
If I had to pick between Laravel and Rails I couldn't make a choice on them alone. I love them both, and even though Rails is a bit more full featured I'd pick the right tool for the right job depending on it's requirements.
Edit: Apologies for the wall of text, I realise now after this word vomit that I might have misunderstood the question but hopefully it's of use to someone!
We could all add our opinions on which we like most and why bit to be honest most of is haven't tried all of these do it will usually be pretty biased. If someone on here has tried them all then by all means chime in.
They are all great options based on what the communities as a whole are saying and yet will all have strengths and weaknesses. Why don't you take some time and give each a shot and see what you think for yourself?
My current project is based on Laravel. So, far everything is written served directly without REST APIs. Now, I'm in a position where I must have an API. Personally, I'm comfortable with Laravel and JS. But having read a lot about Golang, it seems fun(and quite fast) for API development. I could easily go and prefer Laravel, but I'm considering it a long term.
What would you suggest?
Thank you!