
Reahl – A Python-only web framework - kim0
https://www.reahl.org/
======
sandGorgon
Quite similar to Plotly Dash, but a worse license.
[https://plot.ly/products/dash/](https://plot.ly/products/dash/)

Dash is awesome for early stage , production ready prototyping.

~~~
hennsen
With „worse“ you mean what exactly? Probably just „not fitting my personal
needs and ideas“? That doesn’t make something generally worse... or can you
tell me how it’s bad for me?

~~~
gtirloni
Companies are usually wary of AGPL. e.g.:

[https://opensource.google.com/docs/using/agpl-
policy/](https://opensource.google.com/docs/using/agpl-policy/)

~~~
hennsen
That just means „not suited for everyones needs and taste“ - tge same goes for
another license that a company chose. Others like it less.

~~~
gtirloni
Exactly. And that's what the comment you replied to said. For them, it was
worse for their "needs and taste" but you wanted clarification. Now you're
saying the clarification is obvious so I don't know what's your point.

------
crobertsbmw
It seems to me that html css and JavaScript are better suited for the job than
Python, if you want to do anything complex at all. But I’m probably wrong.

~~~
rossdavidh
Speaking as a python developer who uses Javascript and CSS only when
necessary, yes, you are correct. It's not the fact that it's JS/CSS that's
annoying to me about such work, and nothing about it gets better if you use
python instead.

Not that it's not interesting of them to make this, but really, I had little
if any temptation to try it out.

Note that it doesn't necessarily mean I think JS/CSS is _better_ suited, but
in any case not worse, and I think the leap from one problem domain to another
is much more significant than the leap from one language to another.

------
based2
Other component-oriented frameworks: [http://tapestry.apache.org/component-
reference.html](http://tapestry.apache.org/component-reference.html) Java

[https://github.com/jeluard/lucuma](https://github.com/jeluard/lucuma) Clojure

[https://github.com/greencatsoft/scales](https://github.com/greencatsoft/scales)
Scala

------
Cyph0n
How is this different from Vaadin (other than the language, of course)?

[https://vaadin.com/](https://vaadin.com/)

~~~
leesec
Would also like to know major differences to Anvil?

~~~
danpalmer
Anvil is hosted, or an on-prem server, whereas it looks like this can be run
anywhere. I’d guess that’s the major difference.

Anvil also emphasises their dev tools, it’s quite an integrated environment,
between IDE, data, and deployments.

------
nine_k
Does APL here mean you can only use it ti build APL-licensed server code?

Apparently it should be the case.

~~~
giancarlostoro
AGPL means you have to share any code you write using this framework. It makes
no sense to me why a library would be AGPL licensed, LGPL is what I expect
libraries to be, of course I'm not sure how the LGPL applies to Python, but
I'm usually all in for MIT License.

~~~
saagarjha
> It makes no sense to me why a library would be AGPL licensed

> AGPL means you have to share any code you write using this framework

I think you've found the reason?

~~~
giancarlostoro
But you're using this code in any application you make, so you can't use it
commercially.. AGPL isn't made with libraries in mind...

~~~
saagarjha
> But you're using this code in any application you make, so you can't use it
> commercially.

AGPL puts no restrictions on commercial usage, as far as I am aware.

> AGPL isn't made with libraries in mind...

It works perfectly well with libraries.

~~~
EduardoBautista
I have always disliked the “GPL doesn’t prohibit commercial use” argument. You
know well why it isn’t practical to use for commercial purposes. You basically
make any project using it into an unlimited full featured free trial.

~~~
mcny
> I have always disliked the “GPL doesn’t prohibit commercial use” argument.
> You know well why it isn’t practical to use for commercial purposes. You
> basically make any project using it into an unlimited full featured free
> trial.

I don't get it. What would be so wrong about making your source code available
to everyone (including your competitors)? Remember, if your source code is
AGPL and someone uses it, their source code is also AGPL and they must make
their changes available to their users.

If you deliver real value to your customers, the fact that your source code is
publicly available should be a plus point for your customers.

~~~
giancarlostoro
How competitive would Google or Facebook be if all of their code were fully
open sourced?

~~~
mcny
I don’t know about google or Facebook but I imagine I could argue the secret
sauce is configuration which (I anal) I imagine is not something you’d have to
release under any GPL. The threat isn’t so much that someone will build a
competing google as much as I think it is someone will game our system. Just
my guess.

------
amai
It seems conceptually similar to Google Web Toolkit. So probably it is also a
nightmare to debug.

------
antoncohen
Be careful. This is licensed under the AGPL, which basically makes it
unusable. Or a commercial license can be purchased.

~~~
giancarlostoro
I'm surprised GitHub doesn't show this on the repository it just says "View
License" but I guess they don't allow using AGPL when creating a repository.

~~~
Yeaw
They do support showing AGPL 3.0, but it has to be either in a LICENSE.txt or
LICENSE.md. This project just has it in a file called LICENSE.
[https://help.github.com/articles/licensing-a-
repository/](https://help.github.com/articles/licensing-a-repository/)

------
SahAssar
Needing an ajax request to paginate a table seems like a big step backwards
from modern web applications.

~~~
danpalmer
Am I missing something? Pagination would surely require a request, unless
you’re loading the full data set into the client up front, which would be a
bad idea in many use cases?

~~~
SahAssar
In this case the request is always needed since the request returns html, not
the actual data. In most frameworks (or even custom solutions) you can choose
to either load the data up-front or fetch each page on-demand.

------
bayesian_horse
At first glance this looks like an interesting take at pulling a lot of the
functionality back to the Python side of the web application.

It's not a webassembly framework, and it doesn't seem to go the "thin client"
approach of managing DOM changes and events over a two-way protocol.

------
tiuPapa
So how does this work? So is this like a templating where instead of writing a
template file, you write an app using widgets and element functions that the
framework provides and then stitch together an HTML page when requested and
send to the browser?

------
jaequery
I feel bad about projects like these, I really do. I'm sure a lot of effort
have been put in and it probably satisfies what OP wants to do. But in the
end, no one serious would ever consider using it.

~~~
macspoofing
>But in the end, no one serious would ever consider using it.

Why not?

I would say it is the other way around. For any web application project of
decent size there is almost always a transpilation step that converts whatever
programming language your source code is in, into JavaScript (usually ES5). We
also had very successful and widely used projects like GWT for years (GWT was
first released in 2006!!!).

~~~
paulie_a
Transpiling to JavaScript is a bug on the web, not a feature. node and npm is
a shit show. Having to deal with it a couple days ago. I wish that entire
ecosystem would just die.

I can make a sophisticated python web app with 20 packages. Or in JavaScript
I'll need a few hundred that have massive vulnerabilities and conflicts. Hell
npm reported the most modern packages I was installing had over 200
vulnerabilities. JavaScript pretty much guarantees shit code. I'll be
downvoted to hell, but whatever. Js sucks.

~~~
sl1ck731
I think this is a symptom of being accessible not the language or its tools.
NPM is fantastic and anytime I use Go or anything like that I miss it sorely.

Even javascript itself isn't "bad". There are ugly parts but anything written
in the modern spec is basically semantically the same as any other language
like python.

The problem is that people writing packages on the backend are bootcamp grads,
frontend devs, and any number of other people who don't take the backend as
seriously as someone who has been devoted to it using a non-javascript
language.

I think the other issue is the javascript community wants to reinvent itself
every couple months, instead of having one project that becomes defacto for x
function over many years.

~~~
theamk
I don't think it is possible to separate language from tools or community.
Those things are always together.

It is entirely possible that Javascript itself is an OK language, but it is
too late now. The community has already decided that packages should be tiny,
that changing prototype of "array" object is an acceptable thing to do, that
failing fast is bad and the best reaction to errors is to mess up the page
layout in the unexpected way, and so on.

Maybe one day, Javascript will re-invent itself and get reliable software
engineering practices. But I highly doubt that -- there are countless people
who know the laguage already, and they are not going to be changing their
opinions overnight.

~~~
untog
> changing prototype of "array" object is an acceptable thing to do

Uhh, no? I code in JS every day and do nothing of the sort, and I would object
if I saw it.

> failing fast is bad and the best reaction to errors is to mess up the page
> layout in the unexpected way

I don't even know what you mean by this, but the fact that you're conflating
JS with "the page" suggests to me that you're not that familiar with server-
side JS (which has no "page") and the enormous amount of code that is written
to be compatible with it.

~~~
coldtea
> _Uhh, no? I code in JS every day and do nothing of the sort, and I would
> object if I saw it._

If you use Babel you already have that, and just don't know about it. Most
"upcoming features" shims do just that.

------
Walkman
You took a declarative language (HTML) and mad it imperative (Python). Why is
that a good thing?

~~~
sgtcodfish
I've been thinking about this sort of thing a lot recently in terms of our
heavy use of Troposphere[1] which is a Python abstraction over AWS
CloudFormation and how much better that abstraction is than just writing HTML
(in the case of this library) or JSON/YAML (in the case of CloudFormation)
directly.

Ultimately, for me, it comes down to what makes sometimes complicated
declarative code easier to reason about, read and understand - it's a simple
as that.

Some things are just _easier_ to write when you've got the power of a Turing-
complete language with a decent standard library behind you; if for example
you want to dump out a sorted list and then be able to easily update it later,
or print a list of links alongside a hash of the contents of their targets.

I guess if you're building a simple website, anything like this tool could be
overkill and you'd risk spending more time setting things up - and maintaining
it in the future - than you'd be likely to save by using the tool in the first
place. But for more complicated output having more tools to use lets you be
arguably more declarative; you just change the input data to generate the
desired output. You describe and allow automation of the _transition_ from
input data to the desired end point.

I could definitely see how libraries like this would be tremendously useful
for generating HTML. As it happens for our AWS infrastructure generation we
enforce the use of Troposphere everywhere, because in that case the cost of
setting up and maintaining it is essentially just copy-pasting an existing
Makefile.

[1]
[https://github.com/cloudtools/troposphere/](https://github.com/cloudtools/troposphere/)

~~~
jgu
If you like troposphere, you'll love stacker:

[https://github.com/cloudtools/stacker](https://github.com/cloudtools/stacker)

------
azhenley
Very cool project. Are there any major apps that use Reahl? I can't find any.

------
EGreg
What's wrong with building them in Javascript :)

------
nickchuck
Haven't heard of this before. Seems cool!

------
elamje
What are big differences compared to Django and Flask?

------
mruniverse
"one language only" if you don't count the javascript, html and css.

~~~
eganist
> "one language only" if you don't count the javascript, html and css.

My hunch is that you strove for making the First Comment considering that the
point of this project is exactly what you said it isn't.

[https://www.reahl.org/layout](https://www.reahl.org/layout), for instance,
talks about how styling works.

Taking this further, here's a comment from one of the maintainers on the
relevant Google Group:

> Hello.

> We want casual users of Reahl to be shielded from complexities such as
> client side scripting and CSS.

> HOWEVER, if you are prepared to move to the next level of learning you can
> build your own Widgets. When you build your own Widget you can do anything
> you like - using techniques tutorial.pagerbootstraptutorial.pagerbootstrap
> that you would have used with a traditional framework.

Hopefully this answers your question.

~~~
mruniverse
The post title is misleading.

~~~
numbnuts
What do you think would be a better title? I read "web apps" I think html,
css, and js. I wasn't expecting (nor would I want to) to ship Python to the
browser.

~~~
eganist
That might be what's being lost in translation here. Python is the development
language. If we're to analogize, HTML/JS/CSS would be the runtime stack.
Perhaps this is what's lost on mruniverse

