Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / January 2005

Tip: Looking for answers? Try searching our database.

A question of architecture

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nicolas Noakes - 27 Jan 2005 08:18 GMT
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
Nick Malik [Microsoft] - 27 Jan 2005 10:17 GMT
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/issues/02/10/NETSerialComm/
http://www.ondotnet.com/pub/a/dotnet/excerpt/com_dotnet_ch10/index.html?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.

Signature

--- 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.
--

> Hello,
>
[quoted text clipped - 43 lines]
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Nicolas Noakes - 27 Jan 2005 13:53 GMT
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
Nick Malik [Microsoft] - 28 Jan 2005 06:57 GMT
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.

Signature

--- 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.
--

> Hello Nick,
>
[quoted text clipped - 9 lines]
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.