Loading ...
Sorry, an error occurred while loading the content.

REST application model fragments from 1994

Expand Messages
  • Jan Algermissen
    Hi, in a recent blog entry EAI DSL , Gergor Hohpe mentions that back in 1994 he wrote a little domain specific language to aid screen scraping based
    Message 1 of 2 , Jun 8, 2006
    • 0 Attachment
      Hi,

      in a recent blog entry "EAI DSL", Gergor Hohpe mentions that back in
      1994 he wrote a little domain specific language to aid screen
      scraping based integration. Essentially the intention of the language
      was to simplify reacting to changes in the scraped UI.

      Here is a code fragment:

      ;---- scrape XYZ screen ----
      LABEL SCREEN_ABC

      FIND "ADDRESS"
      EXTRACT "Street"
      POSITION 653
      EXTRACT "City"
      EXTRACT "State"
      EXTRACT "ZIP"

      FIND "INACT DT"
      EXTRACT "InactiveDate"
      NEXT
      EXTRACT "Inactive"

      I find it interesting, that this looks a lot like what one would
      write to resemble the browsing and drilling-down patterns of REST's
      application model. Imagine an RDF enabled user agent - 'FIND
      "ADDRESS"' (properly redone for RDF of course) could well mean: go do
      a GET, traverse the hypermdia links until you find something that can
      be inferred to be an address and "EXTRACT CITY" would then give us
      the foo:city of that address.

      Making use of this programatically would remove the need for a
      document-type based coupling (e.g. this GET has to respond with an
      address) between client and server and instead emphasize traversal of
      hyperlinks until some stated information need is satisfied.

      Back in 94...how smart!

      Jan




      [1] http://www.enterpriseintegrationpatterns.com/ramblings/
      42_eaidsl.html
    • Dr. Ernie Prabhakar
      Hmm. This looks (at least to me) vaguely similar to Rails functional ... I wonder if there s an underlying design model one could abstract into a generic DSL
      Message 2 of 2 , Jun 8, 2006
      • 0 Attachment
        Hmm.  This looks (at least to me) vaguely similar to Rails functional tests:

          def test_show
            get :show, :id => 1

            assert_response :success
            assert_template 'show'

            assert_not_nil assigns(:thing)
            assert assigns(:thing).valid?
          end

        I wonder if there's an underlying design model one could abstract into a generic DSL for this sort of thing...

        -- Ernie P.

        On Jun 8, 2006, at 6:33 AM, Jan Algermissen wrote:

        Hi,

        in a recent blog entry "EAI DSL", Gergor Hohpe mentions that back in
        1994 he wrote a little domain specific language to aid screen
        scraping based integration. Essentially the intention of the language
        was to simplify reacting to changes in the scraped UI.

        Here is a code fragment:

        ;---- scrape XYZ screen ----
        LABEL SCREEN_ABC

        FIND "ADDRESS"
        EXTRACT "Street"
        POSITION 653
        EXTRACT "City"
        EXTRACT "State"
        EXTRACT "ZIP"

        FIND "INACT DT"
        EXTRACT "InactiveDate"
        NEXT
        EXTRACT "Inactive"

        I find it interesting, that this looks a lot like what one would
        write to resemble the browsing and drilling-down patterns of REST's
        application model. Imagine an RDF enabled user agent - 'FIND
        "ADDRESS"' (properly redone for RDF of course) could well mean: go do
        a GET, traverse the hypermdia links until you find something that can
        be inferred to be an address and "EXTRACT CITY" would then give us
        the foo:city of that address.

        Making use of this programatically would remove the need for a
        document-type based coupling (e.g. this GET has to respond with an
        address) between client and server and instead emphasize traversal of
        hyperlinks until some stated information need is satisfied.

        Back in 94...how smart!

        Jan

        [1] http://www.enterpriseintegrationpatterns.com/ramblings/
        42_eaidsl.html


      Your message has been successfully submitted and would be delivered to recipients shortly.