Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #14965 > unrolled thread

Re: webapp development in pure python

Started byArnaud Delobelle <arnodel@gmail.com>
First post2011-10-25 15:13 +0100
Last post2011-10-26 22:04 -0700
Articles 15 — 10 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: webapp development in pure python Arnaud Delobelle <arnodel@gmail.com> - 2011-10-25 15:13 +0100
    Re: webapp development in pure python "Martin P. Hellwig" <martin.hellwig@gmail.com> - 2011-10-25 15:19 +0100
      Re: webapp development in pure python Laszlo Nagy <gandalf@shopzeus.com> - 2011-10-25 18:33 +0200
        Re: webapp development in pure python alex23 <wuwei23@gmail.com> - 2011-10-25 20:15 -0700
        Re: webapp development in pure python Rebelo <puntabluda@gmail.com> - 2011-10-26 00:29 -0700
          Re: webapp development in pure python Roy Smith <roy@panix.com> - 2011-10-26 09:06 -0400
        Re: webapp development in pure python Rebelo <puntabluda@gmail.com> - 2011-10-26 00:29 -0700
      RE: webapp development in pure python "Sells, Fred" <fred.sells@adventistcare.org> - 2011-10-25 23:00 -0400
      RE: webapp development in pure python "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2011-10-26 17:47 -0400
      Re: webapp development in pure python Chris Angelico <rosuav@gmail.com> - 2011-10-27 14:05 +1100
        Re: webapp development in pure python 88888 Dihedral <dihedral88888@googlemail.com> - 2011-10-26 22:04 -0700
          Re: webapp development in pure python Chris Angelico <rosuav@gmail.com> - 2011-10-27 16:18 +1100
            Re: webapp development in pure python 88888 Dihedral <dihedral88888@googlemail.com> - 2011-10-26 23:37 -0700
            Re: webapp development in pure python 88888 Dihedral <dihedral88888@googlemail.com> - 2011-10-26 23:37 -0700
        Re: webapp development in pure python 88888 Dihedral <dihedral88888@googlemail.com> - 2011-10-26 22:04 -0700

#14965 — Re: webapp development in pure python

FromArnaud Delobelle <arnodel@gmail.com>
Date2011-10-25 15:13 +0100
SubjectRe: webapp development in pure python
Message-ID<mailman.2209.1319552029.27778.python-list@python.org>
On 25 October 2011 14:50, Laszlo Nagy <gandalf@shopzeus.com> wrote:
>
>  Hi,
>
> Anyone knows a framework for webapp development? I'm not talking about
> javascript/html compilers and ajax frameworks. I need something that does
> not require javascript knowledge, just pure Python. (So qooxdoo is not
> really an option, because it cannot be programmed in Python. You cannot even
> put out a window on the center of the screen without using javascript code,
> and you really have to be a javascript expert to write useful applications
> with qooxdoo.)
>
> What I need is a programmable GUI with windows, event handlers and
> extensible widgets, for creating applications that use http/https and a web
> browser for rendering.

So you're looking for something like Google Web Toolkit but using
Python instead of Java...

Do you know about pyjamas (http://pyjs.org/)?  I've never used it, but
I think it endeavours to be what you are looking for.

HTH

-- 
Arnaud

[toc] | [next] | [standalone]


#14966

From"Martin P. Hellwig" <martin.hellwig@gmail.com>
Date2011-10-25 15:19 +0100
Message-ID<j86gkm$77v$1@dont-email.me>
In reply to#14965
On 10/25/11 15:13, Arnaud Delobelle wrote:
> On 25 October 2011 14:50, Laszlo Nagy<gandalf@shopzeus.com>  wrote:
>>
>>   Hi,
>>
>> Anyone knows a framework for webapp development? I'm not talking about
>> javascript/html compilers and ajax frameworks. I need something that does
>> not require javascript knowledge, just pure Python. (So qooxdoo is not
>> really an option, because it cannot be programmed in Python. You cannot even
>> put out a window on the center of the screen without using javascript code,
>> and you really have to be a javascript expert to write useful applications
>> with qooxdoo.)
>>
>> What I need is a programmable GUI with windows, event handlers and
>> extensible widgets, for creating applications that use http/https and a web
>> browser for rendering.
>
> So you're looking for something like Google Web Toolkit but using
> Python instead of Java...
>
> Do you know about pyjamas (http://pyjs.org/)?  I've never used it, but
> I think it endeavours to be what you are looking for.
>
> HTH
>

Second that, I use it for a couple of my projects for exactly that.

-- 
mph

[toc] | [prev] | [next] | [standalone]


#14972

FromLaszlo Nagy <gandalf@shopzeus.com>
Date2011-10-25 18:33 +0200
Message-ID<mailman.2213.1319560423.27778.python-list@python.org>
In reply to#14966
>>> Anyone knows a framework for webapp development? I'm not talking about
>>> javascript/html compilers and ajax frameworks. I need something that 
>>> does
>>> not require javascript knowledge, just pure Python. (So qooxdoo is not
>>> really an option, because it cannot be programmed in Python. You 
>>> cannot even
>>> put out a window on the center of the screen without using 
>>> javascript code,
>>> and you really have to be a javascript expert to write useful 
>>> applications
>>> with qooxdoo.)
>>>
>>> What I need is a programmable GUI with windows, event handlers and
>>> extensible widgets, for creating applications that use http/https 
>>> and a web
>>> browser for rendering.
>>
>> So you're looking for something like Google Web Toolkit but using
>> Python instead of Java...
>>
>> Do you know about pyjamas (http://pyjs.org/)?  I've never used it, but
>> I think it endeavours to be what you are looking for.
As I told, I'm not talking about javascript/html compilers and ajax 
frameworks. Pyjamas is both a javascript compiler and  an ajax 
framework. My Python module would connect to a database server and query 
some data, then display it in a grid. This cannot be compiled into 
javascript because of the database server connection. With pyjamas, I 
would have to create the server side part separately, the user interface 
separately, and hand-code the communication between the widets and the 
server side. I would like to use this theoretical web based framework 
just like pygtk or wxPython: create windows, place widgets on them, 
implement event handlers etc. and access the widgets and other server 
side resources (for example, a database connection) from the same source 
code. Transparently. So the web part would really just be the rendering 
part of the user inferface. This may not be possible at all..

My other idea was to use a freenx server and wxPython. Is it a better 
solution? Have anyone used this combination from an android tablet, for 
example? Would it work?

Thanks,

    Laszlo

[toc] | [prev] | [next] | [standalone]


#14994

Fromalex23 <wuwei23@gmail.com>
Date2011-10-25 20:15 -0700
Message-ID<571a97cb-5ebc-4882-ad67-1ff7953383b7@u10g2000prl.googlegroups.com>
In reply to#14972
Laszlo Nagy <gand...@shopzeus.com> wrote:
> My Python module would connect to a database server and query
> some data, then display it in a grid. This cannot be compiled into
> javascript because of the database server connection.

So what you want is for everything to happen server-side, with html
output sent to the client?

Perhaps you could build on top of ToscaWidgets. They encapsulate HTML
& JS, so you'll still need to work with them for custom widgets.

> With pyjamas, I
> would have to create the server side part separately, the user interface
> separately, and hand-code the communication between the widets and the
> server side.

That's pretty much true of all non-trivial web development, though.

There's a lot to be said for sucking it up and embracing traditional
methods rather than flying against common wisdom and cobbling together
something that works against web technologies rather than with them.

[toc] | [prev] | [next] | [standalone]


#14995

FromRebelo <puntabluda@gmail.com>
Date2011-10-26 00:29 -0700
Message-ID<18902163.1637.1319614150053.JavaMail.geo-discussion-forums@yqp37>
In reply to#14972
Try Pylons. Use html templates which get populated with data from your database and then just render them. If you just want to display data, with simple forms for editing and adding Pylons framework is more then enough.

http://pylonsbook.com/en/1.1/
http://www.pylonsproject.org/

[toc] | [prev] | [next] | [standalone]


#14999

FromRoy Smith <roy@panix.com>
Date2011-10-26 09:06 -0400
Message-ID<roy-E338D4.09061426102011@news.panix.com>
In reply to#14995
In article 
<18902163.1637.1319614150053.JavaMail.geo-discussion-forums@yqp37>,
 Rebelo <puntabluda@gmail.com> wrote:

> Try Pylons. Use html templates which get populated with data from your 
> database and then just render them. If you just want to display data, with 
> simple forms for editing and adding Pylons framework is more then enough.
> 
> http://pylonsbook.com/en/1.1/
> http://www.pylonsproject.org/

If you're looking at web frameworks, you should also look at 
http://www.tornadoweb.org/.  It's more of a HTTP engine than a 
application framework, but has some elements of both.  We use it for 
lots of small HTTP tools we write.

But, to go back to the OP's request:

> What I need is a programmable GUI with windows, event handlers and
> extensible widgets, for creating applications that use http/https and a web
> browser for rendering.

combined with:

> I need something that does not require javascript knowledge, just pure Python.

I'm not sure there's a good answer to that.  If you're talking GUIs, 
windows, and extensible widgets, it really sounds like the kinds of 
things you're trying to do are going to require javascript.  I'm not a 
huge fan of javascript, but the reality today is that for any kind of 
interactive UI in a web browser, you need to go there.  Well, or Flash, 
but that's probably even more evil.

You might want to look at [[Dart (programming language)]], but that's 
more of a research project than a tool at the moment.  Check out that 
wikipedia page, however, it's got some pointers to other similar 
projects people are working on.

[toc] | [prev] | [next] | [standalone]


#14996

FromRebelo <puntabluda@gmail.com>
Date2011-10-26 00:29 -0700
Message-ID<mailman.2224.1319614152.27778.python-list@python.org>
In reply to#14972
Try Pylons. Use html templates which get populated with data from your database and then just render them. If you just want to display data, with simple forms for editing and adding Pylons framework is more then enough.

http://pylonsbook.com/en/1.1/
http://www.pylonsproject.org/

[toc] | [prev] | [next] | [standalone]


#14993

From"Sells, Fred" <fred.sells@adventistcare.org>
Date2011-10-25 23:00 -0400
Message-ID<mailman.2223.1319598115.27778.python-list@python.org>
In reply to#14966
Quixote may be what you want, but it's been years since I've used it and
I don't know if it is still alive and kicking.  It was from MEMS if I
remember correctly.

Using django and Flex is one way to avoid html and javascript and it
works great for datagrids.

Fred.

[toc] | [prev] | [next] | [standalone]


#15015

From"Prasad, Ramit" <ramit.prasad@jpmorgan.com>
Date2011-10-26 17:47 -0400
Message-ID<mailman.2239.1319665643.27778.python-list@python.org>
In reply to#14966
I am not really an expert web developer, so this is just my two cents.

> My Python module would connect to a database server and query 
>some data, then display it in a grid. This cannot be compiled into 
>javascript because of the database server connection. 

You technically can connect to databases from JavaScript. It is a terrible idea, but achievable. Not really sure how it would get "compiled" into JavaScript, so it is possible that is the stumbling block.
http://stackoverflow.com/questions/857670/how-to-connect-to-sql-server-database-from-javascript

>I would have to create the server side part separately, the user interface separately, and hand-code the communication between the widets and the server side.

As far as I know, this is the Right way to do a web/GUI apps; you may want to read about the MVC design pattern.

>I would like to use this theoretical web based framework just like pygtk or wxPython

Even in wxPython/pygtk, you should be using MVC pattern. Usually if your app is one class, you either have a trivial application or you are doing it wrong. Of course, that really applies to larger projects more than hacked together code for personal use.

Apologies in advance if I misunderstood something.

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--



This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

[toc] | [prev] | [next] | [standalone]


#15020

FromChris Angelico <rosuav@gmail.com>
Date2011-10-27 14:05 +1100
Message-ID<mailman.2245.1319684737.27778.python-list@python.org>
In reply to#14966
On Thu, Oct 27, 2011 at 8:47 AM, Prasad, Ramit
<ramit.prasad@jpmorgan.com> wrote:
> You technically can connect to databases from JavaScript. It is a terrible idea, but achievable. Not really sure how it would get "compiled" into JavaScript, so it is possible that is the stumbling block.
> http://stackoverflow.com/questions/857670/how-to-connect-to-sql-server-database-from-javascript
>

Strongly recommend against this. I haven't confirmed, but by the look
of it the code there is IE-only and MS SQL Server only. Also, remote
database access is a major security concern. I would recommend keeping
it all on the server (more efficient that way, too).

ChrisA

[toc] | [prev] | [next] | [standalone]


#15022

From88888 Dihedral <dihedral88888@googlemail.com>
Date2011-10-26 22:04 -0700
Message-ID<3173882.1086.1319691849561.JavaMail.geo-discussion-forums@prlk36>
In reply to#15020
I am thinking one has to distinguish between programs for database servers of   the commercial applications in banks or insurance companies that cant be hacked in low costs, and experiments to chunk out database servers for games and videos all over the world! 

[toc] | [prev] | [next] | [standalone]


#15024

FromChris Angelico <rosuav@gmail.com>
Date2011-10-27 16:18 +1100
Message-ID<mailman.2249.1319692731.27778.python-list@python.org>
In reply to#15022
On Thu, Oct 27, 2011 at 4:04 PM, 88888 Dihedral
<dihedral88888@googlemail.com> wrote:
> I am thinking one has to distinguish between programs for database servers of   the commercial applications in banks or insurance companies that cant be hacked in low costs, and experiments to chunk out database servers for games and videos all over the world!

I don't know about that. Best practices are often best for everyone;
it's more critical for a bank than for a game server, but that doesn't
mean the game server can afford to use swiss cheese as armor plate.
Particularly if it's the livelihood of the game designer; in fact,
that might even make it _more_ important than for a bank.

ChrisA

[toc] | [prev] | [next] | [standalone]


#15025

From88888 Dihedral <dihedral88888@googlemail.com>
Date2011-10-26 23:37 -0700
Message-ID<mailman.2250.1319697640.27778.python-list@python.org>
In reply to#15024
OK, lets start a framework in using python  in  the server side and the client side. 

(1). requirements of the server side first: 

1. sending  HTML, XML documents to be displayed  in the browsers of the clients  and receiving  for user inputs are  easy in  modpython, django, and etc.    

2. Data received in the server side has to be stored and verified for later accesses performed from client's requests

3. data and traffic  amounts  to be estimated for the server in order  to process requests in terms of numbers of clients and costs per defined operation period,  well, a slow  database engine that consumes a lot CPU time in  the server really sucks!


(2). Lets check the client side, too! 

In scenario 1  the client side has the browser operating only via port 80. 

In scenario 2 the client side has an AP. that could be invoked in the browser, e.g. Adobe PDF reader or Apple's quick time engine 

In scenario 3 AP. can invoke the browser to a cyber page  in the client side with multiple sockets via TCPIP/UDP of various ports in the AP., e.g. skype, msn, and etc..  

Assuming that programmers can use a customized  python package  installed  in the AP. of the client side with other tools is allowed.    
           

[toc] | [prev] | [next] | [standalone]


#15027

From88888 Dihedral <dihedral88888@googlemail.com>
Date2011-10-26 23:37 -0700
Message-ID<27201394.206.1319697421295.JavaMail.geo-discussion-forums@prng5>
In reply to#15024
OK, lets start a framework in using python  in  the server side and the client side. 

(1). requirements of the server side first: 

1. sending  HTML, XML documents to be displayed  in the browsers of the clients  and receiving  for user inputs are  easy in  modpython, django, and etc.    

2. Data received in the server side has to be stored and verified for later accesses performed from client's requests

3. data and traffic  amounts  to be estimated for the server in order  to process requests in terms of numbers of clients and costs per defined operation period,  well, a slow  database engine that consumes a lot CPU time in  the server really sucks!


(2). Lets check the client side, too! 

In scenario 1  the client side has the browser operating only via port 80. 

In scenario 2 the client side has an AP. that could be invoked in the browser, e.g. Adobe PDF reader or Apple's quick time engine 

In scenario 3 AP. can invoke the browser to a cyber page  in the client side with multiple sockets via TCPIP/UDP of various ports in the AP., e.g. skype, msn, and etc..  

Assuming that programmers can use a customized  python package  installed  in the AP. of the client side with other tools is allowed.    
           

[toc] | [prev] | [next] | [standalone]


#15023

From88888 Dihedral <dihedral88888@googlemail.com>
Date2011-10-26 22:04 -0700
Message-ID<mailman.2248.1319691857.27778.python-list@python.org>
In reply to#15020
I am thinking one has to distinguish between programs for database servers of   the commercial applications in banks or insurance companies that cant be hacked in low costs, and experiments to chunk out database servers for games and videos all over the world! 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web