Click here to Skip to main content
15,881,204 members

Comments by hyperplus (Top 4 by date)

hyperplus 19-Apr-11 20:11pm View    
Bob, thanks for the input. I totally agree with the bad approach to the problem, but is the customers requirement. We are still trying to change this, but meanwhile we need to move forward.

That's why the only way is to use IE and ActiveX to access the hardware. This will be an intranet
application so we are ok with some other major concerns that this approach brings. At the end seems I am back to how will approach this?

I guess either frames or IE BHO implementations.
hyperplus 18-Apr-11 17:39pm View    
Sorry for the confusion there.

Going back to step #1.5 :) So the web page is serve from Websphere server and all that is ok. But what I need to figure out is hardware control on the client machines. For that we will use Internet Explorer ability to load ActiveXObjects from JavaScript. The problem I still have is how to keep the connection activity across the pages navigation.

Back to possible solutions:
Option #1: Hidden frame which hosts the references to the active connection. But now that I think about it, it probably wont work as the object in page_A might not be accessible by page_B.
Option #2: Implement an IE - Browser Helper Object (BHO) which will make the browser the container of my objects for the hardware and some how access that from JavaScript. I seen some tutorials in C, but nothing in C#. And I haven't got it working neither.
hyperplus 18-Apr-11 17:12pm View    
Thanks for your help. This is not a trivial problem for me about how to address the requirements. I am getting a little lost in trying to get your idea...

What will be considered the default AppDomain? The one in the web server or the one running the browser? Or actually both? I think it will be the one in the browser, but I will not have access to play there. That's why I was thinking I need my own AppDomain.

What will I really gain by persisting the Hw object & connection? From my understanding, this will serialize the object instance, send it to the server and restore it back in the client when the next page is loaded. Am I missing something?

Another quick note: The web app is not .Net oriented, and actually it will use a Websphere server with Facelets.
hyperplus 18-Apr-11 16:40pm View    
SAKryukov, thanks for the prompt response. I have read some about this topic, but a little more pointers will be appreciated. Below is what I understand how I could use this and a little more detail about the problem.

Possible scenario flow:
When user enters the page to start the "Test Routine" a "calibration" process is started with the hardware which needs to keep the communication active. When calibration is complete, the user will move to the next page which is to get "Actual Readings". During this flow I can't loose my active communication...

What I understand can be done:
Create an AppDomain which will host the active communication. Get the active instance from this AppDomain in the next page.

Questions?
Is this what you had in mind? :)
So this means I have to startup my AppDomain Main() to be running in the background to perform this activities?
I don't think I can just use the IE AppDomain to plug my functionality in.

Thanks for any advise