I have a system written in classic asp and a lot of Javascript. Due to
its performance and security issue, we decided to re-write this big
module. I heard that C/C++ has a better support in performance and
security (relatively) but here comes my questions:
If, by "javascript", you mean "client-side code", then switching to a
non-script language in client-side code will mean forcing your users to
install extra software on their machines and disable security features
designed to prevent the execution of such code built into their browsers in
order to use your application. This is worrisome because:
1. unless you are in a LAN/WAN environment, you cannot force the users to do
so, so you will be limiting your application's audience - this may not be
worrisome to you
2. deploying software to large numbers of machines is a PITA - just ask any
IT department technician. Inevitably, there will be machines out there on
which your software just will not run due to
compatibility,/security/whatever issues
1. Can ASP talk to C/C++? Because from my experience I use C/C++
mainly for application console.
ASP is server-side technology. All it does is generate html to be sent to
the client. Once it is at the client, the browser is the limiting factor. So
if your performance bottleneck is in the client-side portion, ASP is
irrelevant to this problem. Have you identified where the bottleneck is? Is
your server-side code taking too long to generate the html to be sent to
your client? If so, using a component to run compiled code MIGHT help. There
are many reasons for bad performance that have nothing to do with the
language being used in the server-side code:
a. Insufficient network bandwidth
b. Insufficient server hardware
c. If a database is involved:
-insufficient database server hardware
-poorly designed database
-poorly written sql
-requesting too much data from the database
To paraphrase something the respected author Bill Vaughn has been known to
say: C++ waits just as fast as vbscript.
Before you take the step to rewrite code, you MUST identify the bottlenecks.
As for ASP "talking to" C.C++, Anthony already provided the answer: COM, the
use of which, by the way, carries its own performance impact. It is not
trivial to marshal data between processes, which is what has to happen when
using COM.
2. If I want to exclude most of the Javascript and use other
programming language instead, can ASP.NET do it?
Again, it depends on what you mean by "Javascript". Are you talking about
using javascript in server-side code? Or are you using the word the way many
people incorrectly use it. as a synonym for "client-side code"? Just like
ASP, ASP.Net is server-side technology. All it does is generate html to be
sent to the client. It has nothing to do with the code running on the client
browser, except insofar as generating the client-side code to be run there.
The code that runs in a browser is limited by the browser. If the browser is
configured to allow third-party software to run, then it will
Is there any
compatibility issue between Classic ASP/ASP.NET/Javascript?
Again, Anthony handled this, except for mentioning that ASP and ASP.Net will
not share session and application variables, so you will need to implement a
way to allow them to share information, usually via a database.