R
R
Roman Shishkin2014-11-09 16:19:07
Python
Roman Shishkin, 2014-11-09 16:19:07

Which framework to choose: Play! (java) or Flask (python)?

I struggle with the choice.
What to choose for web development? I was going to do very specific things with a low load, for example, along with receiving site connections, it is required to keep a socket server for something else, and so on. That is flexibility. Leaning towards Play!
But on the other hand - most things are done faster and easier in python, although because of this flexibility and speed there are a lot of pitfalls. (Like recursive imports)
So what to choose for small but specific projects?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Q
Quickerz, 2014-11-09
@Quickerz

Flask is fine for your purposes. I must say right away that I have not dealt with web development in Java, but it seems to me that the entry threshold is much higher than in python. You need exactly one file and ten lines to run your first Flask application. I doubt that with Play! you can do something similar. But here it is worth listening to the people who work with him. I'll describe the benefits of python web development better.
The first is the python itself. The language is simple, concise, has many libraries that cover most of the needs for web development. I wouldn't worry about recursive imports. With the exception of very rare cases, such problems are easily solved by moving the import to the right place in the file or by properly separating the functionality into modules.
Secondly, Flask does not have any project organization requirements, which gives the desired flexibility, although it requires additional architecture planning. Although I'm not sure if this is a disadvantage for a specific project, which requires some advance planning anyway. You can make the whole project in one file (try to avoid this), you can use the built-in blueprint mechanism, you can use a third-party solution to organize code based on classes, or make your own. The flexibility and transparency of the python is excellent here.
And finally, if you are working on a really SPECIFIC task, it makes sense to look for solutions specifically for this task in the candidate language. It may turn out that a framework that is more convenient for general tasks will be less suitable for solving your particular task.

B
bromzh, 2014-11-10
@bromzh

When your project on play once again takes half an hour to compile, you will regret choosing play.

A
asd111, 2014-11-10
@asd111

Play! it's more scala than Java. For low load, you can safely take Python.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question