[GLLUG] PHP vs Python
marshal at idealso.com
Fri Nov 9 12:53:47 EST 2007
Thank you to all who replied. Some responses aggregrated together here:
First off, this is for our Enchilada project. Details are at
http://enchilada-project.com, although the design does need some
revising and improvements. I don't think much more progress is going
to be made until I'm actually developing something, hence this query.
The design changes will also depend on if I decide to use a framework.
As I think I've said, I don't have much experience with frameworks.
But, from what little I've seen, they work best when the objects you're
working with have a direct, 1 to 1 correlation in the database. ie,
this object with those attributes is this table with those fields. I'm
sure you can have objects without database tables, but I'm not as sure
about the reverse.
One of the things we'll be dealing with is that we'll have "entities"
which are a kind of generic object. And any entity can be associated
with any other entity through various relationships. These
relationships, of course, have to be tracked in the database. Also,
some modules will have data available to other modules, and will need
to announce this, in whatever way.
If we use a framework, that will provide some things like user
authentication and session management, although I don't think either of
those are particularly difficult. The problem comes in if the
framework's way of doing these isn't quite adequate. The further from
the framework's design you want to go, the harder it becomes to work
around the framework.
I'd love to use a framework, but I'm skeptical, and I'd rather not
discover halfway through that it's not going to be able to handle some
As an example, I tried doing this in Drupal. Drupal is billed as a
CMS, but was starting to look like a framework to me. After a little
work, I determined that Drupal is either a very versatile CMS or a very
limited framework. With the amount of custom coding, as opposed to
using built-in Drupal features, it didn't seem worth it. Which isn't
to say I haven't gained a few good ideas from Drupal.
As far as other languages, this will be an open source app for an open
source company, so I think that leaves out .NET and ColdFusion. And
I've never heard anyone say Java is fast. As far as bytecode, when you
import a python module, python generates a bytecode file for that
module the first time it's loaded. Then, after that, as long as the
bytecode file is newer than the source file, it only loads the bytecode
file. My intention is to take advantage of this, and have a very small
main file that imports everything else as modules.
Ideal Solution, LLC - http://www.idealso.com
More information about the linux-user