Main advantage of .NET

  • Thread starter Thread starter Rudolf Ball
  • Start date Start date
R

Rudolf Ball

Dear NG,

I hope I am not off-topic. My question is, what is the main advantage of
..NET? If I want to sell my boss .NET for a Web/Desktop/Mobile solution,
where is the main advantage? What is "new", "better" or "innovative" in
..NET? What is now, with .NET, possible? What business challenges can be
solved with .NET better than ever before?

Thank you very much for your answer.

Rudi
 
Thanks to metadata reflection, it is now (finally) possible to decide
whether an algorithm will terminate in a finite time or not.

Just kidding.

In a nutshell: It lets you do the same kinds of tasks with less code (than
e.g. C/C++).

Niki
 
Also, a lot of code can be reused between web/mobile and desktop apps
without a big rewrite.

John


I think I'm correct in saying this cos it has worked for me.
 
I dont want to name a special technology to compare with (like .NET vs.
J2EE), my question is more general, what is the "big thing" in .NET?

Or better: what is the main advantage doing web/desktop/mobile programming
with .NET?

Rudi
 
Rudolf Ball said:
I dont want to name a special technology to compare with (like .NET vs.
J2EE), my question is more general, what is the "big thing" in .NET?

Or better: what is the main advantage doing web/desktop/mobile programming
with .NET?

Why does there have to be only one big advantage, or only one "big thing"?

I mean, tell me what the "big thing" is about Java (maybe "write once run
anywhere"?) Then tell me what percentage of Java applications take advantage
of that "big thing".

One of the "big things" about .Net (at least as far as the marketers were
concerned) was support for XML and for SOAP Web Services in particular -
..Net makes it quite easy to write a web service. But what percentage of all
..Net code is in web services? It's probably 20% or less.

"big thing" is defined by marketers and journalists, not by reality.
 
OK, but why should I use .NET for Web (and not eg. JSP), .NET for the
Desktop (and not eg. C++) and .NET for the mobile device (and not eg.
embeddedVB) ? You wrote
Why does there have to be only one big advantage, or only one "big thing"?

My question is: where are the advantages, the "big things" :)

Thanks

Rudi
 
Rudolf Ball said:
OK, but why should I use .NET for Web (and not eg. JSP), .NET for the
Desktop (and not eg. C++) and .NET for the mobile device (and not eg.
embeddedVB) ? You wrote

- JSP vs ASP.NET: I'm not an expert here, but as far as I know the
technologies, ASP.NET is on a higher level of abstraction, i.e. it takes
more time to learn it (if you come from plain PHP CGI scripts or something
alike) but if you know what you're doing you produce more stable products in
a shorter time. However, this is only personal observation.

- .NET vs MFC/ATL: MFC used to do everything "half". It gives you a TreeView
class, but the interesting things (like tree items) are still from the
underlying API, so you essentially have to learn two APIs. Also it's almost
impossible to use MFC "by hand" - all those macros were made for wizards,
not for mere mortals like us. .NET provides language features (like
interfaces, properties and events) that make things like these no-brainers.
(Not even mentioning MFC's support for databases or COM...)

- .NET on the embedded device: Can you compile a embeddedVB program and run
it on every platform that supports .net mobile? (Actually, I really don't
know embeddedVB, but I guess that's a big advantage of just-in-time
compilation)
thing"?

My question is: where are the advantages, the "big things" :)

Every single language/framework feature may be the "big thing" if it's the
thing you need right now.
garbage collection, reflection, just-in-time-compilation, security,
performance, compiler services, dynamic code generation, database access,
XML, GDI+, good integration of WMI, P/Invoke, COM, remoting services,
serialization...
To name just a few.

Niki
 
Ok, maybe I'd start a list with

- Memory management - Garbage collection
- JIT compiling
- .NET Framework provides lots of functionality out of the box
- Ability to use large variety of languages against common framework
- Very powerful IDE

But I still say your question included "better", "better than ever before"
and is therefore implying a comparison to whatever "before" was. Surely the
choice for your boss is going forward with .NET, going forward with what
you're currently using, or going forward with some alternative(s). If you
told me he was considering rewriting the enterprise application in QBasic
then .NET would hold one set of very dramatic advantages. On the other
hand, if he's considering continuing with a well-established java
environment (at your place) I think you'd be hard pressed to offer
convincing arguments for switching horses.
 
Rudolf Ball said:
Dear NG,

I hope I am not off-topic. My question is, what is the main advantage of
.NET? If I want to sell my boss .NET for a Web/Desktop/Mobile solution,
where is the main advantage? What is "new", "better" or "innovative" in
.NET? What is now, with .NET, possible? What business challenges can be
solved with .NET better than ever before?

IMHO, and I've not done a lot in .net yet - the large and consistent
class library is a hugely productive plus. I'm coding things waaaay
quicker in .net, and I didn't suddenly get any smarter. ;-)
 
Rudolf said:
I dont want to name a special technology to compare with (like .NET vs.
J2EE), my question is more general, what is the "big thing" in .NET?

Or better: what is the main advantage doing web/desktop/mobile programming
with .NET?

Rudi
In my opinion, it allows Object Oriented Programming, as well as Aspect
Oriented Programming (when you inherit from ContextObject - instead of
Object) - really nothing new compared to Java (except for a few sintactic
sugar things link delegates, using, etc).
What you get is a greater opportunity for reuse and clarity.
 
Rudolf said:
I hope I am not off-topic. My question is, what is the main advantage
of .NET? If I want to sell my boss .NET for a Web/Desktop/Mobile
solution, where is the main advantage? What is "new", "better" or
"innovative" in .NET? What is now, with .NET, possible? What business
challenges can be solved with .NET better than ever before?

Security.

1 Access to all memory is bounds checked, so there are no buffer overruns
2 String formating checks the parameters, so there's sprintf-like exploits
[1]
3 .NET sits over NT security, so you get everything that is already
available through NT security
4 Code Access Security checks the source (ie where it was downloaded from)
of the code that's about to run and gives the code appropriate permissions.
The permissions are used to determine if the code can call other code, and
if so, what it can do.

[1] but note that SQL injection is still possible, so if you create a SQL
string from data provided by a user, you'll still have to check *all* of the
parameters to make sure they don't add extra SQL.

#4 is incredibly useful and has no equivalent at all in Win32. In Win32 if
you use a ActiveX control, the control runs under *your* access token and
can do everything that *you* can do. Under .NET a component will be given
permissions according to 'evidence', and by default this is the location
where the component was downloaded from (but you can configure this), so if
the component comes from the internet it will *not* have access to your hard
disk. It gets better: when code requests that the framework checks
permissions (which the framework library classes will do) a stack walk is
performed and *every* assembly (ie DLL) in the stack is checked to see if it
has the required permission. There's no way you can do that in Win32.

Richard
 
Richard Grimes said:
Rudolf said:
I hope I am not off-topic. My question is, what is the main advantage
of .NET? If I want to sell my boss .NET for a Web/Desktop/Mobile
solution, where is the main advantage? What is "new", "better" or
"innovative" in .NET? What is now, with .NET, possible? What business
challenges can be solved with .NET better than ever before?

Security.

1 Access to all memory is bounds checked, so there are no buffer overruns
2 String formating checks the parameters, so there's sprintf-like exploits
[1]
3 .NET sits over NT security, so you get everything that is already
available through NT security
4 Code Access Security checks the source (ie where it was downloaded from)
of the code that's about to run and gives the code appropriate
permissions. The permissions are used to determine if the code can call
other code, and if so, what it can do.

[1] but note that SQL injection is still possible, so if you create a SQL
string from data provided by a user, you'll still have to check *all* of
the parameters to make sure they don't add extra SQL.

#4 is incredibly useful and has no equivalent at all in Win32. In Win32 if
you use a ActiveX control, the control runs under *your* access token and
can do everything that *you* can do. Under .NET a component will be given
permissions according to 'evidence', and by default this is the location
where the component was downloaded from (but you can configure this), so
if the component comes from the internet it will *not* have access to your
hard disk. It gets better: when code requests that the framework checks
permissions (which the framework library classes will do) a stack walk is
performed and *every* assembly (ie DLL) in the stack is checked to see if
it has the required permission. There's no way you can do that in Win32.

Richard
Think productivity!. .NET is object oriented. Everything you do is through
the use of classes and their instances. Reuse of code is one advantage of
OOP; another is cleaner match to the application domain should get you more
reliable and readable code.
 
Back
Top