Thanks for letting me know about Brython. I studied it for a while, and I 
had impression that it didn't provide Model-View-Controller structure 
because it's main goal is to replace Javascript with Python (Please correct 
me if I am wrong). I think that simply replacing javascript syntax is not 
really (and not fully) Pythonic. 

Below is an example from Brython site. As you can see, the button id is 
inside html code, and its event controller is in Brython code. It make 
really difficult to read, and it is one of the reason why javascript is 
horrible in readability. 

<html>

<head>

<script src="/brython.js"></script>

</head>

<body onload="brython()">

<script type="text/python">

from browser import document, alert

def echo(ev):

    alert(document["zone"].value)

document['mybutton'].bind('click',echo)

</script>

<input id="zone"><button id="mybutton">click !</button>

</body>

</html>


I think that not only javascript but also html code all together should be 
replaced with Python to be fully pythonic. I am really happy with using 
Pyjs because I am writing quite a large web applications without html code, 
and Pyjs's Model-View-Controller structure really helps me write clean and 
reusable code. Brython might be developing further toward 
Model-View-Controller structure in the future, but I am worrying that 
rewritting my code to Brython right now is quite a huge job and the end 
results become worse in readability and reusability.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyjs-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to