The "bizarre reason" of why we want to debug our code integrated with JS is 
that we want to take advantage of the huge amount of great javascript UI 
libraries that are out there. Why would we ignore those and have to 
reimplement a lot of stuff in Python code? Pyjs can already interface with 
JS libraries, so I think it is reasonable to also want to debug such code.

I do not want this to get into a flame war about the preferred way to do UI 
development. But I actually think HTML+CSS+JS libraries (if done right) are 
a better way to implement a web user interface, compared to a pure GWT 
approach. To me it always seems that GWT ignores a lot of the advantages 
that a web UI can have and instead tries to bring everything back to the 
way apps are written on the desktop. This makes sense if you try to bring 
Java developers to web development (as was the original goal of Googles 
GWT), but nowadays there are a lot of great web developers out there that 
know and understand the browser. Combine that with the huge amount of JS 
libraries out there and you can rapidly develop great UIs.

As to the question of why we don't want to use JS directly: because it 
leads to hard-to-find bugs (for example, related to its brain dead scoping 
and handling of closures). I have also seen a tendency for it to produce 
code that is hard to read and understand for other developers.
Python is the complete opposite. It is very hard to write convoluted code 
in Python and it is in general a very clean and structured language. That 
is why we chose it for the server side and it would be great to be able to 
use it for client side code as well. But without source maps I do not think 
that can happen (at least not with pyjs).

@Jim Washington: thank you for the suggestion of Dart. It is one of the 
options we are looking at.


On Thursday, March 13, 2014 10:31:44 PM UTC+1, Lex Berezhny wrote:
>
> If someone wants to use JavaScript development tools I think it's only 
> honest to recommend that they use JavaScript as the language for 
> development.
>
> The great thing about Python is that you can use IDEs like PyCharm to 
> develop and debug your app. The original poster admits to use PyCharm for 
> server side code but for some bizarre reasons chooses to not for client 
> side.
>
> jQuery is great for JS style development but I think unnecessary if you're 
> building Object Oriented UIs in Python. You can just keep a reference to 
> the DOM elements as object members instead of searching the DOM each time 
> via jQuery.
>
> By using jQuery in pyjs you're defeating most of the advantages of Python.
>
>  - lex
>
>
> On Thu, Mar 13, 2014 at 3:17 PM, Glyph Lefkowitz 
> <gl...@twistedmatrix.com<javascript:>
> > wrote:
>
>>
>> On Mar 13, 2014, at 9:46 AM, Jim Washington 
>> <washing...@gmail.com<javascript:>> 
>> wrote:
>>
>> Give Dart a good look. Don't expect it to work well with IE < 9, or other 
>> really old browsers. It has essentially the same quick development 
>> turnaround as pyjs with the native client. Aside from the semicolons and 
>> curly braces, it feels a lot more like python than javascript. The recent 
>> release of Angular.dart makes it really worth investigating.
>>
>>
>> I thought this was the PyJS list, not the "random suggestions for better 
>> JavaScript generators" list?
>>
>> -glyph
>>
>>
>

-- 

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