Need some advice

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • azrael

    Need some advice

    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
  • Tim Chase

    #2
    Re: 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.
    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]




    [2]
    Learn how to interact with web pages and APIs using the Requests module in Python. Send HTTP requests, handle responses, and customize requests with headers, cookies, and proxies.






    Comment

    • Bas

      #3
      Re: Need some advice

      On Oct 21, 5:43 pm, azrael <jura.gro...@gm ail.comwrote:
      Need some advice
      I advice to come up with a more specific subject line for your posts,
      might give you some more answers ....

      Comment

      • azrael

        #4
        Re: Need some advice

        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
        <bdesth.quelque ch...@free.quel quepart.frwrote :
        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.

        Comment

        • Bruno Desthuilliers

          #5
          Re: Need some advice

          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

          Comment

          • azrael

            #6
            Re: Need some advice

            I mean shttp. (secure hyper text transfer protocol)


            On Oct 22, 9:48 am, Bruno Desthuilliers <bruno.
            42.desthuilli.. .@websiteburo.i nvalidwrote:
            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/...r-objects.html

            Comment

            • Larry Bates

              #7
              Re: Need some advice

              azrael wrote:
              I mean shttp. (secure hyper text transfer protocol)
              >
              >
              On Oct 22, 9:48 am, Bruno Desthuilliers <bruno.
              42.desthuilli.. .@websiteburo.i nvalidwrote:
              >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/...r-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

              Comment

              • alex23

                #8
                Re: Need some advice

                On Oct 23, 3:15 pm, Larry Bates <larry.ba...@vi talEsafe.comwro te:
                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_...nsfer_protocol

                Comment

                • Bruno Desthuilliers

                  #9
                  Re: Need some advice

                  Larry Bates a écrit :
                  azrael wrote:
                  >On Oct 22, 9:48 am, Bruno Desthuilliers <bruno.
                  >42.desthuilli. ..@websiteburo. invalidwrote:
                  >>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)

                  Comment

                  • Larry Bates

                    #10
                    Re: Need some advice

                    alex23 wrote:
                    On Oct 23, 3:15 pm, Larry Bates <larry.ba...@vi talEsafe.comwro te:
                    >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_...nsfer_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

                    Comment

                    Working...