Idea

65 views
Skip to first unread message

Jet Ezra

unread,
Sep 18, 2021, 6:12:13 PM9/18/21
to Django users
I know this may not be necessary at the moment because we are comfortable depending on front-end frameworks, but I have my two ideas here:
1. what if django alone without any framework can be used to design progressive web apps, with routers that do not reload the page, we currently have one of the best routing but what if they support SPAs this time?
2. what if we could instead of Javascript in the templates, we write python, case in example is forexample how we write C# in .NET withing our templates not writing JavaScript. Currently DJango is requiring its developer to again go ahead and learn JS too, what if we remove that??
 

Helin Cao

unread,
Sep 19, 2021, 8:39:29 AM9/19/21
to django...@googlegroups.com
To answer your 2nd question: there is PyWebIO, an open-source library that allows you to write web UI using only Python and deploy it as a Django app: 

BTW, if you like other Python-based web frameworks, it also supports, such as Flask, FastAPI etc.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e050d91d-7c5b-40ff-8501-41d8008de627n%40googlegroups.com.

David Nugent

unread,
Sep 20, 2021, 4:47:09 AM9/20/21
to django...@googlegroups.com
Not at all a "new" topic :-)

On Sun, Sep 19, 2021 at 8:11 AM Jet Ezra <ezra...@gmail.com> wrote:
I know this may not be necessary at the moment because we are comfortable depending on front-end frameworks, but I have my two ideas here:
1. what if django alone without any framework can be used to design progressive web apps, with routers that do not reload the page, we currently have one of the best routing but what if they support SPAs this time?


Dynamic pages without having to write (much) javascript.  As a PWA, not sure, but it may be possible. Theoretically, HTMX would provide the ability to do a SPA in your template(s) and definitely worthy of more attention.
 
2. what if we could instead of Javascript in the templates, we write python, case in example is forexample how we write C# in .NET withing our templates not writing JavaScript. Currently DJango is requiring its developer to again go ahead and learn JS too, what if we remove that??

Until (and if ever) browsers support it. This is the bottom line.

This is almost the same case that nodejs users have put forward since it was invented - why learn 2 languages when 1 will do?  node backend and js front end, one language.

(not that I think this is a Good Thing :-))

TBH I don't consider learning multiple programming languages a particularly difficult thing, and one might argue that there are significant benefits in doing so.


Regards, David

Peter of the Norse

unread,
Oct 31, 2021, 7:31:33 PM10/31/21
to django...@googlegroups.com
I’m worried that you are getting on the wrong track here. All web development is necessarily client-server based. One of the signs of a poorly designed VB application is the way that you can put DB code in a button action. That isn't possible in a browser. Instead all it can do is contact the server.

There are several options for running Python in the browser instead of JS, but even if you use them the framework is different. You can’t really use Django in a browser, and you can’t use the DOM on a server. Every attempt to mix them has had way too many issues.

Peter of the Norse

unread,
Oct 31, 2021, 7:32:33 PM10/31/21
to django...@googlegroups.com
Most of the people that think switching to node.js only know PHP.  That’s why it looks like a good idea.

Shaheed Haque

unread,
Nov 1, 2021, 3:41:05 AM11/1/21
to django...@googlegroups.com
Oh and it's never one language at the front end. Start with HTML(5), throw in CSS and JS(ES6?). 

And that's before jQuery(old hat), Vue, React, Angular(N). All of which look suspiciously like domain specific languages in their mutual incompatibility despite being JS.

The reality is not of language choices, but that multiple domains have been found to exist, and trying to span them with one syntax is very hard. 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages