Solved

Web Based Drop and drag

Posted on 2004-08-31
10
670 Views
Last Modified: 2013-11-18
I want to develop a web based tool to catalogue my CAD drawings.

The goal being that i can click on an image that represents the drawing and can drag it onto a CAD application that runs under windows. The application does support drop and drag under windows.

I expect to be using a java servlet to generate the page.

Is this possible?

Phill
0
Comment
Question by:PhillO
  • 4
  • 4
  • 2
10 Comments
 

Author Comment

by:PhillO
ID: 11947508
Further info

when i click on the image, i want the web app to select the appropriate CAD file (not the gif image) for inserting into the CAD application

Phill
0
 
LVL 2

Expert Comment

by:Epistemo
ID: 11947996
0
 
LVL 2

Expert Comment

by:Epistemo
ID: 11947999
Wrong subject ... sorry ... forget about my previous post ...
But if your writing an applcation for Windows you might want to switch to C#.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 3

Expert Comment

by:pbguy
ID: 11955439
Hi Phil,

Don't know if I have an exact answer to your question but I think I can move you in the right direction.

When you say "web-based tool" that can mean alot of things.  

A true web-based application is an app that you can run through a browser using the standard, built-in capabilities of the browser (essentially HTML and Javascript)  Now, you can have true web-based applications that use dynamic scripting packages on the server (think ColdFusion, JSP, ASP, ASP.NET, PHP, etc.) -- all of these tools have their own special programming language, but all of that work happens on the web server.  By the time it gets to your browser, it's just straight HTML and Javascript (don't believe me?  Do a View Source next time you visit a ColdFusion site and try to find something that's not HTML or Javascript...)

Now, a true web-based application is not able to talk to the file system on a client PC.  It's security that built into the entire protocol.  You can't take control of a PC through straight HTML and Javascript, it's why you can surf the net without every hacker in the world looking at your financial statements.  

But there are other options.

Browsers allow plug-ins and ActiveX, which are essentially full-blown Visual Basic (or other) executable that runs like any other program on your PC.  Through this type of application, you can do whatever you wanna do.  But it's at a price.  First off, you need to manually install the plugin onto any browser you want to use the functionality on.  Second, you need to write a full-fledge VB (vb.net/powerbuilder, C++, whatever) application, Third,  ... well, really, once you get to this point why even bother with a browser, it's just aother Windows application, there's no real need to stick it inside a browser unless you're trying to fool someone.

So, bottom line, browsers and web-apps can't talk to Windows or the underlying OS unless you cheat and create a Windows Program and stick it into a browser, at which point why even bother with a browser?

Lastly, you may be able to get away with a Swing Applet (not a servlet - servlets work like Coldfusion, they do a bunch of work on the server and then serve up straight HTML and Javascript.)  Java has a strict protocol regarding security on client machines, but I'm pretty sure you can turn it off with permission from the machine owner and access components of the OS.

BTW C# essentially works the same way as Java, but I'm pretty sure you can use it to construct ActiveX Components that can be used as plugins as stated above...

I guess the first step is ask yourself "why do I need a web application for this?" and second "how much work am I willing to do to get this functionality to happen inside a browser?"

Hope this helped clear some things up for you, good luck and I'd be happy to clarify anything if you have questions.


0
 

Author Comment

by:PhillO
ID: 11958406
wow pbguy what an answer!!

I want to use my CAD blocks as a resource over the internet. Some of my clients want me to work from their premisies and others either don't care where i operate from. So, by using servlets with apache, I can use a central repository that i can access from anywhere. This would provide me with a HTML table to display images of drawings acting as a preview. Also i can include encryption (if really neccesary - but probably not) plus authentication (of course the password and username needs to be encrypted).

I know that i can just use the HREF tag and I can just download the file normally. That is one option. I have also been lead to believe that I can use javascript to copy to clipboard. If true, that is a second option. But If possible, the best option would be to mimic a win app and just drop the the file directly into the drawing.

i was thinking of using some client side java code to act as a psuedo ftp client (not an applet) that can provide the functionality (similar to activeX - I'm not familiar with activeX programming). One question that arises is can i use both java and javascript in the one html document?

i have thought about implementing webdav but it doesn't provide facilities (that I"m aware of) to display a series of images like a table

Having said all that, the programming will take as long as it takes. I have just completed a uni subject in web based information systems and found it very interesting. So I would like to pursue the possibilities and see where it leads. i have done some of the programming required for the above idea  but not all. So, there will be a learning curve

Regards Phill
0
 
LVL 3

Expert Comment

by:pbguy
ID: 11963648
Hey Phill,

Makes sense why you'd want to do it like that, and understood how you're gonna use servlets.  Not sure whatthey were talking about javascript copying to the clipboard, but you want a win app anyway so we should explore that further...

You can use java and javascript in the same document, but pretty much if it's java on the client end it's gonna be an applet (unless you're running it outside the browser...)

I had a thought that what you're looking for may already exist, and I wondered if you could accomplish it a bit easier with MIME types.  Check out this link:

http://www.javacommerce.com/tutorial/notes/javascript/ch10.htm

It mentions CAD in there, but more importantly explains a bit about MIME types and plugins.  It may end up being a very easy task to just associate a file type with the CAD app and be able to click on it and open immediately (this is what happens with Word documents and Excel documents - just a MIME type in the browser.)  Looks like there might be some server-side configuration requirements but it may be the easiest way to go...

Tell me what you think, I'll try to dig up some more info for ya if you think this is helpful...

One question -- I assume that your CAD app is installed on each one of the clients and would open from the local PC (as opposed to the entire app being downloaded over the internet -- you just want the design files, not the whole app right?)

Ya got me curious now...
0
 

Author Comment

by:PhillO
ID: 11964371
yes pbguy

the CAD app will reside on the client. what i have on the server is just the resource file. I will have a look at the link and get back to you

Phill
0
 
LVL 3

Accepted Solution

by:
pbguy earned 500 total points
ID: 11966736
Are you using AutoCAD?

Just a few more I found:

Might get us in the right direction...
http://www.mail-archive.com/slug@slug.org.au/msg27516.html

This one looks very close, Check out in particular the section labeled Adding drawing/x-dwf as a MIME type
http://venus.ce.jhu.edu/jhu/courses/Fall.99/cie150/publish.html

This may help also
http://www4.dogus.edu.tr/bim/bil_kay/pak_prog/autocad14/ch27.htm#Heading1

None seem to do exactly what you need but I think it's the right direction... If we get a CAD drawing to open through a link in a helper app or the browser we're home free methinks...

Ok, that's it for now.  Hope they help!
0
 

Author Comment

by:PhillO
ID: 11968479
THANKYOU!!
0
 
LVL 3

Expert Comment

by:pbguy
ID: 11968575
Thanks Phill,

Actually, would be very curious in how you finally resolve if you care to post some info...  Good luck
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Display recordset field HTML encoded 21 52
wordpress limitations 4 115
jQuery or Javascript animation question 6 68
ColdFusion Rereplace 3 78
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question