demexp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Seperate Python scripts or web framework? (was: Re: [Demexp-dev] Web Cli


From: David MENTRE
Subject: Seperate Python scripts or web framework? (was: Re: [Demexp-dev] Web Client Interface [status])
Date: Sat, 20 Oct 2007 11:43:28 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Hello Lyu,

Lyu Abe <address@hidden> writes:

> By the way, now I can display question tags correctly on the top line of
> each question.

Yes!! :-)

> My concern now is how to manage the link to a question: when the user
> selects a question (whatever method is used) to consult the questions
> for example, it should link to a new page to display all the
> informations for the selected questions. Then, should I write a separate
> Python code? (then how to proceed to pass arguments like qu. numberm
> etc?)... or should I use functions and keep everything in a single
> code?... or something else?
>
> What are your suggestions?

Well, you are reaching the question: should you use a web framework
(e.g. Django or TurboGears in Python) or should you write your own
Python code to handle the different pages and links between them?

If you only want to concentrate on CSS layout, you can write separate
Python scripts (or even a single big one), each one doing a specific
task (login, display questions, display a specific question, vote on a
question, etc.). In that case, you assume that, at one point, somebody
(maybe you) will write some code to tie all those scripts together.

But if you want to write a complete and coherent web interface, I
strongly suggest that you take a look at an existing web framework,
Django[1] or TurboGears[2] being well-known frameworks in the Python
community. A framework provides a lot of code that helps make a web site
coherent and it provides tools to do usual web stuff (login management,
access rights, page layout, menus, etc.).

Thomas who is on this list has recently used Django to make a web site
(http://trivialibre.humanoidz.org/). He might give you is point of you
on the framework and you can look at his source code
(https://ssl.bulix.org/svn/thomas/trivialibre2/trunk/).


My own opinion: if you want to do a complete web interface, use an
already existing (and debugged!) web framework. As Django is already
used by Thomas, if Thomas sees Django as a correct framework, use
Django. 


A note regarding availability on zero.demexp.org, our official demexp
server (mainly for my co-admin Fred): Django 0.95.1 is available as a
Debian package. Django can work with PosgreSQL 8.1.

Have fun!

Yours,
d.

Footnotes: 
[1]  http://www.djangoproject.com/

[2]  http://turbogears.org/

-- 
GPG/PGP key: A3AD7A2A David MENTRE <address@hidden>
 5996 CC46 4612 9CA4 3562  D7AC 6C67 9E96 A3AD 7A2A




reply via email to

[Prev in Thread] Current Thread [Next in Thread]