Web Framework evaluation

DSS GUI will be Web based.

Requirements:
  • Web based GUI for an application interacting with a DB and triggering scripts (batch/grid commands)
  • management of persistency
  • easy way to implement a Sim DB

Some existing solutions

There is a lot of discussion arounf Ruby on Rails. Uses a new (for me) language, Ruby. Allows easy development of Web applications.

Alternative in Python:

These tools started around 2005 and have different level of maturity.

There are other solutions that range from Web generation tools to CMS solutions like Zope. A document with some comparisons is available here: http://www.b-list.org/weblog/2007/02/23/pycon-2007-web-frameworks-panel and another one: http://james.cooley.ie/2007/03/05/django_turbogears_rails_and_the_feature_curve.html

Try Django on tier2-06:

Installed

Some help pages

Tut http://www.djangoproject.com/documentation/tutorial02/

Web admin pages http://www.djangoproject.com/documentation/admin_css/

DB information, list of fields http://www.djangoproject.com/documentation/model-api/

Python and Grid tools

They are coming from a VDT client installation:
$ which python
/local/inst/vdtc/python/bin/python

DB drivers installation

SQLite was somewhat problematic, at the end system RPMs for RHEL3 worked and the python interface built on top of them (from source)

MySQL used for TAGs is installed in /opt/mysql MySQL_python-1.2.2 had problems compiling because was looking in /usr/local/lib; had to do by hand compilation steps, then at the end I've got it running:
[marco@tier2-06 MySQL-python-1.2.2]$ python setup.py --verbose build
executing: /opt/mysql/bin/mysql_config --libs_r
executing: /opt/mysql/bin/mysql_config --cflags
executing: /opt/mysql/bin/mysql_config --include
running build
running build_py
not copying _mysql_exceptions.py (output up-to-date)
not copying MySQLdb/__init__.py (output up-to-date)
not copying MySQLdb/converters.py (output up-to-date)
not copying MySQLdb/connections.py (output up-to-date)
not copying MySQLdb/cursors.py (output up-to-date)
copying MySQLdb/release.py -> build/lib.linux-i686-2.3/MySQLdb
not copying MySQLdb/times.py (output up-to-date)
not copying MySQLdb/constants/__init__.py (output up-to-date)
not copying MySQLdb/constants/CR.py (output up-to-date)
not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying MySQLdb/constants/ER.py (output up-to-date)
not copying MySQLdb/constants/FLAG.py (output up-to-date)
not copying MySQLdb/constants/REFRESH.py (output up-to-date)
not copying MySQLdb/constants/CLIENT.py (output up-to-date)
running build_ext
building '_mysql' extension
skipping _mysql.c (build/temp.linux-i686-2.3/_mysql.o up-to-date)
gcc -pthread -shared build/temp.linux-i686-2.3/_mysql.o /usr/local/lib/libmysqlc
lient_r.a -L/usr/local/lib -L/opt/mysql/lib -lmysqlclient_r -lz -lpthread -lcryp
t -lnsl -lm -lpthread -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_d
ns -lresolv -o build/lib.linux-i686-2.3/_mysql.so
gcc: /usr/local/lib/libmysqlclient_r.a: No such file or directory
error: command 'gcc' failed with exit status 1

[marco@tier2-06 MySQL-python-1.2.2]$ gcc -pthread -shared build/temp.linux-i686-2.3/_mysql.o /opt/mysql/lib/libmysqlclient_r.a  
-L/usr/local/lib -L/opt/mysql/lib -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lc -lnss_files -lnss_dns -lresolv -lc 
-lnss_files -lnss_dns -lresolv -o build/lib.linux-i686-2.3/_mysql.so

[marco@tier2-06 MySQL-python-1.2.2]$ python setup.py --verbose build
executing: /opt/mysql/bin/mysql_config --libs_r
executing: /opt/mysql/bin/mysql_config --cflags
executing: /opt/mysql/bin/mysql_config --include
running build
running build_py
not copying _mysql_exceptions.py (output up-to-date)
not copying MySQLdb/__init__.py (output up-to-date)
not copying MySQLdb/converters.py (output up-to-date)
not copying MySQLdb/connections.py (output up-to-date)
not copying MySQLdb/cursors.py (output up-to-date)
copying MySQLdb/release.py -> build/lib.linux-i686-2.3/MySQLdb
not copying MySQLdb/times.py (output up-to-date)
not copying MySQLdb/constants/__init__.py (output up-to-date)
not copying MySQLdb/constants/CR.py (output up-to-date)
not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying MySQLdb/constants/ER.py (output up-to-date)
not copying MySQLdb/constants/FLAG.py (output up-to-date)
not copying MySQLdb/constants/REFRESH.py (output up-to-date)
not copying MySQLdb/constants/CLIENT.py (output up-to-date)
running build_ext
skipping '_mysql' extension (up-to-date)

Current open issues with Django

  • help_text is not showing up in the forms. Probably because the oldforms library seem not to support it. I'm stuck with oldform because I'm using automatic views

-- MarcoMambelli - 11 Apr 2007
Topic revision: r5 - 13 Aug 2007, MarcoMambelli
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback