
Ask HN: What is the most readable back end framework? - jacobjr23
Which backend framework has the most understandable code behind it?
======
LiamPa
Hard not to love Django and djangorestframework both have very readable code
and great docs.

[https://github.com/django/django](https://github.com/django/django)

[https://github.com/encode/django-rest-
framework](https://github.com/encode/django-rest-framework)

~~~
thijsvandien
I can't speak to DRF, but strongly disagree about Django. While it's
reasonably nice on the outside, the internals are a bunch of cruft,
interconnectedness, indirection, "magic", and simply too much of everything.
There are all sorts of very understandable reasons for that, but the fact
remains: almost never did a quick look through the code answer a question I
had about Django. That's a big reason why I love Tornado; it's fairly minimal
and straightforward. If the documentation doesn't cover something, the answer
is mostly just a few clicks away.

------
jolmg
Yesod[1]. In part, that's because Haskell in general is really easy to read.
The type-system provides a lot of information about what's going on or what
can go on at any given point in the code.

I've read both parts of Rails and Yesod. The problem with Rails is that a lot
of the code is dynamically generated. The lack of static type information
means I have to investigate in run-time with binding.pry to see what kind of
data is flowing through a function at any given moment. Rails also employs a
lot of magic that results in weird, inconsistent corner cases.

My methodology for Rails is to find a method involved in what I'm
investigating and insert binding.pry statements where-ever I'd be curious
about what kind of data is flowing or effects are happening. Then do the
action that I'm investigating, check the context where I put the binding.pry
statement, and insert more such statements. Rinse and repeat.

My methodology for Yesod is to go to the documentation pages like this one[2],
and click around the hyperlinks to functions and types. That's normally enough
to know how the data is flowing and being affected. If I need to look further,
I'd hit the source link and read it. The type information always provides
enough info that I don't need to try to investigate in run-time.

[1] [https://www.yesodweb.com/](https://www.yesodweb.com/)

[2] [https://www.stackage.org/haddock/lts-14.25/yesod-
core-1.6.17...](https://www.stackage.org/haddock/lts-14.25/yesod-
core-1.6.17.2/Yesod-Core.html#t:Yesod)

------
allendoerfer
Probably a PHP microframework like Slim or Lumen. It highly depends on your
background and how you define the scope of what you want to be easily
understandable. I would recommend different systems depending on whether you
are a computer scientist, frontend developer, webdesigner, data scientist etc.

For most people though it probably is PHP. There is a reason for PHP's
popularity and it is its low barrier to entry for beginners. Hosting is
plentiful and comes with a standard way to store data (MySQL), deployment is
simple and everything being bound to a request (and dieing afterwards) lets
you get away with mistakes.

------
diehunde
Rails

