FAQ
I am thinking about developing a CMS with Python and Postgres. I am developing
on a Linux box with Apache 2. I have used PHP in the past but my at work we are
considering going with Python as our main devellopment language. A few
questions for you guys.

1. Is it best to just develop in all Pyhton or to use a mixture of PHP and Python?
Why other than personal feelings?

2. What is the best way to template using Python for me to seperate content
from logic? All the data that will be displayed in dynamic so I am not sure
what the best way to template it would be in Python.

Thank you for any thoughts offered.

Search Discussions

  • Peter Hansen at Dec 8, 2003 at 2:43 am

    Jason Tesser wrote:
    I am thinking about developing a CMS with Python and Postgres. I am developing
    on a Linux box with Apache 2. I have used PHP in the past but my at work we are
    considering going with Python as our main devellopment language. A few
    questions for you guys.

    1. Is it best to just develop in all Pyhton or to use a mixture of PHP and Python?
    Why other than personal feelings?
    I wouldn't bother with PHP, for several reasons. One is that it's
    (IMHO) a hodge-podge dog's breakfast of junk that doesn't have real
    design behind it, another is that Python can do anything it can do,
    and more readably, and a third is that I like to minimize the number
    of different technologies used on a given project, to increase
    maintainability, and to maintain the sanity of developers.
    2. What is the best way to template using Python for me to seperate content
    from logic? All the data that will be displayed in dynamic so I am not sure
    what the best way to template it would be in Python.
    http://webware.sourceforge.net/Papers/Templates/ has an overview, and
    Googling for "python template language" or similar will give you that
    page and dozens more that will give you a good start.

    There is no "best way": what is best for you depends on more information
    than you've provided, and is largely based on personal preference
    anyway.

    -Peter
  • David M. Wilson at Dec 8, 2003 at 7:30 am
    "Jason Tesser" <JTesser at nbbc.edu> wrote in message...
    1. Is it best to just develop in all Pyhton or to use a mixture of PHP
    and Python?
    Use Python.

    Why other than personal feelings?
    In the case of PHP, I find it quite hard to seperate the personal from
    the objective, but here we go:

    - Python code tends to last. Code developed for Python 1.5.2 still
    works today. Python didn't change the setting of 'register_globals'
    overnight, or modify fundantal ways in which code is parsed.

    - Python code is naturally structured. It could be argued that PHP
    gives you the flexibility to decide on your own code modularisation,
    but that means devising a robust system and sticking to it. When such
    modularisation is part of the core language, such things are natural.

    - Other people's Python code tends to be much better written. Take a
    look for yourself at freshmeat.net. Sample 5 PHP-based projects. Were
    you impressed by the quality of code you saw? Was it documented? Was
    it even readable?

    - Python has a clear future roadmap, whereas PHP has been confused
    about it's sexuality for years now.


    2. What is the best way to template using Python for me to seperate
    content
    from logic? All the data that will be displayed in dynamic so I am not
    sure
    what the best way to template it would be in Python.
    This has been a biggy for me recently. I haven't wanted to tie myself
    in to a big python CMS for writing my web applications, and have spent
    quite a few months hmm'ing and hah'ing over exactly how HTML, Code,
    the client, and the Web server are all seperated.

    My own solution is probably going to be PyMeld for templating, for
    it's utter simplicity and perfect division between design & HTML, with
    mod_python for talking to the clients. PyMeld will get wrapped in an
    interface abstraction so that I can swap it out if I later desire to,
    and the main web application itself will be implemented as pure
    Python. The interface will be responsible for converting it to an HTML
    representation.

    In future if I for eg., wish to add XML-RPC or WAP support to my
    application, I can do so through new implementations of the interface
    abstraction.

    I'm ranting. It's 07:30hrs and I am going to work in an hour. Tired.
    :o
    To cut a long, boring story short, after a long time of waiting I
    found PyMeld. It's lovely. Use it. :)


    http://www.entrian.com/PyMeld/


    David.
  • JZ at Dec 8, 2003 at 9:11 am

    On Sun, 7 Dec 2003 17:47:55 -0600, "Jason Tesser" wrote:
    I am thinking about developing a CMS with Python and Postgres.
    Look at Plone http://www.plone.org. It is ready to use, powerfull CMS
    system based on Zope http://www.zope.org
    1. Is it best to just develop in all Pyhton or to use a mixture of PHP and Python?
    Why other than personal feelings?
    There is no need for such mixture. Python should be enough.
    2. What is the best way to template using Python for me to seperate content
    from logic? All the data that will be displayed in dynamic so I am not sure
    what the best way to template it would be in Python.
    I am also a PHP programmer and I had the same problem some times ago.
    I think, the best solution is an application serwer Webware
    http://webware.sourceforge.net and Cheetah
    http://www.cheetahtemplate.org as a template system.

    --
    JZ
  • Jason Tesser at Dec 8, 2003 at 1:12 pm
    Hi
    I am thinking about developing a CMS with Python and Postgres.
    Look at Plone http://www.plone.org. It is ready to use, powerfull CMS
    system based on Zope http://www.zope.org
    I want to stay away from a prebuilt framework right now. I am looking into
    mod_python.
  • JZ at Dec 9, 2003 at 10:21 am

    On Mon, 8 Dec 2003 07:12:31 -0600, "Jason Tesser" wrote:
    I want to stay away from a prebuilt framework right now. I am looking into
    mod_python.
    Try http://spyce.sourceforge.net. It can work with mod_python and it
    is quite powerfull.

    --
    JZ

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedDec 7, '03 at 11:47p
activeDec 9, '03 at 10:21a
posts6
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase