PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > Drag and drop howto?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Drag and drop howto?

Réponse
 
LinkBack Outils de la discussion
Vieux 02/04/2008, 15h07   #1 (permalink)
while-one
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Drag and drop howto?

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



  Réponse avec citation
Vieux 02/04/2008, 15h55   #2 (permalink)
while-one
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Drag and drop howto?

On Apr 2, 8:07 am, while-one <Sandy.Pittendr...@gmail.com> wrote:
> 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.
  Réponse avec citation
Vieux 02/04/2008, 16h22   #3 (permalink)
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
Vieux 02/04/2008, 16h50   #4 (permalink)
while-one
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Drag and drop howto?

On Apr 2, 9:22 am, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spam yourself.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.

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 ed 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.
  Réponse avec citation
Vieux 02/04/2008, 17h33   #5 (permalink)
Andy Dingley
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Drag and drop howto?

On 2 Apr, 16:50, while-one <Sandy.Pittendr...@gmail.com> wrote:

> 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 (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.
  Réponse avec citation
Vieux 02/04/2008, 20h10   #6 (permalink)
while-one
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Drag and drop howto?

On Apr 2, 10:33 am, Andy Dingley <ding...@codesmiths.com> wrote:

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

  Réponse avec citation
Vieux 04/04/2008, 07h51   #7 (permalink)
Erwin Moller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Drag and drop howto?

while-one schreef:
> On Apr 2, 9:22 am, Erwin Moller
> <Since_humans_read_this_I_am_spammed_too_m...@spam yourself.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 in comp.lang.javascript if you think you must use
browsersniffing. They will almost always suggest a better solution.

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

>
> 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 ed straighten this out, for me.


I didn't want to push you to browsersniffing.

>
> 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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 16h47.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13457 seconds with 15 queries