Dragging something in JS

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

    Dragging something in JS

    I have been informed (by informed people) that if I want to drag
    something around the screen I should write my own code because the
    available stuff is not very good. (That was actually put less kindly
    in the originals.)

    Is this true? What is wrong with the other stuff? What would
    characterize good dragging code?
  • ameshkin

    #2
    Re: Dragging something in JS

    I've used scriptaculous and prototype for this, but it doesn't ALWAYS
    work well. I've written my own code as well which does seem more
    solid.

    Other than scriptaculous, and custom js code, I haven't tried anything
    else. I would also like to know if there is a better option out there.

    Comment

    • Jeremy J Starcher

      #3
      Re: Dragging something in JS

      On Thu, 20 Nov 2008 11:22:51 -0800, Martin Rinehart wrote:
      I have been informed (by informed people) that if I want to drag
      something around the screen I should write my own code because the
      available stuff is not very good. (That was actually put less kindly in
      the originals.)
      >
      Is this true? What is wrong with the other stuff? What would
      characterize good dragging code?
      A vast majority of Javascript code out there is, to put it kindly, total
      crap for one out of three reasons.

      1) Using browser sniffing instead of feature detection. There has been
      a lot written about the two approaches, I won't repeat it here.

      2) Relying on a frame work. The various frame works are all criticized
      for different reasons. At absolute BEST they are large and cumbersome.
      At worst, they are very delicate on the inside and prone to breaking on
      slight browser changes and lack of support for "minor" browsers.

      3) Written by inexperienced hands. This is a tough one, because a
      novice, trying to write his own code, might not too much better than some
      of the stuff out there. I really do understand the desire to simply snag
      something that *works* and move on.


      I've never written drag code, or I'd share it with you. In all of my
      designs, I realized that by the time I made my web page usable on small
      screens and print outs, that the drag-code had to go anyways. (My
      biggest web page is a parts lookup -- I have people on iphones using this
      while crawling over their bikes, ordering parts.)

      On the other hand, I couldn't imagine a site like meebo.com working
      without some sort of drag code. ;)

      Comment

      • David Mark

        #4
        Re: Dragging something in JS

        On Nov 20, 2:32 pm, ameshkin <amir.mesh...@g mail.comwrote:
        I've used scriptaculous and prototype for this, but it doesn't ALWAYS
        work well.  I've written my own code as well which does seem more
        solid.
        It "works" about as well as it always did (which is to say not well.)
        150K for a few special effects and mouse position reporting?
        >
        Other than scriptaculous, and custom js code, I haven't tried anything
        else. I would also like to know if there is a better option out there.
        First, get rid of Scriptaculous. It is built on Prototype and anyone
        with a choice (and a brain) stopped using that years ago.

        Comment

        • Martin Rinehart

          #5
          Re: Dragging something in JS

          Thanks, all. I've written drag code before, but I'm not sure C++ for
          DOS is going to be a big help. What we need is a proper windowing OS
          within the browser, but that sounds like it won't happen as a one-man,
          spare-time project.

          Anybody know what Chrome is going to sprout?

          Comment

          • Michael Wojcik

            #6
            Re: Dragging something in JS

            Martin Rinehart wrote:
            What we need is a proper windowing OS
            within the browser...
            Wow. That sounds utterly vile. But perhaps some of us don't need it as
            much as others do.

            (Would I be able to run my browser in a window in my browser?)

            Perhaps this idea would have caught on if a major OS vendor had put it
            into their OS around 1995. They could have called it something catchy
            like "Active Desktop".
            Anybody know what Chrome is going to sprout?
            Horns and a pointy tail would be my guess.

            --
            Michael Wojcik
            Micro Focus
            Rhetoric & Writing, Michigan State University

            Comment

            • Jorge

              #7
              Re: Dragging something in JS

              On Nov 21, 1:45 pm, Martin Rinehart <MartinRineh... @gmail.comwrote :
              (...) What we need is a proper windowing OS
              within the browser, (...)
              There are three:

              EyeOS: (Spanish !)


              YouOS: (deprecated)


              LivelyKernel: (Sun microsystems)


              --
              Jorge.

              Comment

              • Jorge

                #8
                Re: Dragging something in JS

                On Nov 21, 7:35 pm, Michael Wojcik <mwoj...@newsgu y.comwrote:
                (...)
                (Would I be able to run my browser in a window in my browser?)
                (...)
                Yes, that's possible, you can try it in EyeOS...

                --
                Jorge.

                Comment

                • Thomas 'PointedEars' Lahn

                  #9
                  Re: Dragging something in JS

                  Michael Wojcik wrote:
                  Martin Rinehart wrote:
                  >What we need is a proper windowing OS within the browser...
                  >
                  Wow. That sounds utterly vile. But perhaps some of us don't need it as
                  much as others do.
                  Perhaps a bad choice of words. I think he meant some kind of window manager
                  for a Web application, which has been written before.
                  (Would I be able to run my browser in a window in my browser?)
                  >
                  Perhaps this idea would have caught on if a major OS vendor had put it
                  into their OS around 1995. They could have called it something catchy
                  like "Active Desktop".
                  To be fair, Active Desktop is more of a browser within an OS, if you want to
                  call it that. But doesn't Google Apps sound like what Martin is asking for?
                  >Anybody know what Chrome is going to sprout?
                  >
                  Horns and a pointy tail would be my guess.
                  I'll see your horns and tails, raise you even more incompatibility .


                  PointedTai^H^H^ HEars
                  --
                  Use any version of Microsoft Frontpage to create your site.
                  (This won't prevent people from viewing your source, but no one
                  will want to steal it.)
                  -- from <http://www.vortex-webdesign.com/help/hidesource.htm>

                  Comment

                  Working...