Need some advice

Discussion in 'Python' started by azrael, Oct 21, 2008.

  1. azrael

    azrael Guest

    I am starting to work on a application and need some advice.

    I am planing to develop a desktop application which would have some
    usage, but also it should be able to comunicate to a web server which
    hosts a php web application. So I wanted to ask if someone has some
    expirience with connecting PHP webapplications with Python desktop
    applications. Could someone at leaset point me to the right direction
    where to look for informations.

    Please, I know that google is my best friend, and I googled already,
    but hoped that someone would give me a really great link
     
    azrael, Oct 21, 2008
    #1
    1. Advertising

  2. azrael

    Tim Chase Guest

    > I am planing to develop a desktop application which would have
    > some usage, but also it should be able to comunicate to a web
    > server which hosts a php web application. So I wanted to ask
    > if someone has some expirience with connecting PHP
    > webapplications with Python desktop applications. Could
    > someone at leaset point me to the right direction where to
    > look for informations.


    Assuming you've already done the desktop application part (that's
    google'able), you're just interested in Python web-service
    utilization. You omit details of your PHP interface, whether
    it's REST or SOAP. If it's a RESTful interface, you can just use
    the batteries-included urllib/urllib2[1] to request the page you
    want, and then use the resulting data. If it's a SOAP interface,
    you can use the methods described at [2] to interact with it.

    -tkc

    [1]
    http://www.python.org/doc/2.5.2/lib/module-urllib.html
    http://www.python.org/doc/2.5.2/lib/module-urllib2.html


    [2]
    http://diveintopython.org/soap_web_services/index.html
    http://pywebsvcs.sourceforge.net/
     
    Tim Chase, Oct 21, 2008
    #2
    1. Advertising

  3. azrael a écrit :
    > I am starting to work on a application and need some advice.
    >
    > I am planing to develop a desktop application which would have some
    > usage, but also it should be able to comunicate to a web server which
    > hosts a php web application. So I wanted to ask if someone has some
    > expirience with connecting PHP webapplications with Python desktop
    > applications. Could someone at leaset point me to the right direction
    > where to look for informations.


    Short anwser: 'http'.

    Longer answer: when it comes to interacting with a web application, the
    language used to develop both applications is irrelevant. The client app
    sends an HTTP request, and receive an HTTP response.
     
    Bruno Desthuilliers, Oct 21, 2008
    #3
  4. azrael

    Bas Guest

    On Oct 21, 5:43 pm, azrael <> wrote:
    > Need some advice


    I advice to come up with a more specific subject line for your posts,
    might give you some more answers ....
     
    Bas, Oct 21, 2008
    #4
  5. azrael

    azrael Guest

    There have been some discutions with my partner about which protocol
    to use. We agreed to use also http. But we are looking for a
    possibility to use something to trasfer python objects like Json
    objects.

    If my memory is me well http transfers data in plaintext. Because of
    the risk of datacapturing, is there a better soulutioon to suggest to
    be more secure like shttp if it is implemented in python



    On Oct 21, 6:34 pm, Bruno Desthuilliers
    <> wrote:
    > azrael a écrit :
    >
    > > I am starting to work on a application and need some advice.

    >
    > > I am planing to develop a desktop application which would have some
    > > usage, but also it should be able to comunicate to a web server which
    > > hosts a php web application. So I wanted to ask if someone has some
    > > expirience with connecting PHP webapplications with Python desktop
    > > applications. Could someone at leaset point me to the right direction
    > > where to look for informations.

    >
    > Short anwser: 'http'.
    >
    > Longer answer: when it comes to interacting with a web application, the
    > language used to develop both applications is irrelevant. The client app
    > sends an HTTP request, and receive an HTTP response.
     
    azrael, Oct 21, 2008
    #5
  6. azrael a écrit :
    > There have been some discutions with my partner about which protocol
    > to use. We agreed to use also http. But we are looking for a
    > possibility to use something to trasfer python objects like Json
    > objects.


    'like' ???

    there are a couple json implementation for Python, and for PHP too IIRC.

    > If my memory is me well http transfers data in plaintext.
    > Because of
    > the risk of datacapturing, is there a better soulutioon to suggest to
    > be more secure like shttp


    I suppose you mean https...

    > if it is implemented in python


    http://www.python.org/doc/2.5.2/lib/https-handler-objects.html
     
    Bruno Desthuilliers, Oct 22, 2008
    #6
  7. azrael

    azrael Guest

    I mean shttp. (secure hyper text transfer protocol)


    On Oct 22, 9:48 am, Bruno Desthuilliers <bruno.
    > wrote:
    > azrael a écrit :
    >
    > > There have been some discutions with my partner about which protocol
    > > to use. We agreed to use also http. But we are looking for a
    > > possibility to use something to trasfer python objects like Json
    > > objects.

    >
    > 'like' ???
    >
    > there are a couple json implementation for Python, and for PHP too IIRC.
    >
    > > If my memory is me well http transfers data in plaintext.
    > > Because of
    > > the risk of datacapturing, is there a better soulutioon to suggest to
    > > be more secure like shttp

    >
    > I suppose you mean https...
    >
    > > if it is implemented in python

    >
    > http://www.python.org/doc/2.5.2/lib/https-handler-objects.html
     
    azrael, Oct 22, 2008
    #7
  8. azrael

    Larry Bates Guest

    azrael wrote:
    > I mean shttp. (secure hyper text transfer protocol)
    >
    >
    > On Oct 22, 9:48 am, Bruno Desthuilliers <bruno.
    > > wrote:
    >> azrael a écrit :
    >>
    >>> There have been some discutions with my partner about which protocol
    >>> to use. We agreed to use also http. But we are looking for a
    >>> possibility to use something to trasfer python objects like Json
    >>> objects.

    >> 'like' ???
    >>
    >> there are a couple json implementation for Python, and for PHP too IIRC.
    >>
    >>> If my memory is me well http transfers data in plaintext.
    >>> Because of
    >>> the risk of datacapturing, is there a better soulutioon to suggest to
    >>> be more secure like shttp

    >> I suppose you mean https...
    >>
    >>> if it is implemented in python

    >> http://www.python.org/doc/2.5.2/lib/https-handler-objects.html

    >


    Bruno is correct, the protocol IS https, you don't type shttp into your browser
    get secure http connection.

    You don't transfer python objects with JSON, you can transfer data that was
    stored in Python objects via converting them to JSON (e.g. most JSON resembles a
    Python dictionary, but it is a text representation). PHP couldn't do anything
    with a Python object.

    You may want to pick up a copy of "RESTful Web Services", from O'Reilly. It is
    an excellent starting place for you.

    -Larry
     
    Larry Bates, Oct 23, 2008
    #8
  9. azrael

    alex23 Guest

    alex23, Oct 23, 2008
    #9
  10. Larry Bates a écrit :
    > azrael wrote:
    >> On Oct 22, 9:48 am, Bruno Desthuilliers <bruno.
    >> > wrote:
    >>> azrael a écrit :
    >>>
    >>>> If my memory is me well http transfers data in plaintext.
    >>>> Because of
    >>>> the risk of datacapturing, is there a better soulutioon to suggest to
    >>>> be more secure like shttp
    >>> I suppose you mean https...

    (snip)
    >> I mean shttp. (secure hyper text transfer protocol)
    >>
    >>

    >
    > Bruno is correct, the protocol IS https, you don't type shttp into your
    > browser get secure http connection.


    Well, there *is* a shttp protocol too - or at least, there's a RFC. Now
    the fact is I never heard of it in 5 years of doing mostly web
    development, and it seems that there are pretty few (if any) working
    implementation available.

    (snip)
     
    Bruno Desthuilliers, Oct 23, 2008
    #10
  11. azrael

    Larry Bates Guest

    alex23 wrote:
    > On Oct 23, 3:15 pm, Larry Bates <> wrote:
    >> Bruno is correct, the protocol IS https, you don't type shttp into your browser
    >> get secure http connection.

    >
    > https[1] and shttp[2] are two entirely different protocols.
    >
    > [1] http://en.wikipedia.org/wiki/Https
    > [2] http://en.wikipedia.org/wiki/Secure_hypertext_transfer_protocol


    Ok, I stand corrected on "shttp". I've been a programmer for over 30 years and
    have been using python and web development for about 7 years and I've never seen
    any reference to it until now. IMHO it wouldn't be a good idea to implement any
    production code utilizing such an obscure protocol when https is available. You
    asked for "advice" in the Subject of OP, that's my advice.

    -Larry
     
    Larry Bates, Oct 24, 2008
    #11
    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. Ric

    Need some advice

    Ric, Jul 22, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    333
  2. =?Utf-8?B?Sm9l?=
    Replies:
    1
    Views:
    1,737
    Karl Seguin
    Jan 28, 2005
  3. Mike L.
    Replies:
    6
    Views:
    357
    Alan Silver
    Feb 6, 2005
  4. Shapper

    Need Some Advice.

    Shapper, Mar 13, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    365
    Karl Seguin
    Mar 13, 2005
  5. yuyazhang
    Replies:
    14
    Views:
    731
    yuyazhang
    Apr 29, 2006
Loading...

Share This Page