Connecting Tech Pros Worldwide Forums | Help | Site Map

Dragging something in JS

Martin Rinehart
Guest
 
Posts: n/a
#1: Nov 20 '08
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
Guest
 
Posts: n/a
#2: Nov 20 '08

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.
Jeremy J Starcher
Guest
 
Posts: n/a
#3: Nov 20 '08

re: Dragging something in JS


On Thu, 20 Nov 2008 11:22:51 -0800, Martin Rinehart wrote:
Quote:
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. ;)
David Mark
Guest
 
Posts: n/a
#4: Nov 20 '08

re: Dragging something in JS


On Nov 20, 2:32*pm, ameshkin <amir.mesh...@gmail.comwrote:
Quote:
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?
Quote:
>
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.
Martin Rinehart
Guest
 
Posts: n/a
#5: Nov 21 '08

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?
Michael Wojcik
Guest
 
Posts: n/a
#6: Nov 21 '08

re: Dragging something in JS


Martin Rinehart wrote:
Quote:
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".
Quote:
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
Jorge
Guest
 
Posts: n/a
#7: Nov 21 '08

re: Dragging something in JS


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

EyeOS: (Spanish !)
http://eyeos.info/?lang=en

YouOS: (deprecated)
http://www.youos.com/

LivelyKernel: (Sun microsystems)
http://research.sun.com/projects/lively/index.xhtml

--
Jorge.
Jorge
Guest
 
Posts: n/a
#8: Nov 21 '08

re: Dragging something in JS


On Nov 21, 7:35*pm, Michael Wojcik <mwoj...@newsguy.comwrote:
Quote:
(...)
(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.
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
#9: Nov 21 '08

re: Dragging something in JS


Michael Wojcik wrote:
Quote:
Martin Rinehart wrote:
Quote:
>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.
Quote:
(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?
Quote:
Quote:
>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>
Closed Thread