Readng and writing files on the client side

I want to use Rails to

(1) Download an executable.
(2) Interact with a client to select a directory on the client side
(3) do directory browsing and selecting
(4) create an xml file of parameters, and write the xml file somewhere
or pass it to the executable.

Basically, I’d like to use Rails to create a front-end for my user and,
of course, interact with my Rails server.


Is this doable or am I better off having my client download a
stand-alone Ruby application? If a standalone Ruby application is
better, can someone recommend a GUI that you might suggest?

On Jul 7, 1:12 pm, Ralph S. [email protected] wrote:

I want to use Rails to

(1) Download an executable.
(2) Interact with a client to select a directory on the client side
(3) do directory browsing and selecting
(4) create an xml file of parameters, and write the xml file somewhere
or pass it to the executable.

A pure html/javascript web app has no access to the user’s file
system (beyond the ability for a user to upload a file of their
choosing)

Fred

Frederick C. wrote:

A pure html/javascript web app has no access to the user’s file
system (beyond the ability for a user to upload a file of their
choosing)

Fred

I know this is off topic … but …

I have a C++ Windows command-lnie executable and I want to slap a nice
front-end on it.

So … if … “A pure html/javascript web app has no access to the
user’s file
system” is there something impure that is commonly available?

Ralph S. wrote:

I want to use Rails to

(1) Download an executable.

This part is trivial.

(2) Interact with a client to select a directory on the client side

This happens automatically depending on what web browser the client
uses.

(3) do directory browsing and selecting

Thank goodness this is not possible through standard web technologies.

(4) create an xml file of parameters, and write the xml file somewhere
or pass it to the executable.

Much effort has been put into web browser security to prevent this exact
process.

That is unless you crack open the shell of security & privacy with
something like ActiveX or Adobe Flash. This is also why both of those
have been a “secret weapon” of malicious hackers for years.

Basically, I’d like to use Rails to create a front-end for my user and,
of course, interact with my Rails server.

Is this doable or am I better off having my client download a
stand-alone Ruby application? If a standalone Ruby application is
better, can someone recommend a GUI that you might suggest?

This is rather difficult to answer without knowing what that executable
program actually needs to do. How complicated will the GUI need to be?
What are the security & privacy concerns associated with what you’re
trying to accomplish?

I for one would be extremely reluctant to install your application on my
system (I wouldn’t have any way to do so anyway given I don’t run
Windows).

If your site is intended to be used by known clients, that already trust
you, then there are certainly some options. If your site is even
remotely public, and you expect clients to “just trust you,” then your
approach is not plausible. You cannot expect, or force, people to trust
you. Thankfully trust is in control of the client (unless, of course, if
the client’s system security has been compromised).

Robert W. wrote:

This is rather difficult to answer without knowing what that executable
program actually needs to do. How complicated will the GUI need to be?
What are the security & privacy concerns associated with what you’re
trying to accomplish?

It’s a backup application.

The client selects the files he/she wants to back up and we do our magic
… not on the server but on the client.

I agree with most of what Robert said; just wanted to amplify a few
points.

Robert W. wrote:

Ralph S. wrote:

I want to use Rails to

(1) Download an executable.

This part is trivial.

(2) Interact with a client to select a directory on the client side

This happens automatically depending on what web browser the client
uses.

(3) do directory browsing and selecting

Thank goodness this is not possible through standard web technologies.

Sure it is, with a file input field.

(4) create an xml file of parameters, and write the xml file somewhere
or pass it to the executable.

Much effort has been put into web browser security to prevent this exact
process.

Except that you can download a file that you expect the user to open
in your application. You may even be able to write a browser plugin
to make the file open in the browser (as Adobe has done with its PDF and
– yes – Flash plugins).

[…]

Is this doable or am I better off having my client download a
stand-alone Ruby application?

It’s hard to tell, at least for me.

If a standalone Ruby application is
better, can someone recommend a GUI that you might suggest?
[…]

You might like to look at Monkeybars or Limelight.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]