473,387 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Using HTML as an application GUI or How do you control an application from Javascript?

I'm currently developing an application in C++/MFC (Visual Studio 6,
if that makes a difference) and I'd like to avoid the Windows style UI
widgets and dialogs if at all possible.

In fact, what I'd really like to do is use HTML/web pages as the user
interface and invoke my application in the background to do the heavy
lifting. I'm fairly well experienced with web pages and I've written
a fair amount of JavaScript at one time or another (I taught several
undergrad courses using it actually) but I don't know anything about
its capabilities when it comes to interfacing with or controlling
external applications.

I'll likely be running IE on a Windows box (you can put it into full
screen no-toolbar mode) and here's the question: Can I use client-side
javascript to invoke and/or control my application? I know that
normally javascript can't play outside its own sandbox (i.e. no
filesystem access etc.) for security reasons, but I've seen in the MS
JScript documentation that it's possible to use something called
'unsafe' mode. And since it will only be using web pages on the local
file system, I'm comfortable with that.

Does anyone have experience with this? Do I have to expose hooks to
the app with COM or ActiveX or anything? (something I've used but
haven't directly written before so it's possible). Am I crazy? Is
there a better way to do this?

I'd appreciate any advice or pointers, thanks ... N

Nou Dadoun
Jul 23 '05 #1
6 2288
"Nou Dadoun" <da****@cs.ubc.ca> wrote in message
news:ae**************************@posting.google.c om...
I'm currently developing an application in C++/MFC (Visual Studio 6,
if that makes a difference) and I'd like to avoid the Windows style UI
widgets and dialogs if at all possible.

In fact, what I'd really like to do is use HTML/web pages as the user
interface and invoke my application in the background to do the heavy
lifting. I'm fairly well experienced with web pages and I've written
a fair amount of JavaScript at one time or another (I taught several
undergrad courses using it actually) but I don't know anything about
its capabilities when it comes to interfacing with or controlling
external applications.

I'll likely be running IE on a Windows box (you can put it into full
screen no-toolbar mode) and here's the question: Can I use client-side
javascript to invoke and/or control my application? I know that
normally javascript can't play outside its own sandbox (i.e. no
filesystem access etc.) for security reasons, but I've seen in the MS
JScript documentation that it's possible to use something called
'unsafe' mode. And since it will only be using web pages on the local
file system, I'm comfortable with that.

Does anyone have experience with this? Do I have to expose hooks to
the app with COM or ActiveX or anything? (something I've used but
haven't directly written before so it's possible). Am I crazy? Is
there a better way to do this?

I'd appreciate any advice or pointers, thanks ... N

Nou Dadoun


Look into HTA (HTML Applications)!

http://msdn.microsoft.com/library/de...thor/hta/overv
iew/htaoverview.asp

Can you be more specific about your application?

Jul 23 '05 #2
In article <ae**************************@posting.google.com >,
da****@cs.ubc.ca (Nou Dadoun) wrote:
In fact, what I'd really like to do is use HTML/web pages as the user
interface and invoke my application in the background to do the heavy
lifting. I'm fairly well experienced with web pages and I've written
a fair amount of JavaScript at one time or another (I taught several
undergrad courses using it actually) but I don't know anything about
its capabilities when it comes to interfacing with or controlling
external applications.


So, run apache on you PC. This would mean you could use all your
existing skills developing your application.

The other approach would be to write an HTA application. See:
http://msdn.microsoft.com/workshop/a...taoverview.asp

Robert
Jul 23 '05 #3
On 21 Sep 2004 16:22:42 -0700, da****@cs.ubc.ca (Nou Dadoun) wrote:
I'll likely be running IE on a Windows box (you can put it into full
screen no-toolbar mode) and here's the question: Can I use client-side
javascript to invoke and/or control my application?

Does anyone have experience with this? Do I have to expose hooks to
the app with COM or ActiveX or anything? (something I've used but
haven't directly written before so it's possible). Am I crazy? Is
there a better way to do this?


Yeah, it's easy and common, HTA's have been mentioned, personally I
like Zeepe from http://www.meadroid.com/ for doing this, you get a
lot more than HTA's give you in a nicer package.

Jim.
Jul 23 '05 #4
"McKirahan" <Ne**@McKirahan.com> wrote in message news:<cn54d.1090$He1.78@attbi_s01>...
"Nou Dadoun" <da****@cs.ubc.ca> wrote in message
news:ae**************************@posting.google.c om...
I'm currently developing an application in C++/MFC (Visual Studio 6,
if that makes a difference) and I'd like to avoid the Windows style UI
widgets and dialogs if at all possible.

In fact, what I'd really like to do is use HTML/web pages as the user
interface and invoke my application in the background to do the heavy
lifting. I'm fairly well experienced with web pages and I've written
a fair amount of JavaScript at one time or another (I taught several
undergrad courses using it actually) but I don't know anything about
its capabilities when it comes to interfacing with or controlling
external applications.

I'll likely be running IE on a Windows box (you can put it into full
screen no-toolbar mode) and here's the question: Can I use client-side
javascript to invoke and/or control my application? I know that
normally javascript can't play outside its own sandbox (i.e. no
filesystem access etc.) for security reasons, but I've seen in the MS
JScript documentation that it's possible to use something called
'unsafe' mode. And since it will only be using web pages on the local
file system, I'm comfortable with that.

Does anyone have experience with this? Do I have to expose hooks to
the app with COM or ActiveX or anything? (something I've used but
haven't directly written before so it's possible). Am I crazy? Is
there a better way to do this?

I'd appreciate any advice or pointers, thanks ... N

Nou Dadoun


Look into HTA (HTML Applications)!

http://msdn.microsoft.com/library/de...thor/hta/overv
iew/htaoverview.asp

Can you be more specific about your application?

Thanks for the pointers to HTA (to Robert as well), that's a
technology that I'd never tripped over before. Rename a web page and
get an application, who'd a thunk it?

A few questions though, it looks like a good prototyping tool for
doing quick and dirty UI mockups but I don't see immediately (I'm
still looking, of course) how it might be used as a real application
interface for an existing application. i.e. is there any 'exposed'
object model (that is, exposed to external apps)? Is there a file i/o
mechanism, I'm not familiar with one in client-side javascript and I
don't see an immediate connection to server-side js (which I've never
used admittedly)? Are there other hooks or pointers that aren't
immediately obvious? Does anyone have any actual experience using
HTAs? Caveats? Mudholes?

I can't go into a lot of detail about my app but it's actually two
entirely separate applications, an image acquisition app which
controls some USB cameras and writes images to disc and an image
analysis app which does some processing and reporting on the saved
images. The two currently communicate using the image files and a DDE
mechanism (based on legacy code in the analysis app) to trigger the
analysis but are otherwise entirely separate.

Part of my goal in having an html front end is to use it to do some of
the integration, i.e. ditch the DDE, have the front end trigger the
acquisition/storage and subsequently the analysis under user control.
But if retaining the DDE is simpler for a quick implementation, that's
ok too (for the time being).

Thanks again for any pointers ... N

PS. Running an Apache server on a windows box for an app UI running
on the same machine seems like a lot of overhead (there are some
performance issues with the applications already) but if there's a
serious case to be made for going that route (cgi? server-side js?)
for a working prototype, I'm certainly open to hearing it, thanks ...
N
Jul 23 '05 #5
"Nou Dadoun" <da****@cs.ubc.ca> wrote in message
news:ae**************************@posting.google.c om...

[snip]
A few questions though, it looks like a good prototyping tool for
doing quick and dirty UI mockups but I don't see immediately (I'm
still looking, of course) how it might be used as a real application
interface for an existing application. i.e. is there any 'exposed'
object model (that is, exposed to external apps)? Is there a file i/o
mechanism, I'm not familiar with one in client-side javascript and I
don't see an immediate connection to server-side js (which I've never
used admittedly)? Are there other hooks or pointers that aren't
immediately obvious? Does anyone have any actual experience using
HTAs? Caveats? Mudholes?

I can't go into a lot of detail about my app but it's actually two
entirely separate applications, an image acquisition app which
controls some USB cameras and writes images to disc and an image
analysis app which does some processing and reporting on the saved
images. The two currently communicate using the image files and a DDE
mechanism (based on legacy code in the analysis app) to trigger the
analysis but are otherwise entirely separate.

Part of my goal in having an html front end is to use it to do some of
the integration, i.e. ditch the DDE, have the front end trigger the
acquisition/storage and subsequently the analysis under user control.
But if retaining the DDE is simpler for a quick implementation, that's
ok too (for the time being).

Thanks again for any pointers ... N


[snip]

I use HTAs to read files and databases, execute commands (like FTP), and
much more.

I primarily use VBScript to write them.

Take a look at http://www.interclasse.com/scripts/htanotepad.php

A notepad made in HTA

This notepad can handle bigger files than the one shiped with Win9x.
Learn how to make windows looking interfaces in HTML.

A Google search on "HTML Application" will get you started.
Jul 23 '05 #6
In article <ae**************************@posting.google.com >,
da****@cs.ubc.ca (Nou Dadoun) wrote:
PS. Running an Apache server on a windows box for an app UI running
on the same machine seems like a lot of overhead (there are some
performance issues with the applications already) but if there's a
serious case to be made for going that route (cgi? server-side js?)
for a working prototype,
This would be best for port an existing PC application.
I'm certainly open to hearing it, thanks ...
N


I'd only use apache if you were already familiar with apache
programming. You would need to know how to run your backend code on
Apache. Your code would need to be in the client server model.

You would have to ask about performance over in an Apache web group.
See:
apache.org

I cannot get enough traffic on my one machine. I could not get Apache
above 1%.

Robert
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Chamomile | last post by:
I have been happily using array members as id's in my html code (either hand coded or generated by server-side script-php ) for some time. eg < input type='text' id='arrayItem' >< input...
4
by: Bill Zack | last post by:
I realize that IE now hosts the Common Language Runtime and that you can host Windows Forms controls in IE6 the way you can host ActiveX controls and Java applets. I originally got excited...
5
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
6
by: Shashi | last post by:
I have developed ASP.Net application using .Net 1.1 Framework. When the user clicks image file through Java script I am using my search window as below. QueryString =...
4
by: Zuel | last post by:
Hi Folks. So I have a small problem. My DoPostBack function is not writen to the HTML page nor are the asp:buttons calling the DoPostBack. My Goal is to create a totaly dynamic web page where...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
5
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
4
by: devine | last post by:
Hi All, I am VERY new to Javascript. I have been provided with some code, which will enable me to hide/show a text area and change a submit button dependant on a check box. <!DOCTYPE html...
3
by: vpascuzzi | last post by:
Hi, I am currently working on a small Silverlight application, but cannot find out what is wrong in my HTML. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.