A little while ago, I did a small post about the advent of the new ASP.NET controls available in the Measurement Studio package.
A very good question was raised...When should you use ASP.NET? Let's look at the answer to that question...
The purpose of ASP.NET is to create a user interface for a web browser. Sounds simple, eh? I wish. To try to keep it simple, I'm going to assume that you do want remote access to your system and/or data, and that you're trying to decide between LabVIEW's remote front panels and going with ASP.NET.
When you get involved in creating a "web interface", there are a lot of questions you have to ask yourself. Let me throw a few of them down here...
- Time and money to get it working.
- Is it accessible to the Internet (outside the company firewall)?
- How many clients are going to attach?
- How "live" does the data have to be (continual updates? refresh? click to update?)
- Can you force the clients to install a runtime engine?
- What clients to support (IE? Firefox? Opera? Cell Phones? PDAs?)
Let's look at those in turn.
Time and money to get it working
I'm starting with this, because, until you can answer this, you don't want to get carried away with delusions of grandeur. Remember that you have a job to do and unless you're a full time web developer, this probably isn't it.
The main advantage of the LabVIEW remote front panels is that it's fast to develop content rich applications - all in LabVIEW. You don't need to learn another language, worry about deployment, installing and configuring web servers, etc. It has its limitations, but there are trade-offs to everything. Remember, engineering is the science of balancing mutually exclusive objectives.
Is it accessible to the Internet?
This is mainly a question of security - how secure is the web server? how many clients can you handle? Do you need them to log in (authentication)? Do you need to restrict what people can do based on who they are (authorization)?
[As a quick side note, and another LV and .NET plug, if you do need authorization, I recommend checking out the Authorization Manager (AzMan) from Microsoft. Free role-based security manager with plugins for LDAP and ActiveDirectory...very nice. I'm going to write up some examples and posts about it when I can get the time]
Generally, if you're going to make something available out on the WWW, you should stick with an enterprise-class web server, such as Microsoft's IIS or Apache. Since we're talking about ASP.NET here, then you should look at using IIS.
How many clients are going to attach?
Simple question...who are your clients? Are you talking about a handful of people you work with? A few hundred in your division? Your entire company? All of your customers?
It's also a question of how many you expect to attach at once. Even if there are hundreds that need access, if it's likely that only a few will ever be connected at the same time, you're looking a just a few clients.
Generally, if you're talking about a few clients connected at the same time, the remote front panel is a great solution. If you're talking about dozens or hundreds of people at the same time, you're looking at ASP.NET. Truth be told, if you're looking at that many, you're also looking at professional hosting (internal or external) because you'll need load balancers and web farms.
As a quick side-note, for this and the last issue - realize that as you increase the accessibility of the application, you increase the involvement of your IT department. Security issues at this level become very serious - this isn't a weekend kinda project.
How "live" does the data have to be?
This is a key one. There's a big difference between retrieving some data from an XML file or SQL database and showing live vibration data from a spinning rotor. What exactly does your client need to see?
Generally, the rule of thumb here is that the more responsive you need the user interface, the more you want to stick with remote front panels. The more the data is one-shot, the better the Measurement Studio ASP.NET controls can be.
Can you force the clients to install a runtime engine?
This often comes up as a show-stopper to the remote front panels, as it requires the LV RTE to be installed on the client machine. But I'll point out that this is a requirement for a lot of items - Flash, Adobe PDF, Java Applets, etc. I'm not saying this issue is "all in your head", but really think about whether this is a problem or not (especially considering the cost of developing the web interface) before calling this a showstopper.
What clients to support?
Where the RTE does can become a showstopper is on the client browsers. If your clients are running on a support LV platform (i.e, Desktop Windows, Mac, Linux), then you can install the RTE. But if you need to be able to see the display from your Windows CE PDA or from the latest cell phone, then realize you'll need pure (and fairly simple) HTML only - thus requiring ASP.NET.
So, when do you need ASP.NET? As you might have guessed: when it's the right choice for the job. If you ever want to discuss your application and brainstorm how to make it "web-able", please feel free to drop me a line. I'd love to help out.