What technologies should I use for my application manager?

Discussion in 'Python' started by MrBlueSky, Jun 25, 2006.

  1. MrBlueSky

    MrBlueSky Guest

    Hello! I've just finished working on my first Python app (a
    Tkinter-based program that displays the content of our application log
    files in graphical format). It was a great experience that's had a
    very positive response from my colleagues.

    So I'd like to try something different for my second Python
    application. It's a simple server that can launch and monitor the
    state of our program, to help our software developers. In my mind I
    have a vision of:
    * a web server
    * allows the user to launch our product (choosing from a set of
    different launch scripts)
    * allow user to stop a launched product
    * report state by retrieving data from the RDBMS against which the
    product runs (Oracle or SQL Server)

    There seem to be a lot of web server related Python libraries around,
    and I've no experience in web servers at all. So I'd really
    appreciate some advice on what Python "technologies" you think I should
    base my application on.

    Thank you in advance!

    John
    MrBlueSky, Jun 25, 2006
    #1
    1. Advertising

  2. MrBlueSky

    Adam Jones Guest

    MrBlueSky wrote:
    > Hello! I've just finished working on my first Python app (a
    > Tkinter-based program that displays the content of our application log
    > files in graphical format). It was a great experience that's had a
    > very positive response from my colleagues.
    >
    > So I'd like to try something different for my second Python
    > application. It's a simple server that can launch and monitor the
    > state of our program, to help our software developers. In my mind I
    > have a vision of:
    > * a web server
    > * allows the user to launch our product (choosing from a set of
    > different launch scripts)
    > * allow user to stop a launched product
    > * report state by retrieving data from the RDBMS against which the
    > product runs (Oracle or SQL Server)
    >
    > There seem to be a lot of web server related Python libraries around,
    > and I've no experience in web servers at all. So I'd really
    > appreciate some advice on what Python "technologies" you think I should
    > base my application on.
    >


    For speed of development I would suggest looking into a framework that
    can do some of the heavy lifting for you. Out of those the "really big
    names" in python are Turbogears ( http://www.turbogears.org/ ), Django
    ( http://www.djangoproject.org/ ), and Zope ( http://www.zope.org ).
    (along with others that I have forgotten who shall most likely be
    mentioned promptly) Of them all I have the most experience with
    Turbogears, so that is what I will try and sell you on.

    By default Turbogears provides support for *either* MS SQL or Oracle.
    One of the differences between Turbogears and most web frameworks is
    that many of the bigger chunks of code for it are taken from existing
    projects instead of being written internally. Due to this Turbogears
    provides support for two database mappers: Sqlobject, which supports MS
    SQL; and Sqlalchemy, which supports Oracle. Of the two Sqlalchemy is
    much more flexible, but is also a newer project and may be harder to
    work with until the api finishes settling. Both projects offer full
    support for one of the databases you mentioned, and developmental
    support for the other. If you need to work with both it is possible to
    bring in the database integration method of your choice.

    Turbogears has a very flexible widget system that supports a lot of
    interesting code. Basic things like user input forms can be handled
    with widgets, but there are also prebuilt widgets for things like
    find-as-you-type form fields, calendar-based date pickers, tabbed
    displays, syntax-highlighted text, and a plotting kit (and those are
    just the fancy things that looked like they would be useful).

    There is a pretty nice validation system that can handle converting
    user input into appropriately typed python objects, and can
    automatically force a correction page if you would like it to do so.

    Like any other framework Turbogears has a templating system to help
    handle the html/css/javascript that you will be using. By default it
    uses Kid, which is XHTML with an additional namespace that provides
    support for looping, element replacement, and limited function
    definitions. Overall I have found it to be pretty nice to work with.
    That said if you want something else you can install plugins for a few
    different templating languages. (Currently supported are Cheetah, Stan,
    ZPT, HtmlPy, Clearsilver, Myghty, and Python String Templates)

    Obviously some of the more important parts you are looking for are
    integration into the system environment, logging, and possibly user
    authentication and scheduled tasks. By default Turbogears supports all
    of the access to the surrounding system that Python does. This is kind
    of a no-brainer, but for me at least was something of a stumbling block
    in coming from PHP.

    The logging system is based on the built-in logging package for Python.
    It is configured through Turbogears to allow some of the components
    involved to support it. You have access to pretty much all of the
    facilities that the Python logger provides.

    User authentication in Turbogears is generally handled through the
    Identity system. This allows you to restrict access to directories,
    pages, and even specific page elements (like links or forms) based on
    the connecting host, user account, group membership, or permissions
    granted. The identity system itself is pretty extensible and can
    probably be made to support anything you can think of as an
    authentication method.

    Scheduled tasks can be handled from inside of turbogears with the built
    in scheduler. This allows you to schedule tasks while working inside
    turbogears, which saves the headache of handling database access
    separately.

    Installing and configuring Turbogears can actually be pretty simple.
    The system is based around python eggs (
    http://peak.telecommunity.com/DevCenter/PythonEggs/ ) which can handle
    installation requirements and upgrades for you.

    Overall I have found Turbogears to be a flexible, easy-to-use
    framework. It generally seems to do well at staying out of the way, and
    most of the extra features it adds have been well worth the (optional)
    time spent learning them.
    Adam Jones, Jun 26, 2006
    #2
    1. Advertising

  3. MrBlueSky

    MrBlueSky Guest

    Thanks for the advice, Adam!

    Turbogears sounds like it does everything I want and looks like a
    great... except you've made me nervous with your comment on the
    instability of the Oracle API!

    Stability, good documentation and a wide user base are priorities. I
    was delighted by the quality of Tkinter in this regard. Am I wishing
    for the moon in hoping for the same quality in the framework I choose
    for this?

    Anyone else like to try and sell me on Zope or Django?!
    MrBlueSky, Jun 27, 2006
    #3
  4. Fredrik Lundh, Jun 27, 2006
    #4
  5. MrBlueSky

    Adam Jones Guest

    MrBlueSky wrote:
    > Thanks for the advice, Adam!
    >
    > Turbogears sounds like it does everything I want and looks like a
    > great... except you've made me nervous with your comment on the
    > instability of the Oracle API!


    It is not impossible to find a stable ORM for access to Oracle, just
    slightly more difficult. Both of the systems in question are working on
    perfecting the currently experimental support.

    >
    > Stability, good documentation and a wide user base are priorities. I
    > was delighted by the quality of Tkinter in this regard. Am I wishing
    > for the moon in hoping for the same quality in the framework I choose
    > for this?
    >
    > Anyone else like to try and sell me on Zope or Django?!
    Adam Jones, Jun 27, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    312
  2. Replies:
    1
    Views:
    358
  3. Replies:
    11
    Views:
    537
    Juha Laiho
    Jan 6, 2006
  4. padma
    Replies:
    0
    Views:
    335
    padma
    Oct 3, 2007
  5. Metalone
    Replies:
    0
    Views:
    332
    Metalone
    Jan 6, 2010
Loading...

Share This Page