Discussion: Drag and drop howto?
Afficher un message
Vieux 02/04/2008, 16h22   #3
Erwin Moller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Drag and drop howto?

while-one schreef:
> This is a "web-application design" question, not an html question.
> So redirect me to the right group, if appropriate.
>
> If you wanted to build a drag-and-drop html and forms editor--as
> a desktop application--you (the software designer) would have
> many language/library choices. But what if you wanted this to be
> a browser-based web application? What drag-and-drop options
> are there


Hi,

With JavaScript you can build drag-and-drop behaviour in a browser.
comp.lang.javascript is a good place to start asking.

It boils down to moving around divs and capturing mouse-events (mouseup,
mousedown, mousemove, etc), and do some basic math.

google this:
drag and drop javascript tutorial

and you'll find plenty of resources (which might, as usual, differ
greatly in code quality)

>
> I've worked some with Google's GWT libraries, where you write Java
> code that gets compiled into Javascript, that makes remote method
> calls to the server, using a Java format that looks a lot like Java
> RMI.
> Does GWT support Java's drag-and-drop libraries?
>
> Would flash be a reasonable choice?


While flash is powerfull, not everybody has it installed.
So the choice is yours.

>
> Are there existing Ajax libraries that support drag-and-drop events,
> that can be attached to server callbacks?


Not sure.
I have seen a lot a poorly written Ajax libs.
The hype surrounding Ajax didn't contribute to high quality code. ;-)

Since using Ajaxoid solutions are very easy to write if you are
confortable with JavaScript, I would advise you to roll your own.
For a quickstart (not in depth) start here:
http://www.w3schools.com/ajax

For advise on libs: comp.lang.javascript might . :-)

>
> If a web-based drag-and-drop editor was you goal--for what ever
> purpose--
> what would be the right road to go down (when you get to a fork
> in the road, take it?)


I say:
1) Learn JavaScript
2) Learn DOM and build some drag-and-drop testingpages (and DO test on
all browsers you want to support. Do not join the IE-only or FF-only clubs.)
3) Ajax which will be a breeze after 1) and 2). ;-)

Best of luck.

Regards,
Erwin Moller
  Réponse avec citation
 
Page generated in 0,06213 seconds with 9 queries