Michal Vitecek
fuf at mobil.cz
Mon May 13 17:00:00 EST 2002
hello everyone, i'm taking a decision whether to use python or php in my next project. i'm leaning towards python and mod_python, but i found some problems/questions/ideas that i'd like to know answers to first. a) as i did my previous projects in php i now find it quite strange that i need to call a certain function of a script. this makes it a bit more difficult to use the few global variables that i plan to use and from time to time makes the whole program into a single function (one tab is taken) b) the publisher submodule needs to know the name of the function to run - would it be possible to change it so that it doesn't need it ie. run the whole script instead? c) the publisher submodule reads the whole output of a function to a variable - for a sites with large html pages this could be 100s of KBs. this could mean a noticeable performance slowdown - also because the output must be prepared first. how about if the function output the resulting html code to a stream? d) i noticed that the python interpreter is not the same even for a single virtualhost (even when i explicitly define its name with PythonInterpreter) => the persistence is kept only withing every apache child. with increase of the number of children a new interpreter is created that doesn't inherit from the main one (i'm using python 2.2.1 and apache 1.3.20). e) in php it's possible to have the php code mixed with the html one - ie. there are special marks, that mark the start and end of php code. i think it would be a nice option to have in mod_python because it helps imho to create scripts the allow for easy to review code. thank you for your time -- fuf (fuf at mobil.cz)
|