Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

webapp development in pure python

53 views
Skip to first unread message

Laszlo Nagy

unread,
Oct 25, 2011, 9:50:59 AM10/25/11
to pytho...@python.org

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.

Is there something like this already available?

Thanks,

Laszlo



Arnaud Delobelle

unread,
Oct 25, 2011, 10:13:45 AM10/25/11
to Laszlo Nagy, pytho...@python.org
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

Martin P. Hellwig

unread,
Oct 25, 2011, 10:19:52 AM10/25/11
to
Second that, I use it for a couple of my projects for exactly that.

--
mph

Laszlo Nagy

unread,
Oct 25, 2011, 12:33:30 PM10/25/11
to Martin P. Hellwig, pytho...@python.org

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

Sells, Fred

unread,
Oct 25, 2011, 11:00:52 PM10/25/11
to Laszlo Nagy, Martin P. Hellwig, pytho...@python.org
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.

alex23

unread,
Oct 25, 2011, 11:15:21 PM10/25/11
to
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.

Rebelo

unread,
Oct 26, 2011, 3:29:10 AM10/26/11
to Martin P. Hellwig, pytho...@python.org
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/

Rebelo

unread,
Oct 26, 2011, 3:29:10 AM10/26/11
to comp.lan...@googlegroups.com, pytho...@python.org, Martin P. Hellwig

Roy Smith

unread,
Oct 26, 2011, 9:06:14 AM10/26/11
to
In article
<18902163.1637.1319614150053.JavaMail.geo-discussion-forums@yqp37>,
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.

Prasad, Ramit

unread,
Oct 26, 2011, 5:47:03 PM10/26/11
to Laszlo Nagy, pytho...@python.org
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.

Chris Angelico

unread,
Oct 26, 2011, 11:05:33 PM10/26/11
to pytho...@python.org
On Thu, Oct 27, 2011 at 8:47 AM, Prasad, Ramit
<ramit....@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

88888 Dihedral

unread,
Oct 27, 2011, 1:04:09 AM10/27/11
to pytho...@python.org
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!

88888 Dihedral

unread,
Oct 27, 2011, 1:04:09 AM10/27/11
to comp.lan...@googlegroups.com, pytho...@python.org

Chris Angelico

unread,
Oct 27, 2011, 1:18:47 AM10/27/11
to pytho...@python.org
On Thu, Oct 27, 2011 at 4:04 PM, 88888 Dihedral
<dihedr...@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

88888 Dihedral

unread,
Oct 27, 2011, 2:37:01 AM10/27/11
to comp.lan...@googlegroups.com, pytho...@python.org
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.

88888 Dihedral

unread,
Oct 27, 2011, 2:37:01 AM10/27/11
to pytho...@python.org
0 new messages