Avatar of George Krachtopoulos
Needs advice
on
MongoDBMongoDB
and
PostgreSQLPostgreSQL

Hello everyone,

Well, I want to build a large-scale project, but I do not know which ORDBMS to choose. The app should handle real-time operations, not chatting, but things like future scheduling or reminders. It should be also really secure, fast and easy to use. And last but not least, should I use them both. I mean PostgreSQL with Python / Django and MongoDB with Node.js? Or would it be better to use PostgreSQL with Node.js?

*The project is going to use React for the front-end and GraphQL is going to be used for the API.

Thank you all. Any answer or advice would be really helpful!

READ MORE
14 upvotes·604.1K views
Replies (11)
Avatar of arhuman
Code Alchemist at DOOLTA·
Recommends
on
PostgreSQL
PostgreSQL

If you want safety (no data corruption/loss) Postgresql is the way to go. You can use Postgresql with python/django but also node. And as a bonus postgresql performance should match those of mongodb if properly tuned...

23 upvotes·1 comment·325.9K views
George Krachtopoulos
George Krachtopoulos
·
March 20th 2020 at 1:03PM

Thank you for your advice!

·
Reply
Avatar of jtwebman
Lean Software Programmer ·
Recommends
on
PostgreSQL
PostgreSQL

I mean what you use really comes down to your team. I would normally pick a relationship database over an object store for reporting and other things down the road that are much harder to do with a DB like MongoDB. As for language, I would pick Elixir as it does these things really well but that because that is what I know best. Python or Node.js are also sure good choices. Whoever is building should probably pick the language, framework, and database.

READ MORE
12 upvotes·1 comment·325.9K views
George Krachtopoulos
George Krachtopoulos
·
March 28th 2020 at 5:38PM

Thank you for your kind note.

·
Reply
View all (11)
Recommends
on
PythonPython

Currently, I have decided to use Python and JavaScript (especially React and Node.js) for any of my projects. Well, I have used Python with Django for a lot of things, and I would certainly recommend Django to anyone, due to its high secure authentication and authorization inbuilt system, a ready to use admin platform, template tags, and many more. Well, I guess that you would like to use Python to create the backend of your application, an API, and React Native for the frontend. Python and JavaScript (React) are on the trend these days and have a huge community, so there are many resources, tutorials, great documentation. I have not really heard anyone using Flutter and Go for applications these days, so I would not recommend it to you, it would make your life much more difficult.

Hope that helps, and good luck with your project!

READ MORE
8 upvotes·1 comment·379.9K views
monkhaus
monkhaus
·
April 12th 2020 at 11:14AM

I haven't used it personally but http://skulpt.org/ let's you do Python on client-side. Might be good if you're using Django back-end.

·
Reply
Recommends
on
DjangoDjango

I always use Django on my projects. It is really easy and friendly fro the developer. It also comes with an inbuilt admin panel where you can manage all your models (tables), Django has a great authentication and authorization system, and it provides a great and powerful URL dispatcher, suitable for your needs. Furthermore, you can use a called django-pyodbc that is coded specifically for Microsoft SQL Server, and the SQL dialects for SQL Server ("T-SQL") and Access ("Access SQL"). However, I would not recommend using an Access DataBase with any web application's backend. Of course, it depends if you explicitly have Microsoft as your main tech stack.

Hope I helped you, and good luck with your project!

READ MORE
5 upvotes·281.9K views

I have been using Node.js lately, and I find it awesome. Although I am using TypeScript (TS), and Deno.js claims to have an easier and better integration with the amazing JS superset, I do not find appealing. The truth is I have not used Deno.js, but I have seen some tutorials when it was first released. However, I would definitely recommend Node.js, especially for a big/serious project, like an e-commerce website / application. The community is huge and you can find answers to your questions or issues, far more easily. Also, I do not know if many packages/libraries are supported by Deno.js yet, so that might be an issue.

READ MORE
5 upvotes·446 views

I had the same question myself a few months ago. I finally chose Node.js, and it was one of the best options I did back then. From when I started programming, I always believed that Python was for me the best language, secure and stable. However, it is not flexible for web development, there are more packages & libraries that are built and work only with JavaScript / TypeScript, and the community, resources & support is much bigger. I was also fascinated by the Django ORM, which I still am, & the admin interface. But those are things, that can be replaces by other tools, such as TypeORM, and the admin interface was not needed at all finally for my case. I know understand that Python is not the language that I should use everywhere and every time, but I can say that it is really good for algorithms, computer science, maths, statistics, analytics & AI. To be honest, I chose TypeScript (TS) with Node.js & Express, because it has auto-completion and "strict" code checking. I hope this helps you, and let you take a look at various aspects of choosing a programming language to work with.

READ MORE
4 upvotes·503.8K views

I am working on a production-ready website, and I need to fetch data from a GraphQL API built with Apollo Server. I would like to use Relay, due to performance optimizations, but the docs are too complicated, and the community is not as extended as Apollo's one. If anyone has used both tools or has faced similar questions, I would really appreciate your comment and your opinion on this.

Note: I will also be using Next.js with Static Site Generation, which provides multiple performance optimizations.

READ MORE
4 upvotes·28.7K views
Needs advice
on
DjangoDjangoNode.jsNode.js
and
ReactReact

I would like to build a medium to large scale app, that has real-time operations and a good authentication system and a secure and fast API. Should I use Django with React only? Or maybe use Django for the API, Node.js for real-time operations and React for the frontend? Any suggestions? Which database should I use with those technologies? Should I use both MySQL / PostgreSQL and MongoDB together? Should I use only MongoDB or MySQL / PostgreSQL? Or is it better to go with both MySQL and PostgreSQL at the same time? Should I use also GraphQL?

READ MORE
3 upvotes·93.5K views
Replies (2)
Avatar of maxsaykov18381
Full-stack developer at Asteria·
Recommends
on
Django
Django

Hey, George

TL;DR PostgreSQL + Django + React.js.

A few notes about Django: * Django includes own ORM which is able to work with SQL databases. In this case, you're able to use any SQL storage like a PostgreSQL / MySQL / etc., but you can't use MongoDB. * Django is synchronous web-framework. If you want to use asynchronous operations in the database, you have to choose another tool (aiohttp for Python or fastify.js for Node.js). * Django is stable. You don't need to worry about data consistency, etc. * Django-Rest-Framework is a great library for handling REST API requests. * django-channels is a library for handling WebSocket connections. * GraphQL is a great thing, but it requires additional knowledge for using it. (especially, performance knowledge).

A few notes about Node.js: * You have to choose Node.js web-framework. Node.js includes a lot of web-frameworks like a express.js, hapi.js, fastify.js, etc. * Node.js applications are asynchronous. It can give you additional performance. * You have to know about data consistency inside your own application. * You're able to use MongoDB or any SQL database because npm includes a lot of libraries that can work with databases. * You're able to use GraphQL because Node.js is a better choice for GraphQL. * You don't need to use additional libraries for handling REST and WebSocket connections.

So, my conclusion is using Django + PostgreSQL + React.js. For this stack, you can get more stability. If you need to get more performance, you have to think about some asynchronous languages (like a Node.js).

Take a look at Flask + SQLAlchemy + PostgreSQL + React.js. SQLAlchemy is a better ORM than Django-ORM.

I hope, it's useful for you :)

Best regards, Max

READ MORE
9 upvotes·1 comment·82K views
George Krachtopoulos
George Krachtopoulos
·
March 18th 2020 at 11:03AM

Thank you very much for your help!

·
Reply
Avatar of maxmusing
Founder & CEO at BaseDash·
Recommends
on
PostgreSQL
PostgreSQL
at

Node.js is a great option for real-time applications, especially in conjunction with Socket.IO.

In terms of databases, I'd go with PostgreSQL. MongoDB has its benefits (schema-less, sharding, map-reduce), but for most CRUD-based apps, it makes sense to store the bulk of your data in a relational database (of which PostgreSQL is the best IMO). You can throw in MongoDB if you have a specific need for it. There's certainly no need to use both MySQL and PostgreSQL.

As for GraphQL, it can be nice to work with since you don't need to predefine specific data endpoints on your backend, instead shifting the power to your frontend in requesting the data it needs. It's also useful for public APIs, when you don't know what data users want (see Github's API). It can be useful at the early stage when you're prototyping and want to be able to fetch data quickly, but certainly isn't necessary.

At BaseDash we use Node.js, ExpressJS, Socket.IO, PostgreSQL, and Sequelize to fit our use case of database management and real-time operations.

READ MORE
5 upvotes·1 comment·103.9K views
George Krachtopoulos
George Krachtopoulos
·
April 6th 2020 at 4:23PM

Thank you, Max. I appreciate your help and advice. They are really useful.

·
Reply