471,356 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

A question of architecture

Hello,

Firstly, my current experience is asp classic and vb6. The reason that
i am posting in this group is that i feel that most people hear would
(should?) have a pretty good feel for pre-NET programming, and would
therefore be able to give me the most comprehensive advice. Well, here
we go:

I am working on a project to implement a system which will provide a
web-based interface to a serial connected hardware device. Prehaps that
is enough, but i will expound a little...

We we have is a 3rd party hardware device (let's say in this case, a
building-automation product) which can accept commands to switch on and
off its outputs, and reply to requests for the status of these outputs.
Therefore, it may take a command like "SET Q1 = ON" on its serial port,
and understand this to mean that the Output Relay 1 should be on. Or it
may take a request like "GET Q1 = ?" and replay with "GET Q1 = OFF".
Other commands/requests may act upon numeric values such as a
temperature reading. Now this system is limited to a control interface
based on a PC serial connected to the controller, and we need to be able
to control the system from more than one computer at the site. What i
would like to create is a web-based interface with "buttons" showing &
able to change the status of the outputs. I would not expect more than
about 10 possible users, so we are not looking at a million-hits-a-day
site!

Now here is your chance to show your ablility...

What I need to know, is the most applicable design to achieve this end?

1) Do i create a custom webserver exe. I know vb6 is not
multi-threaded, but is it an absolute no-no to develop such a system in
vb6?

2) Do i create something in ASP? If so, how does one handle rs-232
comms in ASP

3) Is there a better way?

I'm listening...

Thanks,
Nicolas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #1
3 1082
Hello Nicolas,

I'm going to suggest a third option.

You have a serial device. You have only one of them, and you probably don't
want to try to share the comm channel across many processes. In other
words, you have a resource that you need to protect.

I would suggest that you create a Component in C# that you run in Component
Services. That will use P/Invoke to perform the serial communications.
http://msdn.microsoft.com/msdnmag/is...NETSerialComm/
http://www.ondotnet.com/pub/a/dotnet...l?page=2#82110

There's also an excellent book on Remoting by Ingo Rammer that may help.

Then, your ASP.Net site simply calls the singleton object, asks for status
and sends commands. This allows many IIS users to use one COM+ component
that manages the access to your serial device.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Nicolas Noakes" <an********@hotmail.com> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
Hello,

Firstly, my current experience is asp classic and vb6. The reason that
i am posting in this group is that i feel that most people hear would
(should?) have a pretty good feel for pre-NET programming, and would
therefore be able to give me the most comprehensive advice. Well, here
we go:

I am working on a project to implement a system which will provide a
web-based interface to a serial connected hardware device. Prehaps that
is enough, but i will expound a little...

We we have is a 3rd party hardware device (let's say in this case, a
building-automation product) which can accept commands to switch on and
off its outputs, and reply to requests for the status of these outputs.
Therefore, it may take a command like "SET Q1 = ON" on its serial port,
and understand this to mean that the Output Relay 1 should be on. Or it
may take a request like "GET Q1 = ?" and replay with "GET Q1 = OFF".
Other commands/requests may act upon numeric values such as a
temperature reading. Now this system is limited to a control interface
based on a PC serial connected to the controller, and we need to be able
to control the system from more than one computer at the site. What i
would like to create is a web-based interface with "buttons" showing &
able to change the status of the outputs. I would not expect more than
about 10 possible users, so we are not looking at a million-hits-a-day
site!

Now here is your chance to show your ablility...

What I need to know, is the most applicable design to achieve this end?

1) Do i create a custom webserver exe. I know vb6 is not
multi-threaded, but is it an absolute no-no to develop such a system in
vb6?

2) Do i create something in ASP? If so, how does one handle rs-232
comms in ASP

3) Is there a better way?

I'm listening...

Thanks,
Nicolas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #2
Hello Nick,

Thanks for the suggestion, I was wondering along those lines.

As mentioned in my original post, I am not yet "up to speed" with .net -
Would you say your suggestion is practicle in ASP classic with a VB6
component? Or is .net going to really be worthwhile?

Thanks,
Nicolas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3
of course you can do this in VB6 as well. VB6 has a comm OCX you can use,
which is helpful. VB6 may not have the same performance numbers, but you
don't need a highly scalable application. On the other hand, .Net is a
consistent, clean, Object Oriented framework with two excellent OO languages
sitting on top. Why NOT do it in .Net? Especially if you need to support
and maintain this code for a few more years. It's going to become
increasingly difficult to find VB6 developers of the next few years, and
that will make it harder and harder for you to keep your app up to date.

Ultimately, its your call. .Net would be my choice.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Nicolas Noakes" <an********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hello Nick,

Thanks for the suggestion, I was wondering along those lines.

As mentioned in my original post, I am not yet "up to speed" with .net -
Would you say your suggestion is practicle in ASP classic with a VB6
component? Or is .net going to really be worthwhile?

Thanks,
Nicolas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by David Noble | last post: by
6 posts views Thread by carsonbj | last post: by
13 posts views Thread by rrs.matrix | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.