472,794 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,794 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 1116
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: David Noble | last post by:
We've been developing a web site using 3-tier architecture for 18 months now. There is a common layer that defines the classes - using XML schemas. The data layer acts as a wrapper to 3 databases...
0
by: Vin | last post by:
Hi, I've got a VB.Net + ASP.Net message board application which has already been customized. There are two solutions in this application. 1. The front end aspx, aspx.vb files, User controls...
4
by: apngss | last post by:
what's the differences between collocated architecture and distributed architecture?? My understanding is that collocated architecture has everything in a single machine? i.e. There is only 1...
2
by: hans | last post by:
Hi! I am new to .NET (coming from Java). We have to implement a desktop application which extracts data from a database, does some analysis, filtering etc. and displays the results. I have...
6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
3
by: RAJESH | last post by:
I am working with c# and asp.net in developing web applications, iam using ..netframework 1.1 ,i want to know what is the need of 3-tier or 4-tier architecture in our application development.what...
1
by: benmorganpowell | last post by:
I have a small windows service which connects to a POP3 server at defined intervals, scans the available messages, extracts the required information and inserts the data into a SQL database. I am...
6
by: carsonbj | last post by:
I have an issue where the below operation works on a little-endian architecture but not on a big-endian architecture. I was under the impression that pointer arithmetic is architecture independant...
13
by: rrs.matrix | last post by:
hi i have to detect the type of CPU. whether it is 32-bit or 64-bit.. how can this be done.. can anyone please help me.. thanks.
0
by: srikar | last post by:
Hi all, I am having a problem, when I am compiling the code in 32 bit option on a 64 bit machine using the macro CPPFLAGS= -m32 I am getting the following warnings from the linker . ...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.