ReactJS+NodeJS+MondoDB or ReactJS+PHP+MySql or ReactJS+NodeJS+MySql

I learn right now ReactJS and in the past for databases I used PHP+ MySql. I while ago I started to learn NodeJS and MongoDB but because I don’t have too much experience in these last two I can’t be sure witch one option is better.

I saw that a lot of companies had problems with MongoDB when they got in 5-6 nested loops and others problems, too. I ask this for my future personal medium or big projects what is better to use from these 3 options from the above title.

Is there no full stack developer here? Only front end developers :slight_smile: ?

There really isn’t a clear question here and the title isn’t something that entices people to want to read your post.

NodeJS is a battle proven backend used across large, medium, and small companies. I honestly wouldn’t even consider it an emerging technology anymore. It does a lot of things really well and for frontend heavy apps it’s kind of dumb not to use it, since it’s able to do things like pre-render frontend templating or share validation logic.

More often than not, I see the Node layer communicating with microservices or APIs, rather than dealing with the DB itself. But those who do use it to talk to the DB directly are usually using MySQL/Maria or PostgreSQL. I honestly don’t think I’ve ever seen Mongo in production, nor do I hear it ever getting mentioned in serious conversation.

For your projects you should choose what you’re most familiar with or what you feel like you should use. It really doesn’t matter even a little tiny bit unless you’re dealing with large teams or high traffic, so questions like this shouldn’t really be given much thought. Feel free to experiment and have fun. Do what you feel like doing.

Thank you mawburn for your advise. Because I don’t like to waste time I try now to build an app with React, Redux, Express, Node, MongoDB. I didn’t find good tutorials how to make an app with React, PHP and MySql, so that is why I go with what I just wrote above.

So to answer to your question, to be clear, when someone asked me the same question I will answer to him: this is good but I had some problems there, this is better, because works really fine, etc. To give an example, when someone(a company) asked me on linkedin why I go now with React and not with Angular or VueJS, I answered(something like this I was expecting, too, from one of you, about my question):

I worked in the past with plain Javascript, then I tried AngularJS, but I didn’t like it. VueJS came like a very easy framework to use and implement.

ReactJS showed up between VueJS and AngularJS. I mean Vue is in one extreme, Angular in the other extreme and React is in the middle. It’s not an easy library to use, because you have to master Javascript to understand ReactJS very well. But, if you love Javascript, and not other things like Typescript, etc, you can learn React in a shorter time.

I can show you what are the big differences between VueJS and ReactJS. I will not include AngularJS because went down and a lot of companies tend to use now VueJS or ReactJS.

VueJS:

  • It is smaller and faster;

  • Convenient templates simplify the process of developing;

  • React is slightly less intuitive than VueJS;

  • It is simpler in terms of syntax;

  • In Vue you can write normal HTML. React can do that too, all you have to do is ensure that all your class attributes are called className and style attributes don’t have string values anymore.

  • Writing single-file Vue components feels so natural.

  • Vue’s documentation is a dream;

ReactJS :

  • Gives more flexibility in large apps developing;

  • React is ideal for almost any platform;

  • React has a steep learning curve. Its documentation and terminology around certain concepts is a bit unconventional and messy;

  • React is difficult because it uses a lot of intermediate-advanced JS concepts.

  • Learning React will make you a better javascript developer;

  • Easier to test;

  • Suitable for mobile apps creating;

  • More information and solutions available;

  • Vue can’t track data editing and deletion, but React can;

  • React may force the developer to follow a certain pattern, VueJS does not.

  • According to GitHub, React is the most popular right now;

  • More likely to have long term success (unless they do what google did with Angular 1).

I hope now you see why I prefer React.

I didn’t find good tutorials how to make an app with React, PHP and MySql, so that is why I go with what I just wrote above.

There isn’t any reason why you need a tutorial that teaches all 3 of these things together. React is frontend only, totally independent of the backend. It talks to the backend through REST or GraphQL. You should look for tutorials in React and how to build RESTful APIs in [whatever language you want], separately.

Node, Mongo are for backend and there are a few good tutorials with all: React, Mongo, Node, Express and how to do a full app with front and back, too. That’s why I choose this path.

To be honest, I like PHP more than Node from diff points: servers are much much much cheaper, node is faster but eats a lot of memory and performance comes to end of project. First is to have a solid and well organized app.

My suggestion is to just do a React tutorial by itself. Then learn best practices of doing REST in PHP.

Speed of the language should not be a concern for most trivial applications. But, it sounds like you’re comparing a VPS vs Shared Hosting and Shared Hosting is crap no matter how you look at it.

I’m sorry that I made a mistake when I said in the beginning that I learn React right now. I mean that I did a lot of tutorials with React and now I want to implement it in real project because I like it. I don’t have time to make tutorials, if that was your advise.

Don’t worry, even will take me a lot of time to test all the 3 options from the title, I will know then, which one option is better and why. I thought by asking here, people will give me some ideas which what option was better for them.

All you need to do is run a fetch in your componentDidMount() function to hit your API and populate your data. You can use either your local state for small apps, or a single store like Redux.

(it used to be best practice to use componentWillMount(), but that is being deprecated)

Thank you mawburn for your link.

Talking with friends about this subject, about these 3 options from the title, one friend, that left the company where I work now, told me to join them if I want to learn how to make big projects with React, PHP and MySql, because they do big apps bingo and casino, only with React, PHP and MySql :slight_smile: .

Someone else, from a diff company, asked me in private, if I want to join them to work with React, NodeJS and MongoDB/MySql :slight_smile: . I didn’t know that if you want to learn something better you have to change your job :slight_smile: .

These are still separate things… React does not care if you use Java, NodeJS, PHP, GoLang, or COBOL. Not a single character will change in your JavaScript.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.