Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Dragging something in JS

Reply
Thread Tools

Dragging something in JS

 
 
Martin Rinehart
Guest
Posts: n/a
 
      11-20-2008
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?
 
Reply With Quote
 
 
 
 
ameshkin
Guest
Posts: n/a
 
      11-20-2008
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.
 
Reply With Quote
 
 
 
 
Jeremy J Starcher
Guest
Posts: n/a
 
      11-20-2008
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.
 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      11-20-2008
On Nov 20, 2:32*pm, ameshkin <(E-Mail Removed)> wrote:
> 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.
 
Reply With Quote
 
Martin Rinehart
Guest
Posts: n/a
 
      11-21-2008
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?
 
Reply With Quote
 
Michael Wojcik
Guest
Posts: n/a
 
      11-21-2008
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
 
Reply With Quote
 
Jorge
Guest
Posts: n/a
 
      11-21-2008
On Nov 21, 1:45*pm, Martin Rinehart <(E-Mail Removed)> wrote:
> (...) 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.
 
Reply With Quote
 
Jorge
Guest
Posts: n/a
 
      11-21-2008
On Nov 21, 7:35*pm, Michael Wojcik <(E-Mail Removed)> wrote:
> (...)
> (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.
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      11-21-2008
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>
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      11-21-2008

"Martin Rinehart" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.


Dragging stuff is a reasonable easy affair. I tinkered this up over at
alt.html in response to somebody who was going to use jQuery to drag stuff.

It is *not* pretty. Making it pretty is up to whoever uses it.
http://barefile.com.au/test/drag.html


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugger Dragging =?Utf-8?B?SmltIEhlYXZleQ==?= ASP .Net 0 08-15-2005 07:51 PM
Customize Dragging pixturesk@hotmail.com Firefox 2 07-13-2005 11:51 PM
dragging images =?Utf-8?B?Q2hyaXMgU3Rld2FydA==?= ASP .Net 6 05-12-2005 08:01 PM
Dragging buttons around Firefox toolbar area (observed) Splibbilla Firefox 0 04-09-2005 12:38 AM
Code example for transformation by mouse dragging Wolfgang Java 2 02-01-2004 01:11 AM



Advertisments