Server-side XForms processing with PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jazzslider@gmail.com

    Server-side XForms processing with PHP

    I have a headache.

    I've done a LOT of research lately into XForms, and I am thoroughly
    convinced that a good implementation of this technology would help me
    immensely in converting my department's paper forms into interactive
    online systems.

    There are a couple of problems I'm facing that I'm hoping someone here
    could help with. Number one: browser support for XForms is pitiful,
    and I can't expect my target audience to download plugins/extensions
    and the like. Number two: JavaScript is my Achilles heel, and I don't
    have the first clue about Java, yet every workable XForms
    implementation I've ever found uses some combination or other of those
    technologies. The Java problem is compounded by the fact that I'm not
    in control of my own server; I don't believe I have permission to
    install Java code (the server people haven't answered that question
    yet), even if I DID know how to use it.

    So...this means implementations like Chiba and Orbeon are out of the
    question, and although FormFaces is good JavaScript (that I don't have
    to look at :D), it's WAY too slow for the forms I'm trying to use it
    for. I've also played around with AjaxForms since it only actually
    requires Java on the development machine, but it's incorrectly
    implementing several crucial XForms specs.

    Does anyone here know of a good server-side XForms engine written in
    pure PHP (no Java)? It's fine by me if it generates
    DHTML/JavaScript/etc. so long as I don't have to write the JavaScript
    myself...I realize some kind of client scripting is necessary to make
    the coolest stuff in XForms work; I just don't want to have to write it
    myself.

    Alternatively.. .I've heard good things about UGO + DENG, a Flash-based
    XForms system...the only problem with that is that the website
    responsible for that project doesn't seem to be working.

    I really need some help with this, even if only to be told that what
    I'm looking for doesn't exist yet.

    Thank you all very much for any help you can offer!

  • Jeremy

    #2
    Re: Server-side XForms processing with PHP

    jazzslider@gmai l.com wrote:
    I have a headache.
    >
    I've done a LOT of research lately into XForms, and I am thoroughly
    convinced that a good implementation of this technology would help me
    immensely in converting my department's paper forms into interactive
    online systems.
    >
    There are a couple of problems I'm facing that I'm hoping someone here
    could help with. Number one: browser support for XForms is pitiful,
    and I can't expect my target audience to download plugins/extensions
    and the like. Number two: JavaScript is my Achilles heel, and I don't
    have the first clue about Java, yet every workable XForms
    implementation I've ever found uses some combination or other of those
    technologies. The Java problem is compounded by the fact that I'm not
    in control of my own server; I don't believe I have permission to
    install Java code (the server people haven't answered that question
    yet), even if I DID know how to use it.
    >
    A while ago I found this: http://www.formfaces.com/ which is just a
    drop-in javascript that enables XForms in pretty much any browser.

    Server-side, I've no idea what goes down. I know nothing about XForms,
    but I'm guessing it provides XML encoded data rather than URL encoded -
    you could process this with PHP's DOM or SimpleXML.

    Jeremy

    Comment

    • jazzslider@gmail.com

      #3
      Re: Server-side XForms processing with PHP

      Thanks for the tip...I'm familiar with FormFaces, and so far it works
      the best out of everything I've been able to try.

      Unfortunately, the more complex the XForm, the slower it gets. The
      stuff I'm trying to convert is pretty complex; one of my forms took
      FormFaces long enough to load that the browser started to complain ("a
      script on this page is causing your computer to run slowly"-type
      messages).

      That's why I like the idea behind AjaxForms (www.ajaxforms.com); it
      uses Java (on the development machine, not on the server) to
      pre-"compile" a lot of the things that FormFaces has to do at runtime.
      If it did a better job of implementing the XForms standards, it's what
      I'd be using.

      Anyway, thanks for your help; I will keep looking around in the
      meantime.

      - Adam


      Jeremy wrote:
      jazzslider@gmai l.com wrote:
      I have a headache.

      I've done a LOT of research lately into XForms, and I am thoroughly
      convinced that a good implementation of this technology would help me
      immensely in converting my department's paper forms into interactive
      online systems.

      There are a couple of problems I'm facing that I'm hoping someone here
      could help with. Number one: browser support for XForms is pitiful,
      and I can't expect my target audience to download plugins/extensions
      and the like. Number two: JavaScript is my Achilles heel, and I don't
      have the first clue about Java, yet every workable XForms
      implementation I've ever found uses some combination or other of those
      technologies. The Java problem is compounded by the fact that I'm not
      in control of my own server; I don't believe I have permission to
      install Java code (the server people haven't answered that question
      yet), even if I DID know how to use it.
      >
      A while ago I found this: http://www.formfaces.com/ which is just a
      drop-in javascript that enables XForms in pretty much any browser.
      >
      Server-side, I've no idea what goes down. I know nothing about XForms,
      but I'm guessing it provides XML encoded data rather than URL encoded -
      you could process this with PHP's DOM or SimpleXML.
      >
      Jeremy

      Comment

      • jazzslider@gmail.com

        #4
        Re: Server-side XForms processing with PHP

        Thanks for the tip...I'm familiar with FormFaces, and so far it works
        the best out of everything I've been able to try.

        Unfortunately, the more complex the XForm, the slower it gets. The
        stuff I'm trying to convert is pretty complex; one of my forms took
        FormFaces long enough to load that the browser started to complain ("a
        script on this page is causing your computer to run slowly"-type
        messages).

        That's why I like the idea behind AjaxForms (www.ajaxforms.com); it
        uses Java (on the development machine, not on the server) to
        pre-"compile" a lot of the things that FormFaces has to do at runtime.
        If it did a better job of implementing the XForms standards, it's what
        I'd be using.

        Anyway, thanks for your help; I will keep looking around in the
        meantime.

        - Adam


        Jeremy wrote:
        jazzslider@gmai l.com wrote:
        I have a headache.

        I've done a LOT of research lately into XForms, and I am thoroughly
        convinced that a good implementation of this technology would help me
        immensely in converting my department's paper forms into interactive
        online systems.

        There are a couple of problems I'm facing that I'm hoping someone here
        could help with. Number one: browser support for XForms is pitiful,
        and I can't expect my target audience to download plugins/extensions
        and the like. Number two: JavaScript is my Achilles heel, and I don't
        have the first clue about Java, yet every workable XForms
        implementation I've ever found uses some combination or other of those
        technologies. The Java problem is compounded by the fact that I'm not
        in control of my own server; I don't believe I have permission to
        install Java code (the server people haven't answered that question
        yet), even if I DID know how to use it.
        >
        A while ago I found this: http://www.formfaces.com/ which is just a
        drop-in javascript that enables XForms in pretty much any browser.
        >
        Server-side, I've no idea what goes down. I know nothing about XForms,
        but I'm guessing it provides XML encoded data rather than URL encoded -
        you could process this with PHP's DOM or SimpleXML.
        >
        Jeremy

        Comment

        • frothpoker

          #5
          Re: Server-side XForms processing with PHP

          sounds like a job for AJAX

          AJAX allows you to load a page of HTML and then using javascript
          enabled events you can validate information on the form (in elements of
          the DOM) and carry out inline replacements of various sections (e.g.,
          you need a different authorisation process if the order value is over
          £1000) or can check information or combinations of information without
          having to submit the whole form and then return the results if they are
          not what was required.

          It requires javascript to be enabled on the client PCs and you will
          need to be running IE6 or the latest version of mozilla (firefox) or
          opera but is platform independant.

          I'm not convinced of its uses on external web sites but for intranet
          usage where you have more control over the settings users have on their
          PCs it should be ideal. There are several commercial packages with
          pre-built AJAX classes which should ease the pain.

          One of AJAX's best features (and the most annoying is web forms) is
          where you have a huge drop down list (say 50000 people in a company and
          you need to find a name - e.g. Wyznkcsky. in a web form you type 'W'
          and the list jumps to the start of W and then you type 'Y' and the list
          jumps to the start of Y - Arrrgh!. With an AJAX enabled form the list
          is simply filtered to give you all the people who's names either start
          with or contain 'WY' - Ta Dah!)

          Comment

          • M

            #6
            Re: Server-side XForms processing with PHP

            you are all right - the things you ask for (Jeremy
            jazzslider@gmai l.com) are exactly what i need too.

            but i thought that in the next php version on eclipse (it is going to
            be mvc design) we can desing a php screen + convert it to xforms and
            use php on the server side or even just:
            "put" and "get" from the server in order to get/send data.

            but i don't know if "zend" is going to do that.

            frothpoker wrote:
            sounds like a job for AJAX
            >
            AJAX allows you to load a page of HTML and then using javascript
            enabled events you can validate information on the form (in elements of
            the DOM) and carry out inline replacements of various sections (e.g.,
            you need a different authorisation process if the order value is over
            £1000) or can check information or combinations of information without
            having to submit the whole form and then return the results if they are
            not what was required.
            >
            It requires javascript to be enabled on the client PCs and you will
            need to be running IE6 or the latest version of mozilla (firefox) or
            opera but is platform independant.
            >
            I'm not convinced of its uses on external web sites but for intranet
            usage where you have more control over the settings users have on their
            PCs it should be ideal. There are several commercial packages with
            pre-built AJAX classes which should ease the pain.
            >
            One of AJAX's best features (and the most annoying is web forms) is
            where you have a huge drop down list (say 50000 people in a company and
            you need to find a name - e.g. Wyznkcsky. in a web form you type 'W'
            and the list jumps to the start of W and then you type 'Y' and the list
            jumps to the start of Y - Arrrgh!. With an AJAX enabled form the list
            is simply filtered to give you all the people who's names either start
            with or contain 'WY' - Ta Dah!)

            Comment

            • jazzslider@gmail.com

              #7
              Re: Server-side XForms processing with PHP

              I would definitely be excited to see some kind of native XForms support
              in PHP...I haven't ever used Eclipse, though, so I don't really know
              what that would entail. I generally do all my development in
              Dreamweaver's source code view, since it's what I started with.

              I also really like the idea behind AJAX, but I have thus far avoided
              writing any of the necessary JavaScript to make that kind of solution
              work...every time I've tried, it's been nearly impossible to debug.
              The nice thing about XForms in comparison to forms enhanced by AJAX
              techniques is that with XForms, the person developing the form (i.e.
              myself) doesn't have to write the scripts necessary to make the really
              useful stuff (validation, dependent select fields, tab switching, etc.)
              happen...rather , XForms is a descriptive language which relies on the
              scripting written into the implementation running it.

              So, I guess what I'd really like to see is a native PHP XForms
              extension that would generate AJAX-enhanced web forms from XForms +
              XHTML source code, at least until browsers support XForms natively.
              After THAT happens, I'm not sure we'll hear much about AJAX anymore, at
              least not for this kind of work.

              M wrote:
              you are all right - the things you ask for (Jeremy
              jazzslider@gmai l.com) are exactly what i need too.
              >
              but i thought that in the next php version on eclipse (it is going to
              be mvc design) we can desing a php screen + convert it to xforms and
              use php on the server side or even just:
              "put" and "get" from the server in order to get/send data.
              >
              but i don't know if "zend" is going to do that.
              >
              frothpoker wrote:
              sounds like a job for AJAX

              AJAX allows you to load a page of HTML and then using javascript
              enabled events you can validate information on the form (in elements of
              the DOM) and carry out inline replacements of various sections (e.g.,
              you need a different authorisation process if the order value is over
              £1000) or can check information or combinations of information without
              having to submit the whole form and then return the results if they are
              not what was required.

              It requires javascript to be enabled on the client PCs and you will
              need to be running IE6 or the latest version of mozilla (firefox) or
              opera but is platform independant.

              I'm not convinced of its uses on external web sites but for intranet
              usage where you have more control over the settings users have on their
              PCs it should be ideal. There are several commercial packages with
              pre-built AJAX classes which should ease the pain.

              One of AJAX's best features (and the most annoying is web forms) is
              where you have a huge drop down list (say 50000 people in a company and
              you need to find a name - e.g. Wyznkcsky. in a web form you type 'W'
              and the list jumps to the start of W and then you type 'Y' and the list
              jumps to the start of Y - Arrrgh!. With an AJAX enabled form the list
              is simply filtered to give you all the people who's names either start
              with or contain 'WY' - Ta Dah!)

              Comment

              • Jeff North

                #8
                Re: Server-side XForms processing with PHP

                On 12 Oct 2006 10:53:33 -0700, in comp.lang.php jazzslider@gmai l.com
                <1160675613.215 906.210320@h48g 2000cwc.googleg roups.comwrote:
                >| I have a headache.
                >|
                >| I've done a LOT of research lately into XForms, and I am thoroughly
                >| convinced that a good implementation of this technology would help me
                >| immensely in converting my department's paper forms into interactive
                >| online systems.
                >|
                >| There are a couple of problems I'm facing that I'm hoping someone here
                >| could help with. Number one: browser support for XForms is pitiful,
                Agree.
                >| and I can't expect my target audience to download plugins/extensions
                They just have to, until XForms functionality is build into every
                browser.
                >| and the like. Number two: JavaScript is my Achilles heel, and I don't
                >| have the first clue about Java, yet every workable XForms
                >| implementation I've ever found uses some combination or other of those
                >| technologies. The Java problem is compounded by the fact that I'm not
                >| in control of my own server; I don't believe I have permission to
                >| install Java code (the server people haven't answered that question
                >| yet), even if I DID know how to use it.
                The users browser need to have a java plugin. The server doesn't need
                this plugin.
                >| So...this means implementations like Chiba and Orbeon are out of the
                >| question, and although FormFaces is good JavaScript (that I don't have
                >| to look at :D), it's WAY too slow for the forms I'm trying to use it
                >| for. I've also played around with AjaxForms since it only actually
                >| requires Java on the development machine, but it's incorrectly
                >| implementing several crucial XForms specs.
                Each implementation I've looked at so far, is at various stages of
                development.

                Also I wouldn't rely on Javascript. It has it's own inbuild security
                i.e. can't write to local files.
                >| Does anyone here know of a good server-side XForms engine written in
                >| pure PHP (no Java)?
                XForms is a browser function. You can use PHP to generate the form but
                it is the browser that needs to render and act upon the xhtml code.
                >| It's fine by me if it generates
                >| DHTML/JavaScript/etc. so long as I don't have to write the JavaScript
                >| myself...I realize some kind of client scripting is necessary to make
                >| the coolest stuff in XForms work; I just don't want to have to write it
                >| myself.
                >|
                >| Alternatively.. .I've heard good things about UGO + DENG, a Flash-based
                >| XForms system...the only problem with that is that the website
                >| responsible for that project doesn't seem to be working.
                but the user will need to install the Flash player plugin for their
                browser :-)

                "and I can't expect my target audience to download plugins/extensions"
                >| I really need some help with this, even if only to be told that
                what
                >| I'm looking for doesn't exist yet.
                >|
                >| Thank you all very much for any help you can offer!
                If you want something that 'works' try Microsoft Infopath. It's very
                similar to XForms (but then again, users need applications installed
                on their machines to run this).


                ---------------------------------------------------------------
                jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
                ---------------------------------------------------------------

                Comment

                • jazzslider

                  #9
                  Re: Server-side XForms processing with PHP

                  Hadn't thought of using InfoPath...of course, I'm generally uneasy
                  about using proprietary formats anyway, especially Microsoft's
                  proprietary formats. Even so, I do have it on my computer, and it
                  looks like it does a lot of what I'd like it to do...is there a way to
                  display fillable InfoPath forms in a web browser? I suppose that would
                  take extra plugins too.

                  The plugin problem for me is like this: the people who will need to
                  fill out these forms are not the people in my department; rather, they
                  are our customers/clients/etc...in other words, people whose computers
                  I have no control over. In addition, a large segment of my target
                  audience is pretty low-tech; they don't have the latest browsers, and
                  some may not even have their own computers. (i.e., they would be
                  accessing the forms on public computers)

                  That's one of the reasons why, if I need a client-side plugin, I need
                  it to be invisible...I can't expect my target audience to actively
                  download and install separate plugins, and I can't really rely on
                  JavaScript (although it'll be available in most cases). Flash would be
                  OK since it's so ubiquitous, but you're right that it still wouldn't be
                  available 100% of the time.

                  However...if our server could do the vast majority of the work
                  ordinarily done by a browser plugin and then serve up a result
                  consisting of XHTML + a minimal amount of JavaScript when the user
                  agent can handle it, that would be ideal. I think this is what Chiba
                  does, but if it does it on the server side then I can't use it (since I
                  can't install Java code on the server).

                  This is the kind of support I'd like to see PHP have for XForms...I
                  realize PHP can't actually perform the client-side page modifications,
                  calculations, etc. indicated by XForms actions, but a well-written PHP
                  implementation could easily generate the JavaScript to do that, OR
                  provide an alternate (understandably much slower) way of getting some
                  of that functionality via multiple page requests if JavaScript is not
                  available to the user agent.

                  Put more simply, I think what I need is a PHP port of Chiba or Orbeon.
                  :)

                  You said, however, that Java solutions would be client-side plugins
                  rather than server-side...could such a plugin be downloaded and run
                  passively (i.e., without the user having to deliberately find it and
                  download it to their computer) and invisibly? I suppose that would be
                  a potential security risk, but even still if it's possible it might be
                  my ideal option. If that's possible, how would I do it?

                  Thanks,
                  Adam


                  Jeff North wrote:
                  On 12 Oct 2006 10:53:33 -0700, in comp.lang.php jazzslider@gmai l.com
                  <1160675613.215 906.210320@h48g 2000cwc.googleg roups.comwrote:
                  >
                  | I have a headache.
                  |
                  | I've done a LOT of research lately into XForms, and I am thoroughly
                  | convinced that a good implementation of this technology would help me
                  | immensely in converting my department's paper forms into interactive
                  | online systems.
                  |
                  | There are a couple of problems I'm facing that I'm hoping someone here
                  | could help with. Number one: browser support for XForms is pitiful,
                  >
                  Agree.
                  >
                  | and I can't expect my target audience to download plugins/extensions
                  >
                  They just have to, until XForms functionality is build into every
                  browser.
                  >
                  | and the like. Number two: JavaScript is my Achilles heel, and I don't
                  | have the first clue about Java, yet every workable XForms
                  | implementation I've ever found uses some combination or other of those
                  | technologies. The Java problem is compounded by the fact that I'm not
                  | in control of my own server; I don't believe I have permission to
                  | install Java code (the server people haven't answered that question
                  | yet), even if I DID know how to use it.
                  >
                  The users browser need to have a java plugin. The server doesn't need
                  this plugin.
                  >
                  | So...this means implementations like Chiba and Orbeon are out of the
                  | question, and although FormFaces is good JavaScript (that I don't have
                  | to look at :D), it's WAY too slow for the forms I'm trying to use it
                  | for. I've also played around with AjaxForms since it only actually
                  | requires Java on the development machine, but it's incorrectly
                  | implementing several crucial XForms specs.
                  >
                  Each implementation I've looked at so far, is at various stages of
                  development.
                  >
                  Also I wouldn't rely on Javascript. It has it's own inbuild security
                  i.e. can't write to local files.
                  >
                  | Does anyone here know of a good server-side XForms engine written in
                  | pure PHP (no Java)?
                  >
                  XForms is a browser function. You can use PHP to generate the form but
                  it is the browser that needs to render and act upon the xhtml code.
                  >
                  | It's fine by me if it generates
                  | DHTML/JavaScript/etc. so long as I don't have to write the JavaScript
                  | myself...I realize some kind of client scripting is necessary to make
                  | the coolest stuff in XForms work; I just don't want to have to write it
                  | myself.
                  |
                  | Alternatively.. .I've heard good things about UGO + DENG, a Flash-based
                  | XForms system...the only problem with that is that the website
                  | responsible for that project doesn't seem to be working.
                  >
                  but the user will need to install the Flash player plugin for their
                  browser :-)
                  >
                  "and I can't expect my target audience to download plugins/extensions"
                  | I really need some help with this, even if only to be told that
                  what
                  | I'm looking for doesn't exist yet.
                  |
                  | Thank you all very much for any help you can offer!
                  >
                  If you want something that 'works' try Microsoft Infopath. It's very
                  similar to XForms (but then again, users need applications installed
                  on their machines to run this).
                  >

                  ---------------------------------------------------------------
                  jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
                  ---------------------------------------------------------------

                  Comment

                  • Jeff North

                    #10
                    Re: Server-side XForms processing with PHP

                    On 17 Oct 2006 09:43:47 -0700, in comp.lang.php "jazzslider "
                    <jazzslider@gma il.com>
                    <1161103427.146 519.108070@b28g 2000cwb.googleg roups.comwrote:
                    >| Hadn't thought of using InfoPath...of course, I'm generally uneasy
                    >| about using proprietary formats anyway, especially Microsoft's
                    >| proprietary formats. Even so, I do have it on my computer, and it
                    >| looks like it does a lot of what I'd like it to do...is there a way to
                    >| display fillable InfoPath forms in a web browser? I suppose that would
                    >| take extra plugins too.
                    InfoPath (as far as I am aware) is not browser centric.
                    >| The plugin problem for me is like this: the people who will need to
                    >| fill out these forms are not the people in my department; rather, they
                    >| are our customers/clients/etc...in other words, people whose computers
                    >| I have no control over. In addition, a large segment of my target
                    >| audience is pretty low-tech; they don't have the latest browsers, and
                    >| some may not even have their own computers. (i.e., they would be
                    >| accessing the forms on public computers)
                    I feel your pain :-)
                    When I first 'discovered' XForms I thought it was the answer to all my
                    prayers. But then reality set in :-(
                    I needed the added ability for the client to work in either on-line or
                    off-line mode. This meant that their data had to be saved to a local
                    drive (something that javascript can't do, not easily anyway).
                    >| That's one of the reasons why, if I need a client-side plugin, I need
                    >| it to be invisible...I can't expect my target audience to actively
                    >| download and install separate plugins, and I can't really rely on
                    >| JavaScript (although it'll be available in most cases). Flash would be
                    >| OK since it's so ubiquitous, but you're right that it still wouldn't be
                    >| available 100% of the time.
                    I looked at the Flash plugin but I haven't tried it.
                    This might be the way to go due to the diversity of the client base.
                    >| However...if our server could do the vast majority of the work
                    >| ordinarily done by a browser plugin and then serve up a result
                    >| consisting of XHTML + a minimal amount of JavaScript when the user
                    >| agent can handle it, that would be ideal. I think this is what Chiba
                    >| does, but if it does it on the server side then I can't use it (since I
                    >| can't install Java code on the server).
                    >|
                    >| This is the kind of support I'd like to see PHP have for XForms...I
                    >| realize PHP can't actually perform the client-side page modifications,
                    >| calculations, etc. indicated by XForms actions, but a well-written PHP
                    >| implementation could easily generate the JavaScript to do that, OR
                    >| provide an alternate (understandably much slower) way of getting some
                    >| of that functionality via multiple page requests if JavaScript is not
                    >| available to the user agent.
                    I don't think that the rest of the world has caught onto XForms as yet
                    thus the development is quite slow.

                    Have you looked at AJAX. Since you are processing the information
                    on-line then this might be the way to go. Of course it doesn't have
                    the built-in whiz-bang features of XForms but it could be implemented.

                    What I'm wanting is that mySQL supports XML files. Infopath allows you
                    to specify tables and fields for each entry and when you complete the
                    form the data is placed within the database automagically :-)
                    >| Put more simply, I think what I need is a PHP port of Chiba or Orbeon.
                    >| :)
                    >|
                    >| You said, however, that Java solutions would be client-side plugins
                    >| rather than server-side...could such a plugin be downloaded and run
                    >| passively (i.e., without the user having to deliberately find it and
                    >| download it to their computer) and invisibly? I suppose that would be
                    >| a potential security risk, but even still if it's possible it might be
                    >| my ideal option. If that's possible, how would I do it?
                    I think that is part of the browser security setting. Not sure about
                    this, you'd have to check.

                    [snip 2 end]
                    ---------------------------------------------------------------
                    jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
                    ---------------------------------------------------------------

                    Comment

                    Working...