Skip to main content
14 votes
Accepted

What is the right time to go for Code Refactoring, not optimization?

First of all, no Java does not have enforced coding standards. Anything you can make work in JavaScript I can also make work but look worse in Java. Working, in any language, doesn't ensure that it's ...
candied_orange's user avatar
9 votes
Accepted

Django web app: how to save thousands of variables per user

Using a column per question makes it difficult to add more questions later. Instead, model the relation between users and questions in your table. I.e. the questions are encoded explicitly as data, ...
amon's user avatar
  • 135k
8 votes

Using singletons in Python (Django)

Using Singletons in Python What is a singleton? A singleton is an object of which there is only one, semantically, in memory. Builtin singletons None is a frequently used singleton. NotImplemented is ...
Aaron Hall's user avatar
  • 5,993
7 votes

Does software architecture depend on framework being used?

Your framework choices strongly influence the architecture your applications will have. Many of the architectural decisions have already been made by the framework for you, so trying to impose your ...
Robert Harvey's user avatar
6 votes

Django web app: how to save thousands of variables per user

You should normalise your database schema. This means that instead of just having a User table, you would also have a Questions table containing information about each question, then you would also ...
Sean Burton's user avatar
6 votes
Accepted

Communication between two apps

The idea that App 2 makes a request back to App 1 is a common architecture to get web services to work together. Usually, this would work like this: App 1 makes a request to App 2 the request ...
amon's user avatar
  • 135k
5 votes
Accepted

Why do people keep reusing superclass names in their subclasses?

Generally there are two schools of thought on this: Multiple types with the same name are fine if the name makes sense for them all. Differentiate them via a package/namespace/module etc name. Avoid ...
David Arno's user avatar
  • 39.5k
5 votes
Accepted

Understanding the importance of Gunicorn and Nginx for Django web development

This doc mentions DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests. So I guess that's the part where "Django is not designed for real-...
lennon310's user avatar
  • 3,242
5 votes
Accepted

What makes LINQ (C#) unique compared to another DSL such as Django query syntax?

What makes LINQ (C#) unique compared to another DSL such as Django query syntax? Simply put: what makes C# Language INtegrated Queries unique is that it is a Query Language that is Integrated into ...
Jörg W Mittag's user avatar
4 votes

Django - separation from the frontend (Templates)

So you need to show different states of your application -- a landing page, a list of cars, a single car's details, a procedure with a set of forms and prices etc for when you actually buy the car, et ...
RemcoGerlich's user avatar
  • 3,320
4 votes

What is the right time to go for Code Refactoring, not optimization?

From your question, it appears your are confusing "refactored" with "optimised" and are actually referring to the former. When should you refactor? That's easy, straight after (never before) your ...
David Arno's user avatar
  • 39.5k
4 votes
Accepted

Fully API-based website - is it a good idea?

It sounds like you are talking about a 'single page app' This term is used to refer to websites where all or most of the actions you take are accomplished via client side javascript AJAX calls, ...
Ewan's user avatar
  • 79.9k
4 votes
Accepted

Hardcoding on frontend

The answer to this depends how much you want the UI to cope with future requirement changes, such as additional buttons for different kinds of filterings. For trivial apps, most people will hard-code ...
b0nyb0y's user avatar
  • 394
4 votes
Accepted

How do I know a product is in the "will_expire" state?

This is the classic age problem. You want to know how old your customers are. Should you check every customer every day to see if it's their birthday? No. Don't even store anyone's age. Store their ...
candied_orange's user avatar
4 votes
Accepted

How should I update non-maintained database tables between production and development?

A problem occurs when I need to manually modify the non-maintained data in the development version. Then don't. Instead, create an SQL script which does. Reapply that script at an appropriate time ...
Doc Brown's user avatar
  • 214k
4 votes

Can I manage thousands of concurrent connections with a non-Node stack?

Always be prepared to do things over, sometimes you have to. But also don’t let perfect be the enemy of good enough. Since this is a first attempt, program it using the languages and libraries you ...
Robert Baron's user avatar
  • 1,132
4 votes

Is microservice approach always best fit for ETL processes?

Using a microservice architecture is mostly about two things: independent development lean scaling (with as little software on each new server as possible) Independent development is likely not ...
Lutz Prechelt's user avatar
3 votes

Data Transfer Between Loosely Coupled Modules of an Application

This question appears misguided. You say you want to 'transfer data between loosely coupled modules', but in almost any reasonable real world case, you would be transferring data 'for a reason'. The ...
Lewis Pringle's user avatar
3 votes

How can I model unknown and an unknown number of attributes on an object?

Django can store JSON directly in the database with JSONField. It is supported in some databases only, but https://docs.djangoproject.com/en/dev/ref/contrib/postgres/fields/#jsonfield and http://...
btilly's user avatar
  • 18.3k
3 votes

Django Fat Models: Where should I put model creation logic?

I would recommend create classmethod on ReceiptItem. In large code bases, you want model instance creation logic to be not spread all around your code base. Think what happens when in future you ...
mahoriR's user avatar
  • 131
3 votes

Does software architecture depend on framework being used?

The answer to your question from the title depends on the definition of "software architecture". One popular definition is: the design decisions which are costly to change at a later point time (at ...
Doc Brown's user avatar
  • 214k
3 votes
Accepted

Why does the Django Rest Framework encourage separating Model, Serializer and Views for the same object across multiple files?

This was a common convention at the time django was developed, followed by other frameworks of the time like Rails where you had a models directory with all your models, a controller directory with ...
Cormac Mulhall's user avatar
3 votes
Accepted

Is Python's Django WebFramework good to design Expert System as a Web App?

A web app is an application accessible through the web. One possible way of doing a web app is to have a front end (that's the part that presents the application for use in a web browser, including ...
Hans-Martin Mosner's user avatar
3 votes

Can I manage thousands of concurrent connections with a non-Node stack?

So I did some googling, Django has its own set of stuff for websockets, Django channels and behind that Daphne servers. There doesn't seem to be any documentation about how scaleable Daphe is. There ...
Ewan's user avatar
  • 79.9k
3 votes

What makes LINQ (C#) unique compared to another DSL such as Django query syntax?

While Linq is certainly an attractive feature to consider on its own merits, the real value of Linq is all of the other powerful language features that were added to the C# language and framework that ...
Robert Harvey's user avatar
3 votes

Communication between two apps

I would do it with a queue in both directions. App1 -> queue -> App2 -> queue -> App1. I would use RabbitMQ and have multiple instances of App2 if the load increased. The problem you could ...
Blaž Mrak's user avatar
3 votes
Accepted

Distributing Web application to multiple customers

The choice that you are making is the choice between a multi-tenant application or supporting multiple dedicated instances of the same application. At such an early stage, I'm not sure if you should ...
Thomas Owens's user avatar
  • 84.2k
3 votes

Reading a large CSV file and then loading data to a DB

Another option: you read the data as you are receiving it. It may be less straightforward than simply reading the submitted follow at once, but it's is a usual approach when dealing with large files. ...
Arseni Mourzenko's user avatar
3 votes
Accepted

Appointments Booking Using Slots

There is more than one way to skin this particular cat. You could store only the appointments, and generate the slotted time schedule on the fly when requested, or you could store all the slots and ...
Flater's user avatar
  • 56.6k
3 votes

Fetch the most recently updated records in a database across multiple tables in a performant manner

The 12 different tables indeed sound a little fishy. But if you're somehow forced to use that design, you might implement a database view as a union of selects from the various tables, and run your ...
Hans-Martin Mosner's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible