[BangPypers] Regarding web framework in Python

Pradeep Gowda pradeep at btbytes.com
Thu Jun 3 15:15:52 CEST 2010


On Thu, Jun 3, 2010 at 3:45 AM, Jins Thomas <jinsthomas at gmail.com> wrote:
> On Sat, Jan 30, 2010 at 12:32 AM, Pradeep Gowda <pradeep at btbytes.com> wrote:
>
>> On Fri, Jan 29, 2010 at 3:47 AM, Jins Thomas <jinsthomas at gmail.com> wrote:
>> > Hi All,
>> >
>> > Would like to ask one suggestion from bangpypers.
>> >
>> > I have a oracle  database in Unix and need to create a web based GUI to
>> > execute some queries/scripts  (via buttons) and save that in csv either
>> in
>> > Unix or in windows. I was thinking of using Django framework. Btw i'm
>> > relatively new in python.  Woud anybody please suggest whether Django is
>> a
>> > good candidate for this. I succesfully installed Django and worked with
>> some
>> > sample codes. Is there any similar framework which is more  reccomondable
>> > than Django. Atleast this time i want to get this done with python. Many
>> > times i wanted to do things in python for some reason or other reason i
>> was
>> > forced to use some other technology.  I have some doubts like
>> >
>> > 1. Django sample webserver cannot be used when it's mission critical?
>>  Will
>> > this django framework supports apache or tomcat servers.
>> >
>> > 2. Certain query results i would like to display in graphs. I had mailed
>> > before asking suggestion for creating charts/bar/pie graphs with python
>> and
>> > got a good number of suggestions like pychart, pygoogle chart open flash
>> > etc. I was just thinking how difficult is to integrate these stuffs in
>> > Django framework. Also couldn't actually finalize a good framework to use
>> > for creating this graphs. I'm absolutely in confusion which'll be better
>> to
>> > use. Would anybody suggest what's the usual thought process in taking
>> > decisions like this.
>>
>> Django is an overkill for something like this.
>>
>> web.py is what you should be looking at. If you already are programming
>> in python, web.py will give you the web library without trying to introduce
>> new concepts on URL dispatch, ORM etc.,
>>
>> Web.py has a very decent db api for most common db operations
>> You can fall back to raw SQL with ease.
>>
>
> Hi all,
>
> I asked some doubts on this topic around 6 months back. Later that project
> itself got delayed. Now it's again back.
>
> I should apologize that mean time i had planned to ramp myself in python,
> but didnt work out. One reason of escapism:  work load !!
>
> Current requirement is like we are planning to build such an application
> which should have
>
> 1.  (Web) client gui  which can connect to a database, run some perl scripts
> at the back end, gives back the results in the gui (results can be some
> tabular inputs, paragraphs, charts, schematic diagrams etc.)
>
> 2. It should have some drag and drop facility and connect the objects  to
> configure some rule sets, saveas options etc.
>
> Basically there are some quite a bit debates happening whether it should be
> a web gui, or a thick client (which connects to the database).
>
> Would some body please advice when free on
>
> 1.  Whether web.py itself is the good option for building this kind of
> framework.
>
> 2 . How easy would it be to  build such an application in python (Currently
> i should rate my python skills to be almost beginner level)
>
> 3.  I was looking for some frameworks like vaadin in a python, does anybody
> knows about such a framework.
>
> 4. For all this frameworks, we need apache like webserver right. I found
> web.py's independent sample webserver, Is it advisable to use such a
> webserver to avoid other third party installations.
>
> 5. What's your opinion on Web client vs Thick client for such an
> application. If it's thick client, architects here  are forcing to use
> TCL/Tk to build. But my feel is it's lacking look and feel.
>
> Many thanks for the patience to read this.

Looks like  you and many in your team desire a desktop like behaviour..
So, as Noufal suggested it is better to create web services which query the
backend(perl scripts, database etc.,) and provide data to clients in
json/xml format.

It is easier to code drag and drop like behaviour in a desktop widget
than in a web app, especially
if you are not a javascript/ajax expert already.

It appears you may be building an app for in house use, may be even
something to
do with sys administration and reporting. In which case, the look and
feel of tcl/tk, which
has improved by leaps and bounds in 8.5, should not be a huge concern.

However, If you want to have near-native UI look and feel and also
have a modern widget toolkit,
take a look at PyQt or wxPython.

To answer your other questions in particular order,

 * web.py can be run with apache using mod_wsgi and mod_python and of
course mod_proxy.
 * The equivalent of vaadin would be Pyjamas, which is a port of GWT to python.

When you are a beginner, it is easy to succumb to advice by experts on
the internet.
So, let your own experiments guide what suits you best.

Remember, Simple is better than complex; esp when you are a beginner ;)

happy hacking,
+PG


More information about the BangPypers mailing list