HighDots Forums  

Drag and drop howto?

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Drag and drop howto? in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
while-one
 
Posts: n/a

Default Drag and drop howto? - 04-02-2008 , 09:07 AM






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

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?

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

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?)




Reply With Quote
  #2  
Old   
while-one
 
Posts: n/a

Default Re: Drag and drop howto? - 04-02-2008 , 09:55 AM






On Apr 2, 8:07 am, while-one <Sandy.Pittendr... (AT) gmail (DOT) com> wrote:
Quote:
Does GWT support Java's drag-and-drop libraries?

GWT does now support drag and drop...so Tomcat and Java
servlets might be a good drag-and-drop editor direction to take.


Reply With Quote
  #3  
Old   
Erwin Moller
 
Posts: n/a

Default Re: Drag and drop howto? - 04-02-2008 , 10:22 AM



while-one schreef:
Quote:
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)

Quote:
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.

Quote:
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 help. :-)

Quote:
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


Reply With Quote
  #4  
Old   
while-one
 
Posts: n/a

Default Re: Drag and drop howto? - 04-02-2008 , 10:50 AM



On Apr 2, 9:22 am, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m... (AT) spamyourself (DOT) com> wrote:

Quote:
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). ;-)
Erwin Moller
Good advice. I've had nothing but bad luck with Javascript, the
browser wars
still make it a browser sniffing nightmare, especially for anything
involving
complex mouse event tracking.

That's why I was thinking of Flash. Yes, it's true, not everybody has
it
installed. But Drag-and-drop forms and page editing is inherently a
password protected, administrative capability. So maybe it's not such
a bad thing: to require only the admin user to install Flash.

Gwt does a very good browser sniffing, javascript translation for you.
So, the more I think about it, it has to be GWT or Flash.
Roll your own javascript is too (because of browser wars)
exapserating.
You've helped straighten this out, for me.

I know Java and I don't know anything about flash. So I think I see
Tomcat and java servlets in my future.


Reply With Quote
  #5  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Drag and drop howto? - 04-02-2008 , 11:33 AM



On 2 Apr, 16:50, while-one <Sandy.Pittendr... (AT) gmail (DOT) com> wrote:

Quote:
I know Java and I don't know anything about flash. So I think I see
Tomcat and java servlets in my future.
Server-side Java itself has almost nothing to do with this problem.
The only way it might help (you might use it, but it wouldn't be
contributing directly) would be if you use a pre-existing server-side
framework that generates client-side JavaScript (as many of them do).
You don't need to use AJAX just for drag-and-drop, but most of these
frameworks came into existence to support AJAX.

I wouldn't use GWT (leaks resources badly and requires browser
restarts if used 9-5). If you know Java, I'd start by looking at JSF /
Facelets or Icefaces. Icefaces also looks particularly attractive.

AJAX doesn't have any problem with browser sniffing or incompatibility
unless you're a framework developer yourself. A major part of AJAX (as
a formalised approach) was to encapsulate that sort of nastiness and
isolate it from application developers.


Reply With Quote
  #6  
Old   
while-one
 
Posts: n/a

Default Re: Drag and drop howto? - 04-02-2008 , 02:10 PM



On Apr 2, 10:33 am, Andy Dingley <ding... (AT) codesmiths (DOT) com> wrote:

Quote:
I wouldn't use GWT (leaks resources badly and requires browser
restarts if used 9-5). If you know Java, I'd start by looking at JSF /
Facelets or Icefaces. Icefaces also looks particularly attractive.
Thanks. Good links.

RE> GWT memory leaks: I remember when netbeans was pretty
shaky. I worked with GWT for 3 months, about a year ago. It was a
rapidly moving target then, and now too its seems.
I took a look today and a lot has changed.



Reply With Quote
  #7  
Old   
Erwin Moller
 
Posts: n/a

Default Re: Drag and drop howto? - 04-04-2008 , 01:51 AM



while-one schreef:
Quote:
On Apr 2, 9:22 am, Erwin Moller
Since_humans_read_this_I_am_spammed_too_m... (AT) spamyourself (DOT) com> wrote:

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). ;-)
Erwin Moller

Good advice. I've had nothing but bad luck with Javascript, the
browser wars
still make it a browser sniffing nightmare, especially for anything
involving
complex mouse event tracking.
NOOOO!
Please don't start your JavaScript career with browsersniffing.
It has been damned, cursed, and thrown down the toilet (and flushed)
some years ago.

Warning: If you visit comp.lang.javascript, don't even mention it,
unless you love flames.

Instead of branching your code for different browsers using sniffing, a
much better approach exists: capability testing.
An age-old example: You want to change some images on your webpage?
Check if the images exist before trying to:
if (document.images) {
// do your stuff
} else {
// forget it. Browser doesn't support images.
}

Browsersniffing is very unreliable.
Always ask for help in comp.lang.javascript if you think you must use
browsersniffing. They will almost always suggest a better solution.

Quote:
That's why I was thinking of Flash. Yes, it's true, not everybody has
it
installed. But Drag-and-drop forms and page editing is inherently a
password protected, administrative capability. So maybe it's not such
a bad thing: to require only the admin user to install Flash.
Aha. Well, in that case Flash might be a better option for you.
If I were you I would pick the solution (JavaScript, Flash, Java applet)
that best fits your competence.

Quote:
Gwt does a very good browser sniffing, javascript translation for you.
So, the more I think about it, it has to be GWT or Flash.
Roll your own javascript is too (because of browser wars)
exapserating.
You've helped straighten this out, for me.
I didn't want to push you to browsersniffing.

Quote:
I know Java and I don't know anything about flash. So I think I see
Tomcat and java servlets in my future.
Good choice.
Personally I quited J2EE/Tomcat a few years back in favor of PHP.
Java is the most beautifull language I ever saw, but I deliver maybe 2-3
times quicker in PHP.
So if my clients don't care how I solve thier problem, then I solve it
in PHP. ;-)

Regards and good luck,
Erwin Moller


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.