javascript transpilers

87 views
Skip to first unread message

Mike Dewhirst

unread,
Jan 27, 2018, 5:45:39 PM1/27/18
to Django users
I have avoided javascript like the plague. However it seems I have to
bite the bullet. Interestingly, there are now a number of Python ->
Javascript transpilers.

http://stromberg.dnsalias.org/~strombrg/pybrowser/python-browser.html

Where would be a good place to start a discussion on the topic?

I am self-employed  with multiple demands on my time so I cannot afford
to allocate sufficient time to learn it let alone undertake formal
Javascript training. My hope is to pick it up by osmosis and wonder if a
transpiler would help.

Thanks for any pointers

Mike

Andréas Kühne

unread,
Jan 28, 2018, 9:05:35 AM1/28/18
to django...@googlegroups.com
Hi,

I think you are making things worse by adding a transpiler from python code to javascript. Yes you will be working in a language you are familiar with, but you will still need to understand the underlying javascript to debug issues (things will happen that are strange because of javsascripts untyped nature). You will still need to understand the fundementals of DOM handling. Also, because python-browser isn't widely adopted, you will be stuck searching for answers to your problems....I think you are better off learning the amount of javascript that you need to learn and stick with it. 

Regards,

Andréas



Mike

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fa0e9f0b-fece-344d-74f2-5b9470b40657%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Jason

unread,
Jan 28, 2018, 11:00:42 AM1/28/18
to Django users
I have to agree with Andreas about this.  If you want to look at a somewhat successful project, consider the Google Web Toolkit project which allows developers to write large scale web applications in Java.  The compilation process outputs JS, CSS and HTML.

Its an ok and acceptable approach if you're working on an enterprise project with little to no in-house knowledge of Javascript, nor time to learn.  However, there are some significant caveats about usability and complexity, which I think 95% of GWT projects never needed to be done in GWT.


On Sunday, January 28, 2018 at 9:05:35 AM UTC-5, Andréas Kühne wrote:
Hi,

I think you are making things worse by adding a transpiler from python code to javascript. Yes you will be working in a language you are familiar with, but you will still need to understand the underlying javascript to debug issues (things will happen that are strange because of javsascripts untyped nature). You will still need to understand the fundementals of DOM handling. Also, because python-browser isn't widely adopted, you will be stuck searching for answers to your problems....I think you are better off learning the amount of javascript that you need to learn and stick with it. 

Regards,

Andréas
2018-01-27 23:44 GMT+01:00 Mike Dewhirst <mi...@dewhirst.com.au>:
I have avoided javascript like the plague. However it seems I have to bite the bullet. Interestingly, there are now a number of Python -> Javascript transpilers.

http://stromberg.dnsalias.org/~strombrg/pybrowser/python-browser.html

Where would be a good place to start a discussion on the topic?

I am self-employed  with multiple demands on my time so I cannot afford to allocate sufficient time to learn it let alone undertake formal Javascript training. My hope is to pick it up by osmosis and wonder if a transpiler would help.

Thanks for any pointers


Mike

--
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.

Jani Tiainen

unread,
Jan 28, 2018, 11:10:48 AM1/28/18
to django...@googlegroups.com
Hi,

You don't describe to what extent you need to use JavaScript - IOW, what problem you need to solve with JavaScript?

Depending you needs you might get away with basic knowledge and usage of some helpful JavaScript library/framework.



Mike

--
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+unsubscribe@googlegroups.com.



--
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...

Avraham Serour

unread,
Jan 28, 2018, 11:50:23 AM1/28/18
to django-users
If you don't want and don't have the time to learn JS you may as well consider outsourcing the frontend work, I've worked in places that did just that and everybody was happy, the internal team liked python and the outsourced company people liked UX and JS.

Nick Sarbicki

unread,
Jan 28, 2018, 1:45:35 PM1/28/18
to django...@googlegroups.com

Agree with everything already said.

Only thing I want to add is that while js has historically been a horrible language, the modern standards have helped rectify this. Modern js can be almost pleasant to work with nowadays.

I wouldn't spend time transpiling python to js. Just try to learn js and maybe transpile from a modern standard to the browser standard. It's almost as easy as python to pick up.

Django compressor helps greatly in the last case.


On Sun, 28 Jan 2018, 16:49 Avraham Serour, <tov...@gmail.com> wrote:
If you don't want and don't have the time to learn JS you may as well consider outsourcing the frontend work, I've worked in places that did just that and everybody was happy, the internal team liked python and the outsourced company people liked UX and JS.
On Sun, Jan 28, 2018 at 6:09 PM, Jani Tiainen <red...@gmail.com> wrote:
Hi,

You don't describe to what extent you need to use JavaScript - IOW, what problem you need to solve with JavaScript?

Depending you needs you might get away with basic knowledge and usage of some helpful JavaScript library/framework.
On Sun, Jan 28, 2018 at 12:44 AM, Mike Dewhirst <mi...@dewhirst.com.au> wrote:
I have avoided javascript like the plague. However it seems I have to bite the bullet. Interestingly, there are now a number of Python -> Javascript transpilers.

http://stromberg.dnsalias.org/~strombrg/pybrowser/python-browser.html

Where would be a good place to start a discussion on the topic?

I am self-employed  with multiple demands on my time so I cannot afford to allocate sufficient time to learn it let alone undertake formal Javascript training. My hope is to pick it up by osmosis and wonder if a transpiler would help.

Thanks for any pointers


Mike

--
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.
--
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Mike Dewhirst

unread,
Jan 28, 2018, 6:02:09 PM1/28/18
to django...@googlegroups.com
That seems unanimous :(

Jani asked what problem I need to solve. Without going into analytical
detail, all the code is serverside and now the project needs to move
towards AJAX for user experience reasons.

M
> <http://stromberg.dnsalias.org/%7Estrombrg/pybrowser/python-browser.html>
>
> Where would be a good place to start a discussion on the
> topic?
>
> I am self-employed  with multiple demands on my time so I
> cannot afford to allocate sufficient time to learn it let
> alone undertake formal Javascript training. My hope is to
> pick it up by osmosis and wonder if a transpiler would help.
>
> Thanks for any pointers
>
> Mike
>
> --
> 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
> <mailto:django-users%2Bunsu...@googlegroups.com>.
> To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at
> https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fa0e9f0b-fece-344d-74f2-5b9470b40657%40dewhirst.com.au.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Jani Tiainen
>
> - Well planned is half done, and a half done has been
> sufficient before...
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHn91od4EbPY210baiuJq59cf2nEue6TQ1-3wiU8auk-uLKCYQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHn91od4EbPY210baiuJq59cf2nEue6TQ1-3wiU8auk-uLKCYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFWa6tJ_kfQ6RdW_d_QmXXTPt%2Bpt7HKPtnt_7eie17O60yaoaQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFWa6tJ_kfQ6RdW_d_QmXXTPt%2Bpt7HKPtnt_7eie17O60yaoaQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGuvt90b-QZ54tvfNAKDBMUV-saEMXsb4G72gLiRSp2tzxjqKw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGuvt90b-QZ54tvfNAKDBMUV-saEMXsb4G72gLiRSp2tzxjqKw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Andréas Kühne

unread,
Jan 29, 2018, 4:16:25 AM1/29/18
to django...@googlegroups.com
If that is the case - I would recommend looking into creating a single page app - with Django restframework on the backend if you want to continue with Django. For the frontend you will however be required to learn some sort of JS framework - however this doesn't have to be THAT bad. I personally like angular 5 - which is written in typescript - a javascript based language - that actually removes most of the pain. HOWEVER JS knowledge is good to have anyway....

There are other frameworks that don't require that much JS knowledge and Jason suggested GWT which sounds like it could be worth a shot, as long as it doesn't add to much complexity. The main reason for using that would be a large user base, so you can get help. The python transpiled JS versions don't really have the greatest user base :-)

Regards,

Andréas


            To post to this group, send email to
            django...@googlegroups.com
            <mailto:django-users@googlegroups.com>.

            Visit this group at
            https://groups.google.com/group/django-users.
            To view this discussion on the web visit
            https://groups.google.com/d/msgid/django-users/fa0e9f0b-fece-344d-74f2-5b9470b40657%40dewhirst.com.au.
            For more options, visit https://groups.google.com/d/optout.




        --         Jani Tiainen

        - Well planned is half done, and a half done has been
        sufficient before...
        --         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+unsubscribe@googlegroups.com
        <mailto:django-users+unsubscrib...@googlegroups.com>.

        To post to this group, send email to
        django...@googlegroups.com
        <mailto:django-users@googlegroups.com>.



        For more options, visit https://groups.google.com/d/optout.


    --     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,

    To post to this group, send email to django...@googlegroups.com
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com <mailto:django-users+unsubscrib...@googlegroups.com>.
To post to this group, send email to django...@googlegroups.com <mailto:django-users@googlegroups.com>.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.

Nick Sarbicki

unread,
Jan 29, 2018, 5:04:24 AM1/29/18
to django...@googlegroups.com
Going SPA when you don't know JS is very much a baptism of fire.

Angular is personally my favourite too and essentially forces the SPA model. But it has a much bigger learning curve compared to Vue and React (the other two common names thrown about nowadays). The others are also easier to not force into a SPA model.

Figure what's the minimum requirement first ;-).

            django-users...@googlegroups.com
            <mailto:django-users%2Bunsu...@googlegroups.com>.

            To post to this group, send email to
            django...@googlegroups.com
            <mailto:django...@googlegroups.com>.

            Visit this group at
            https://groups.google.com/group/django-users.
            To view this discussion on the web visit
            https://groups.google.com/d/msgid/django-users/fa0e9f0b-fece-344d-74f2-5b9470b40657%40dewhirst.com.au.
            For more options, visit https://groups.google.com/d/optout.




        --         Jani Tiainen

        - Well planned is half done, and a half done has been
        sufficient before...
        --         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
        <mailto:django-users...@googlegroups.com>.

        To post to this group, send email to
        django...@googlegroups.com
        <mailto:django...@googlegroups.com>.



        For more options, visit https://groups.google.com/d/optout.


    --     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,

    To post to this group, send email to django...@googlegroups.com
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com <mailto:django-users...@googlegroups.com>.
To post to this group, send email to django...@googlegroups.com <mailto:django...@googlegroups.com>.

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Mike Dewhirst

unread,
Jan 29, 2018, 11:19:45 PM1/29/18
to Django users
On 29/01/2018 9:03 PM, Nick Sarbicki wrote:
> Going SPA when you don't know JS is very much a baptism of fire.
>
> Angular is personally my favourite too and essentially forces the SPA
> model. But it has a much bigger learning curve compared to Vue and
> React (the other two common names thrown about nowadays). The others
> are also easier to not force into a SPA model.
>
> Figure what's the minimum requirement first ;-).

Single page is pretty close to the way the application currently works
so that is promising. It is a lightweight training framework. Simple
architecture of courses, instruction(s) and questions with answers
aggregating a total score for the student.

I won't publicise the URL because the server isn't heavy-duty. But if
there is any individual interest I'm happy to give it off-list. Today I
released the beta to the first client who (generously) is using it for
his troops to do online training on how to use some Windows software.

So back to the minimum requirement ...

The single (question) page has previous-question and next-question links
which morph into previous-instruction and next-instruction links when at
the first and last question respectively. So that is the SPA similarity.

When you click the [Save] button after answering a question there is no
indication the answer has been saved without adding a line of text (via
the view) after answer.save()

Refreshing the page resends the [Save] and reprints the line of text
saying the [Save] was successful. Too clunky.

It was that behaviour which made me start this thread.

I checked out typescript and it looks great but it is javascript. It
seems to let you code in ECMAScript 6 which is looking more like Python
and as Nick mentioned, has a compilation step (which I suppose is like a
minification step anyway) to get it into the version currently supported
by all browsers.

That prompted me to look more closely at a few of the transpilers in the
link I posted in the thread-starter. One stood out for me ...
http://www.transcrypt.org/

It seems the compilation to javascript takes place in the CI process and
it can be debugged in Python or Javascript. You can use both javascript
and/or python libraries. Written by a Dutchman which is possibly
interesting ;)

The Angular thing is interesting.
https://medium.com/@chriscordle/why-angular-2-4-is-too-little-too-late-ea86d7fa0bae

https://www.infoworld.com/article/3213244/javascript/whats-new-in-angular-5-easier-progressive-web-apps.html

From those articles, it seems React is lighter-weight than Angular and
for me that probably means easier to learn. It is still daunting though.
Vue also assumes javascript know-how.

I think my best plan is to postpone a decision and make a start on DRF
anyway. No matter what happens that is a prerequisite.

I hope it isn't wishful thinking but Transcrypt looks more attractive
than learning javascript plus a javascript framework.

Thanks to all for the excellent and very professional feedback.

Cheers

Mike



> On Mon, Jan 29, 2018 at 9:15 AM Andréas Kühne
> <andrea...@hypercode.se <mailto:andrea...@hypercode.se>> wrote:
>
> If that is the case - I would recommend looking into creating a
> single page app - with Django restframework on the backend if you
> want to continue with Django. For the frontend you will however be
> required to learn some sort of JS framework - however this doesn't
> have to be THAT bad. I personally like angular 5 - which is
> written in typescript - a javascript based language - that
> actually removes most of the pain. HOWEVER JS knowledge is good to
> have anyway....
>
> There are other frameworks that don't require that much JS
> knowledge and Jason suggested GWT which sounds like it could be
> worth a shot, as long as it doesn't add to much complexity. The
> main reason for using that would be a large user base, so you can
> get help. The python transpiled JS versions don't really have the
> greatest user base :-)
>
> Regards,
>
> Andréas
>
> 2018-01-29 0:00 GMT+01:00 Mike Dewhirst <mi...@dewhirst.com.au
> <mailto:mi...@dewhirst.com.au>>:
>
> That seems unanimous :(
>
> Jani asked what problem I need to solve. Without going into
> analytical detail, all the code is serverside and now the
> project needs to move towards AJAX for user experience reasons.
>
> M
>
> On 29/01/2018 5:44 AM, Nick Sarbicki wrote:
>
>
> Agree with everything already said.
>
> Only thing I want to add is that while js has historically
> been a horrible language, the modern standards have helped
> rectify this. Modern js can be almost pleasant to work
> with nowadays.
>
> I wouldn't spend time transpiling python to js. Just try
> to learn js and maybe transpile from a modern standard to
> the browser standard. It's almost as easy as python to
> pick up.
>
> Django compressor helps greatly in the last case.
>
>
> On Sun, 28 Jan 2018, 16:49 Avraham Serour,
> <tov...@gmail.com <mailto:tov...@gmail.com>
> <mailto:tov...@gmail.com <mailto:tov...@gmail.com>>> wrote:
>
>     If you don't want and don't have the time to learn JS
> you may as
>     well consider outsourcing the frontend work, I've
> worked in places
>     that did just that and everybody was happy, the
> internal team
>     liked python and the outsourced company people liked
> UX and JS.
>
>     On Sun, Jan 28, 2018 at 6:09 PM, Jani Tiainen
> <red...@gmail.com <mailto:red...@gmail.com>
>     <mailto:red...@gmail.com <mailto:red...@gmail.com>>>
> wrote:
>
>         Hi,
>
>         You don't describe to what extent you need to use
> JavaScript -
>         IOW, what problem you need to solve with JavaScript?
>
>         Depending you needs you might get away with basic
> knowledge
>         and usage of some helpful JavaScript
> library/framework.
>
>         On Sun, Jan 28, 2018 at 12:44 AM, Mike Dewhirst
>         <mi...@dewhirst.com.au
> <mailto:mi...@dewhirst.com.au>
> <mailto:mi...@dewhirst.com.au
> <mailto:django-users%2Bunsu...@googlegroups.com
> <mailto:django-users%252Buns...@googlegroups.com>>.
>             To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>.
>             Visit this group at
> https://groups.google.com/group/django-users.
>             To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fa0e9f0b-fece-344d-74f2-5b9470b40657%40dewhirst.com.au.
>             For more options, visit
> https://groups.google.com/d/optout.
>
>
>
>
>         --         Jani Tiainen
>
>         - Well planned is half done, and a half done has been
>         sufficient before...
>         --         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
> <mailto:django-users%2Bunsu...@googlegroups.com>
>         <mailto:django-users...@googlegroups.com
> <mailto:django-users%2Bunsu...@googlegroups.com>>.
>         To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>         <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>.
>         Visit this group at
> https://groups.google.com/group/django-users.
>         To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHn91od4EbPY210baiuJq59cf2nEue6TQ1-3wiU8auk-uLKCYQ%40mail.gmail.com
>        
> <https://groups.google.com/d/msgid/django-users/CAHn91od4EbPY210baiuJq59cf2nEue6TQ1-3wiU8auk-uLKCYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
>
>         For more options, visit
> https://groups.google.com/d/optout.
>
>
>     --     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
> <mailto:django-users%2Bunsu...@googlegroups.com>
>     <mailto:django-users...@googlegroups.com
> <mailto:django-users%2Bunsu...@googlegroups.com>>.
>     To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>     <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>.
>     Visit this group at
> https://groups.google.com/group/django-users.
>     To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFWa6tJ_kfQ6RdW_d_QmXXTPt%2Bpt7HKPtnt_7eie17O60yaoaQ%40mail.gmail.com
>    
> <https://groups.google.com/d/msgid/django-users/CAFWa6tJ_kfQ6RdW_d_QmXXTPt%2Bpt7HKPtnt_7eie17O60yaoaQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>     For more options, visit
> https://groups.google.com/d/optout.
>
> --
> 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
> <mailto:django-users%2Bunsu...@googlegroups.com>
> <mailto:django-users...@googlegroups.com
> <mailto:django-users%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
> <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>.
> Visit this group at
> https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGuvt90b-QZ54tvfNAKDBMUV-saEMXsb4G72gLiRSp2tzxjqKw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGuvt90b-QZ54tvfNAKDBMUV-saEMXsb4G72gLiRSp2tzxjqKw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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
> <mailto:django-users%2Bunsu...@googlegroups.com>.
> To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f92268fe-a077-a2d1-f8d4-64810031e2ae%40dewhirst.com.au.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK4qSCescFKH4vTrxSy1E3-HJ4n5-BZd5iw7%2BDQmuSkDqiua-g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK4qSCescFKH4vTrxSy1E3-HJ4n5-BZd5iw7%2BDQmuSkDqiua-g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGuvt91kwYH89pHpMCEV8gOzztNVddRCfCho8dBse4yGH900EA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGuvt91kwYH89pHpMCEV8gOzztNVddRCfCho8dBse4yGH900EA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Andréas Kühne

unread,
Jan 30, 2018, 2:34:31 AM1/30/18
to django...@googlegroups.com
2018-01-30 5:18 GMT+01:00 Mike Dewhirst <mi...@dewhirst.com.au>:
On 29/01/2018 9:03 PM, Nick Sarbicki wrote:
Going SPA when you don't know JS is very much a baptism of fire.

Angular is personally my favourite too and essentially forces the SPA model. But it has a much bigger learning curve compared to Vue and React (the other two common names thrown about nowadays). The others are also easier to not force into a SPA model.

Figure what's the minimum requirement first ;-).

Single page is pretty close to the way the application currently works so that is promising. It is a lightweight training framework. Simple architecture of courses, instruction(s) and questions with answers aggregating a total score for the student.

I won't publicise the URL because the server isn't heavy-duty. But if there is any individual interest I'm happy to give it off-list. Today I released the beta to the first client who (generously) is using it for his troops to do online training on how to use some Windows software.

So back to the minimum requirement ...

The single (question) page has previous-question and next-question links which morph into previous-instruction and next-instruction links when at the first and last question respectively. So that is the SPA similarity.

When you click the [Save] button after answering a question there is no indication the answer has been saved without adding a line of text (via the view) after answer.save()

Refreshing the page resends the [Save] and reprints the line of text saying the [Save] was successful. Too clunky.

If you are using django in the "normal" way - you should just be able to add the message to the messages contrib package. Then the message should show when saving? Because when you click on the save button you should post your form and that method should (when successful) add the message?
 

It was that behaviour which made me start this thread.

I checked out typescript and it looks great but it is javascript. It seems to let you code in ECMAScript 6 which is looking more like Python and as Nick mentioned, has a compilation step (which I suppose is like a minification step anyway) to get it into the version currently supported by all browsers.

Typescript is more of a object oriented language than javascript is - at least compared to ECMAScript 5. It also has some support for typing - and great unittest support - which is criticle when writing javascript....
 

That prompted me to look more closely at a few of the transpilers in the link I posted in the thread-starter. One stood out for me ... http://www.transcrypt.org/

It seems the compilation to javascript takes place in the CI process and it can be debugged in Python or Javascript. You can use both javascript and/or python libraries. Written by a Dutchman which is possibly interesting ;)

What you have to remember is that you still need to transpile it when running in development mode. So it really doesn't matter where you do your transpilation. You need to setup the transpilation even in development - a webb browser can't run python natively.
 

The Angular thing is interesting. https://medium.com/@chriscordle/why-angular-2-4-is-too-little-too-late-ea86d7fa0bae

https://www.infoworld.com/article/3213244/javascript/whats-new-in-angular-5-easier-progressive-web-apps.html

From those articles, it seems React is lighter-weight than Angular and for me that probably means easier to learn. It is still daunting though. Vue also assumes javascript know-how.

Yes react is more lightweight. However it is like comparing the flask framework with django. The difference is very similar. React is more a library and angular is a framework.
 

I think my best plan is to postpone a decision and make a start on DRF anyway. No matter what happens that is a prerequisite.

I hope it isn't wishful thinking but Transcrypt looks more attractive than learning javascript plus a javascript framework.

The main problem here is that you will still need to learn javascript - because you need to understand what will happen when your client-side code fails (and it will :-)). And my other point is still valid. Look at the user base. When you have problems with transcrypt, how many users can you rely on to get help? If you have a pure javascript problem - how many users can you rely on for help?

I do hope that you find a solution that works for you though :-)
  

Thanks to all for the excellent and very professional feedback.

Cheers

Mike


Regards,

Andréas
 


            django-users+unsubscribe@googlegroups.com
            <mailto:django-users%2Bunsubscri...@googlegroups.com>
                       
            <mailto:django-users%2Bunsubscri...@googlegroups.com
            <mailto:django-users%252Bunsubscr...@googlegroups.com>>.

                        To post to this group, send email to
            django...@googlegroups.com
            <mailto:django-users@googlegroups.com>
                        <mailto:django-users@googlegroups.com
            <mailto:django-users@googlegroups.com>>.

                        Visit this group at
            https://groups.google.com/group/django-users.
                        To view this discussion on the web visit
            https://groups.google.com/d/msgid/django-users/fa0e9f0b-fece-344d-74f2-5b9470b40657%40dewhirst.com.au.
                        For more options, visit
            https://groups.google.com/d/optout.




                    --         Jani Tiainen

                    - Well planned is half done, and a half done has been
                    sufficient before...
                    --         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+unsubscribe@googlegroups.com
            <mailto:django-users%2Bunsubscri...@googlegroups.com>
                    <mailto:django-users+unsubscrib...@googlegroups.com
            <mailto:django-users%2Bunsubscri...@googlegroups.com>>.

                    To post to this group, send email to
            django...@googlegroups.com
            <mailto:django-users@googlegroups.com>
                    <mailto:django-users@googlegroups.com
            <mailto:django-users@googlegroups.com>>.

                    Visit this group at
            https://groups.google.com/group/django-users.
                    To view this discussion on the web visit
            https://groups.google.com/d/msgid/django-users/CAHn91od4EbPY210baiuJq59cf2nEue6TQ1-3wiU8auk-uLKCYQ%40mail.gmail.com
                   
            <https://groups.google.com/d/msgid/django-users/CAHn91od4EbPY210baiuJq59cf2nEue6TQ1-3wiU8auk-uLKCYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.


                    For more options, visit
            https://groups.google.com/d/optout.


                --     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

                To post to this group, send email to
            django...@googlegroups.com
            <mailto:django-users@googlegroups.com>
                <mailto:django-users@googlegroups.com
            <mailto:django-users@googlegroups.com>>.

                Visit this group at
            https://groups.google.com/group/django-users.
                To view this discussion on the web visit
            https://groups.google.com/d/msgid/django-users/CAFWa6tJ_kfQ6RdW_d_QmXXTPt%2Bpt7HKPtnt_7eie17O60yaoaQ%40mail.gmail.com
               
            <https://groups.google.com/d/msgid/django-users/CAFWa6tJ_kfQ6RdW_d_QmXXTPt%2Bpt7HKPtnt_7eie17O60yaoaQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
                For more options, visit
            https://groups.google.com/d/optout.

            --             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

            To post to this group, send email to
            django...@googlegroups.com
            <mailto:django-users@googlegroups.com>
            <mailto:django-users@googlegroups.com
            <mailto:django-users@googlegroups.com>>.

            Visit this group at
            https://groups.google.com/group/django-users.
            To view this discussion on the web visit
            https://groups.google.com/d/msgid/django-users/CAGuvt90b-QZ54tvfNAKDBMUV-saEMXsb4G72gLiRSp2tzxjqKw%40mail.gmail.com
            <https://groups.google.com/d/msgid/django-users/CAGuvt90b-QZ54tvfNAKDBMUV-saEMXsb4G72gLiRSp2tzxjqKw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
            For more options, visit https://groups.google.com/d/optout.


        --         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+unsubscribe@googlegroups.com
        <mailto:django-users%2Bunsubscri...@googlegroups.com>.

        To post to this group, send email to
        django...@googlegroups.com
        <mailto:django-users@googlegroups.com>.

        Visit this group at https://groups.google.com/group/django-users.
        To view this discussion on the web visit
        https://groups.google.com/d/msgid/django-users/f92268fe-a077-a2d1-f8d4-64810031e2ae%40dewhirst.com.au.


        For more options, visit https://groups.google.com/d/optout.


    --     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,

    To post to this group, send email to django...@googlegroups.com

    Visit this group at https://groups.google.com/group/django-users.
    To view this discussion on the web visit

    For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com <mailto:django-users+unsubscrib...@googlegroups.com>.
To post to this group, send email to django...@googlegroups.com <mailto:django-users@googlegroups.com>.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.

Mike Dewhirst

unread,
Jan 31, 2018, 5:29:45 PM1/31/18
to django...@googlegroups.com
On 30/01/2018 6:33 PM, Andréas Kühne wrote:
> 2018-01-30 5:18 GMT+01:00 Mike Dewhirst <mi...@dewhirst.com.au
> <mailto:mi...@dewhirst.com.au>>:
Hadn't thought of that! Must investigate the messages package.


>
> It was that behaviour which made me start this thread.
>
> I checked out typescript and it looks great but it is javascript.
> It seems to let you code in ECMAScript 6 which is looking more
> like Python and as Nick mentioned, has a compilation step (which I
> suppose is like a minification step anyway) to get it into the
> version currently supported by all browsers.
>
>
> Typescript is more of a object oriented language than javascript is -
> at least compared to ECMAScript 5. It also has some support for typing
> - and great unittest support - which is criticle when writing
> javascript....

Agreed

>
> That prompted me to look more closely at a few of the transpilers
> in the link I posted in the thread-starter. One stood out for me
> ... http://www.transcrypt.org/
>
> It seems the compilation to javascript takes place in the CI
> process and it can be debugged in Python or Javascript. You can
> use both javascript and/or python libraries. Written by a Dutchman
> which is possibly interesting ;)
>
>
> What you have to remember is that you still need to transpile it when
> running in development mode. So it really doesn't matter where you do
> your transpilation. You need to setup the transpilation even in
> development - a webb browser can't run python natively.

True. However, Transcript produces Javascript. Interestingly you debug
in python or Javascript.

I'll have to allocate some time to investigate but in any case I think
DRF comes first.
> <https://medium.com/@chriscordle/why-angular-2-4-is-too-little-too-late-ea86d7fa0bae>
>
> https://www.infoworld.com/article/3213244/javascript/whats-new-in-angular-5-easier-progressive-web-apps.html
> <https://www.infoworld.com/article/3213244/javascript/whats-new-in-angular-5-easier-progressive-web-apps.html>
>
> >From those articles, it seems React is lighter-weight than
> Angular and for me that probably means easier to learn. It is
> still daunting though. Vue also assumes javascript know-how.
>
>
> Yes react is more lightweight. However it is like comparing the flask
> framework with django. The difference is very similar. React is more a
> library and angular is a framework.

I suspect React is super efficient. Facebook use it and they shave very
close to the bone.

>
> I think my best plan is to postpone a decision and make a start on
> DRF anyway. No matter what happens that is a prerequisite.
>
> I hope it isn't wishful thinking but Transcrypt looks more
> attractive than learning javascript plus a javascript framework.
>
>
> The main problem here is that you will still need to learn javascript
> - because you need to understand what will happen when your
> client-side code fails (and it will :-)). And my other point is still
> valid. Look at the user base. When you have problems with transcrypt,
> how many users can you rely on to get help? If you have a pure
> javascript problem - how many users can you rely on for help?

Excellent points. But it is difficult to dislodge wishful thinking.
There will be two sets of code. Python which I hope I can debug and
automatically generated Javascript which definitely will (I agree) have
bugs. I would have had to debug Javascript anyway and I reckon forced
debugging Javascript will let me skip the awful step of deciding to
learn Javascript. I mean that's a depressing decision to have to make.

Maybe by the time I get DRF working Transcrypt will have a few more
users? I really want to avoid Javascript. And I know Transcrypt would
not have been written unless the authors felt the same way. If it works
there will be a flood of users. It comes with a lot of promise(s).

>
> I do hope that you find a solution that works for you though :-)

Haven't made any decisions yet - apart from DRF and the messages
investigation.

Many thanks for helping :)

Mike


>
> Thanks to all for the excellent and very professional feedback.
>
> Cheers
>
> Mike
>
>
> Regards,
>
> Andréas
>
>
>
> On Mon, Jan 29, 2018 at 9:15 AM Andréas Kühne
> <andrea...@hypercode.se
> <mailto:andrea...@hypercode.se>
> <mailto:andrea...@hypercode.se
>     <mailto:mi...@dewhirst.com.au
> <http://stromberg.dnsalias.org/%7Estrombrg/pybrowser/python-browser.html>>
>
>            
> <http://stromberg.dnsalias.org/%7Estrombrg/pybrowser/python-browser.html
> <http://stromberg.dnsalias.org/%7Estrombrg/pybrowser/python-browser.html>>
>
>                         Where would be a good place to start a
>             discussion on the
>                         topic?
>
>                         I am self-employed  with multiple
> demands on
>             my time so I
>                         cannot afford to allocate sufficient
> time to
>             learn it let
>                         alone undertake formal Javascript
> training. My
>             hope is to
>                         pick it up by osmosis and wonder if a
>             transpiler would help.
>
>                         Thanks for any pointers
>
>                         Mike
>
>                         --             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
> <mailto:django-users%2Bunsu...@googlegroups.com
> <mailto:django-users%252Buns...@googlegroups.com>
>            
> <mailto:django-users%252Buns...@googlegroups.com
> <mailto:django-users%25252Bun...@googlegroups.com>>>.
>                         To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>
>                         <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>>.
>                         Visit this group at
> https://groups.google.com/group/django-users
> <https://groups.google.com/group/django-users>.
>                         To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fa0e9f0b-fece-344d-74f2-5b9470b40657%40dewhirst.com.au
> <https://groups.google.com/d/msgid/django-users/fa0e9f0b-fece-344d-74f2-5b9470b40657%40dewhirst.com.au>.
>                         For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>
>
>                     --         Jani Tiainen
>
>                     - Well planned is half done, and a half
> done has been
>                     sufficient before...
>                     --         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
> <mailto:django-users...@googlegroups.com
> <mailto:django-users%2Bunsu...@googlegroups.com>
>            
> <mailto:django-users%2Bunsu...@googlegroups.com
> <mailto:django-users%252Buns...@googlegroups.com>>>.
>                     To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>
>                     <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>>.
>                     Visit this group at
> https://groups.google.com/group/django-users
> <https://groups.google.com/group/django-users>.
> <https://groups.google.com/d/msgid/django-users/CAHn91od4EbPY210baiuJq59cf2nEue6TQ1-3wiU8auk-uLKCYQ%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
>
>                 --     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
> <mailto:django-users...@googlegroups.com
> <mailto:django-users%2Bunsu...@googlegroups.com>
>            
> <mailto:django-users%2Bunsu...@googlegroups.com
> <mailto:django-users%252Buns...@googlegroups.com>>>.
>                 To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>
>                 <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>>.
>                 Visit this group at
> https://groups.google.com/group/django-users
> <https://groups.google.com/group/django-users>.
> <https://groups.google.com/d/msgid/django-users/CAFWa6tJ_kfQ6RdW_d_QmXXTPt%2Bpt7HKPtnt_7eie17O60yaoaQ%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
>             --             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
>             <mailto:django-users...@googlegroups.com
> <mailto:django-users%2Bunsu...@googlegroups.com>
>            
> <mailto:django-users%2Bunsu...@googlegroups.com
> <mailto:django-users%252Buns...@googlegroups.com>>>.
>             To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>             <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>>.
>             Visit this group at
> https://groups.google.com/group/django-users
> <https://groups.google.com/group/django-users>.
> <https://groups.google.com/d/msgid/django-users/CAGuvt90b-QZ54tvfNAKDBMUV-saEMXsb4G72gLiRSp2tzxjqKw%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
>
>         --         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
> <mailto:django-users%252Buns...@googlegroups.com>>.
>         To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>         <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>.
>         Visit this group at
> https://groups.google.com/group/django-users
> <https://groups.google.com/group/django-users>.
>         To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f92268fe-a077-a2d1-f8d4-64810031e2ae%40dewhirst.com.au
> <https://groups.google.com/d/msgid/django-users/f92268fe-a077-a2d1-f8d4-64810031e2ae%40dewhirst.com.au>.
>
>
>         For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>     --     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,
> <mailto:django-users%2Bunsu...@googlegroups.com>>.
>     To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
>     <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>.
>     Visit this group at
> https://groups.google.com/group/django-users
> <https://groups.google.com/group/django-users>.
> <https://groups.google.com/d/msgid/django-users/CAK4qSCescFKH4vTrxSy1E3-HJ4n5-BZd5iw7%2BDQmuSkDqiua-g%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
> --
> 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
> <mailto:django-users%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
> <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>.
> <https://groups.google.com/group/django-users>.
> <https://groups.google.com/d/msgid/django-users/CAGuvt91kwYH89pHpMCEV8gOzztNVddRCfCho8dBse4yGH900EA%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
>
> --
> 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
> <mailto:django-users%2Bunsu...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> <https://groups.google.com/group/django-users>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/35695cf3-8408-a566-2a11-092a269907ed%40dewhirst.com.au
> <https://groups.google.com/d/msgid/django-users/35695cf3-8408-a566-2a11-092a269907ed%40dewhirst.com.au>.
>
>
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK4qSCeiUScRfhWmiHwithcbnMgo9yrxpXNFR3fPA10JtKSY0A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK4qSCeiUScRfhWmiHwithcbnMgo9yrxpXNFR3fPA10JtKSY0A%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Matthew Pava

unread,
Jan 31, 2018, 5:52:10 PM1/31/18
to django...@googlegroups.com
I just want to point out something called WebAssembly. It's supported across all modern browsers. Presumably, you can write a program in Python, convert it to WebAssembly, and it will run in your browser. I haven't worked with it myself, but I am keeping my eye on it because I would like to think it will become more widely adopted in the not-so-distant future.
http://webassembly.org/
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/878214e6-3b49-2670-7718-15548de0fc64%40dewhirst.com.au.

Mike Dewhirst

unread,
Jan 31, 2018, 7:37:15 PM1/31/18
to Django users
On 1/02/2018 9:50 AM, Matthew Pava wrote:
> I just want to point out something called WebAssembly. It's supported across all modern browsers. Presumably, you can write a program in Python, convert it to WebAssembly, and it will run in your browser. I haven't worked with it myself, but I am keeping my eye on it because I would like to think it will become more widely adopted in the not-so-distant future.
> http://webassembly.org/

Cute demo!

If all the browser makers have agreed to make it work that does make it
interesting. But they all agreed on Javascript as well. I guess they
said they have one scripting language and don't need Python as another.
Better to introduce a compiler. What could possibly go wrong? All we
need now is a Python to WebAssembly transpiler ;)

Cheers

M

Mike Dewhirst

unread,
Feb 1, 2018, 3:24:19 AM2/1/18
to django...@googlegroups.com, Andréas Kühne
On 30/01/2018 6:33 PM, Andréas Kühne wrote:
> If you are using django in the "normal" way - you should just be able
> to add the message to the messages contrib package. Then the message
> should show when saving? Because when you click on the save button you
> should post your form and that method should (when successful) add the
> message?

Thank you Andréas. That works nicely. I hadn't used it before.

Mike


Jason

unread,
Feb 1, 2018, 8:54:36 AM2/1/18
to Django users


 IIRC wasm is not polyfillable or transpilable, so if you're targeting users on any of those red cells, then wasm is not for you.


Mike Dewhirst

unread,
Feb 1, 2018, 6:29:24 PM2/1/18
to django...@googlegroups.com
Agreed. I think it is interesting anyway but I already decided it is not
within my event horizon.

>
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/19bbbae1-eac0-4fea-b6f2-a1c72cfdb471%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/19bbbae1-eac0-4fea-b6f2-a1c72cfdb471%40googlegroups.com?utm_medium=email&utm_source=footer>.

Matemática A3K

unread,
Feb 5, 2018, 10:27:23 AM2/5/18
to django...@googlegroups.com
On Thu, Feb 1, 2018 at 8:27 PM, Mike Dewhirst <mi...@dewhirst.com.au> wrote:
On 2/02/2018 12:54 AM, Jason wrote:
https://caniuse.com/#feat=wasm


 IIRC wasm is not polyfillable or transpilable, so if you're targeting users on any of those red cells, then wasm is not for you.

Agreed. I think it is interesting anyway but I already decided it is not within my event horizon.

I wasn't sure about writing this, but anyway...

Mike,

I know how you feel, I have been there (avoiding JS), this is how I solved it: 
https://books.google.com.pe/books/about/JavaScript.html?id=PXa2bby0oQ0C&printsec=frontcover&source=kp_read_button&redir_esc=y#v=onepage&q&f=false
and:
http://learn.knockoutjs.com/#/?tutorial=intro
(it will give you the concepts about ""modern"" UI development in JS (not "pure" jQuery) before jumping into the big js framework world, and it also may solve your UI needs)

About the python transpiler, you still need to write code for the JS libraries, so you need to understand roughly how they work and how the coding is done for the browser. The problem is not JS here (which can be grasped easily with Crockford's book), but the coding pattern you have apply and how things are done - and you get that only by coding on it. Once you know that, you can write it on Python or JS.
HTH



--
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+unsubscribe@googlegroups.com <mailto:django-users+unsubscrib...@googlegroups.com>.
To post to this group, send email to django...@googlegroups.com <mailto:django-users@googlegroups.com>.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.

Mike Dewhirst

unread,
Feb 5, 2018, 5:08:48 PM2/5/18
to django...@googlegroups.com
Much appreciated. I'll definitely take your advice.

Cheers

M
> <mailto:django-users%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to
> django...@googlegroups.com
> <mailto:django...@googlegroups.com>
> <mailto:django...@googlegroups.com
> <mailto:django...@googlegroups.com>>.
> <https://groups.google.com/group/django-users>.
> <https://groups.google.com/d/msgid/django-users/19bbbae1-eac0-4fea-b6f2-a1c72cfdb471%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
>
> --
> 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
> <mailto:django-users%2Bunsu...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> <https://groups.google.com/group/django-users>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1f24a791-1a13-ecd8-f97c-6d5118ef8d41%40dewhirst.com.au
> <https://groups.google.com/d/msgid/django-users/1f24a791-1a13-ecd8-f97c-6d5118ef8d41%40dewhirst.com.au>.
>
>
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BFDnh%2BPxgV9drcsO8r38mvBBpU1eJra2sTcQ2BdstdRpEhErg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BFDnh%2BPxgV9drcsO8r38mvBBpU1eJra2sTcQ2BdstdRpEhErg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages