Announcement

Collapse
No announcement yet.

Serving data to a Web Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Serving data to a Web Page

    This is a request for general advice on how to tackle a problem. Being a novice I do not know what parts need to be fitted together. Neither do I know the appropriate keywords to do a search!!

    I want to serve a web page from PBCC. The page gets updated every second. There are about 500 bytes of data and a total file size of about 10k. Of course I could refresh the whole page every second but this results in irritating blinking. So I would like to update the data only.

    So what are the elements need to do this job? For example, do I need Java script, etc.? How do the best choices integrate with PBCC?. What aspects of PBCC do I need to make myself familiar with? I prefer to avoid using files as intermediaries.

    Any relevant PBCC code examples, CBT or book references or links would be greatly appreciated.

    Thanks.

    Rich
    Rich

  • #2
    One of the reasons it flickers is because of the rendering engine used.
    MSIE flickers while Opera does not.

    To update only a small part of your webpage you'll mosty likely hear and read about AJAX.
    By using AJAX you can make requests and do something with the result like setting the innerhtml of a div or so.
    I have no experiance with that.
    A similar idea can be making use of an IFRAME and update only the part you need.
    This has nothing to do with PB/CC, you simply react on requests by returning html.
    Last edited by Edwin Knoppert; 9 Jun 2008, 01:58 PM.
    hellobasic

    Comment


    • #3
      What kind of "web" application needs the page updated every second?

      But if you have to, Edwin's suggestion - only updating what has to be updated, not the lazy, careless, sloppy and unprofessional approach of updating the whole **** page - is a good one.

      MCM
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        We *do* the lazy thing all the time

        Note that we often use frames, if the body is the only thing being updated it doesn't flicker.

        It's reason is subjective, people experiance flicker only if the content remains the same or slightly changed.
        Iow if the full 'bodyframe' changes it does not have to appear flickering.
        hellobasic

        Comment


        • #5
          >We *do* the lazy thing all the time

          Let's be careful about whom is included in this "we", OK?
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            Actually I am curious about the whole concept (not just PBCC), but would a better forum to search be "Programming for the Internet"???

            My 1st ideas are about depending on my app, I create a webpage, fill in fields, and maybe later interop with that page.

            Ultimately I would like to do it irregardless of if its IE/Mozilla/Opera/ etc.. Html is html afterall...despite the engine that displays it to the user
            Engineer's Motto: If it aint broke take it apart and fix it

            "If at 1st you don't succeed... call it version 1.0"

            "Half of Programming is coding"....."The other 90% is DEBUGGING"

            "Document my code????" .... "WHYYY??? do you think they call it CODE? "

            Comment


            • #7
              but would a better forum to search be "Programming for the Internet"???
              Yes. You're basically talking about 'cgi' type of programming. A good starting point would be the tutorials I've written on the subject.
              Software makes Hardware Happen

              Comment


              • #8
                Originally posted by Michael Mattias View Post
                What kind of "web" application needs the page updated every second?
                MCM
                Streaming video, streaming audio, stock quotes, realtime graphs, etc. Most of these use plugins such as Flash, which can establish a stateful connection, instead of stateless http.
                --pdf

                Comment


                • #9
                  Maybe I'm just negative on the whole idea from my experience at NHL.com, The National Hockey League's site.

                  Some of the statistics pages automatically refresh about every 10 seconds, and if you've scrolled down to read the bottom of the page, when it refreshes you get sent back to the top.. losing both your place and your whole train of thought.

                  Why it has to do that is a mystery to me, since the game has already been completed and the shift charts and other info are not going to change!!

                  MCM
                  Michael Mattias
                  Tal Systems (retired)
                  Port Washington WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment


                  • #10
                    Hockey is for girls anyway
                    hellobasic

                    Comment


                    • #11
                      What's the smiley for, "I'll slam your butt into the boards!?"
                      Michael Mattias
                      Tal Systems (retired)
                      Port Washington WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment


                      • #12
                        Thanks

                        Thanks guys for all your help!

                        Michael:
                        What kind of "web" application needs the page updated every second?
                        The application is distributing process control data over an intra net.

                        Edwin:
                        I'll check out Ajax, thanks.

                        Joe:
                        Great, I will study your tutorial, looks useful.
                        Since we will be installing the server, can your recommend one that includes SSI?

                        And that hockey exchange.....reminds me that we want to avoid getting refreshed to the top of the page too.

                        Good suggestion to switch the questions to Programming for Internet

                        Thanks


                        Rich
                        Rich

                        Comment


                        • #13
                          Another way would be to use IFRAME and perhaps fastcgi.
                          How long is an idea?

                          Comment

                          Working...
                          X