Java? something else?



  • I'm working in a small nice and easy web application. Nothing really fancy, just a few dynamic forms on LAMP and that's about it.. except..and this is were I need some help.

    One of the specifications for one of the forms is that it is supposed to get a folder directly from a CD or HD, that contains a series of subfolders with hundreds of files (this is a standard structure), then compress them in the client.. upload to server and uncompress there.

    Of course most of this part is out of my league and we will be outsourcing these functions.

    My question will be.. what should I look for? I'm guessing some java applet could do the job.. but I rather hear from someone with more knowledge on the subject.

     

    Thanks 




  • Java applets and Javascript aren't allowed to read files from the disk, unless your user really wants them to (and this requires some client-side setup). Check this site, item 2:

    http://java.sun.com/sfaq/



  • Not happening with respect to random joe-blo's web browser. You will need to:

    • Create some kind of plugin for the web browser (per target OS) that they have to install OR
    • Create a client application that does this (C# or whatever). Have a link on the website that links to the installer. Client app should use a web API to do the file uploading.
    • Recommend one of the many existing drag-n-drop FTP clients instead.
    • Use WebDAV. You can drag-n-drop folders from internet explorer, for example.


  • I've used a Java applet to do this.  You need to sign the applet and for that you need to get a signing certificate.

    The best tutorial on signing certificates is at http://mindprod.com/jgloss/certificate.html

    A signed Java applet can do anything a Java application can do.  The biggest problem is that it requires Java on the client side.  If this application is for use by the general public, you can't assume that Java is installed.  In my case the application was in-house and we installed the Java Virtual Machine on all the users' computers.

     



  • Thanks for the answers.  

    This is not for general public, and very few users (<1000) so I guess we can make them install java Virtual machine or some plugin.

    I first recommended  to use some zip and freaking ftp the files.. but this application is for (I quote) "Really dumb people".. which happen to be Doctors..

    They can perform open heart cirgury.. but they can´t compress a folder and FTP it?

     Could they press "yes" when whatever solution we use tries to install in their system? This is serious and legitimate question... 



  • @newfweiler said:

    I've used a Java applet to do this.  You need to sign the applet and for that you need to get a signing certificate.

    The best tutorial on signing certificates is at http://mindprod.com/jgloss/certificate.html

    A signed Java applet can do anything a Java application can do.  The biggest problem is that it requires Java on the client side.  If this application is for use by the general public, you can't assume that Java is installed.  In my case the application was in-house and we installed the Java Virtual Machine on all the users' computers.

     

     

    Almost everyone has java installed.  From looking at some google analytics from a website that I work with 97% of the visitors had Java installed.  And that's a quilting website, so it's not just techies. 



  • @fatdog said:

    I first recommended  to use some zip and freaking ftp the files.. but this application is for (I quote) "Really dumb people".. which happen to be Doctors..

    They can perform open heart cirgury.. but they can´t compress a folder and FTP it?

    Can you make a correct incision?
    Can you, as you often hear on hospital TV shows, intubate?
    Can you do things even an unspecialized nurse takes for granted?

    Don't expect your basic knowledge to be basic for others as well. :) Zipping and FTP-ing are a pretty decent step up from n00b-level file operations. Many novices don't even know how properly handle computer files on a really, really basic level. And remember, there was a time when you yourself went, "Zip? WTF?". Just as you'll never be a doctor, the doctors will likely remain at the level of "Zip? WTF?"



  • Hey,

    As a side project of my own, I am taking advantage of the way that java code is compiled into byte code, and trying to make a program that is able to create, decompile, compile code, and itself, as part of a pseudo-AI program.

    So, I am  trying to  figure out a way to call a compiler from inside a java program, and pass the .java file that I want to compile as an argument.

    Any ideas?


    -boheme 



  • @bohemeorange said:

    Hey,

    As a side project of my own, I am taking advantage of the way that java code is compiled into byte code, and trying to make a program that is able to create, decompile, compile code, and itself, as part of a pseudo-AI program.

    So, I am  trying to  figure out a way to call a compiler from inside a java program, and pass the .java file that I want to compile as an argument.

    Any ideas?


    -boheme 

    If speed isn't critical (and I'm guessing not, since you're using java) wouldn't javascript/ecmascript/jscript be easier for this? For what you're suggesting, to me it's just screaming out for it, especially with things like eval().



  • @dhromed said:

    Can you make a correct incision?
    Can you, as you often hear on hospital TV shows, intubate?
    Can you do things even an unspecialized nurse takes for granted?

    Don't expect your basic knowledge to be basic for others as well. :) Zipping and FTP-ing are a pretty decent step up from n00b-level file operations. Many novices don't even know how properly handle computer files on a really, really basic level. And remember, there was a time when you yourself went, "Zip? WTF?". Just as you'll never be a doctor, the doctors will likely remain at the level of "Zip? WTF?"

    You are right... but these are not your old family doctors from the faraway country village. These guys are reconstructing facial bones with hi tech computerized stuff.
    I guess I wasn't clear enough. I was "whining" more about our client who thinks the doctors are dumb, than the doctors themselves.

    I'm pretty sure these doctor can handle the heat of a zipping a folder. As a matter of fact, I'm pretty sure they have assistants, secretaries, or someone that does this for them anyway.

    BTW, I could probably learn how to make an incision or an intubation.. I'd just google for it, there must be some good tutorial, or forums for that.



  • You might try Java Web Start, which will allow you to run a desktop app with file permissions. I just finished writing one using Netbeans and found it easy to write though there only seems to be automatic deployment for Sun Server.

     These got me started:
    www.netbeans.org/kb/articles/matisse-jaws.html#_1_3
    java.sun.com/products/javawebstart/

     



  • @fatdog said:

    You are right... but these are not your old family doctors from the faraway country village. These guys are reconstructing facial bones with hi tech computerized stuff.
    I guess I wasn't clear enough. I was "whining" more about our client who thinks the doctors are dumb, than the doctors themselves.

     Never underestimate how utterly ignorant a smart person is when it comes to computers, even if they use a lot of high tech stuff.  I did coporate tech support for a big pharmaceutical company in their research division. Needless to say, I've had many times where I was talking to some incredibly smart people that use some sophisticated technology for their research that had difficulty copying a file from their desktop to a floppy disk.     
     



  • Indeed, some Java applet could totally do the job.  That's the best and sanest way to do this.  I think there are Active X ways you could do that but they wouldn't be any easier and they would be non-portable.


Log in to reply