 |
|
 |
It's interesting that as the road gets easier for developers, it gets harder for users. Users would like the Stone Ages of exe's much better than the Enlightened Age of assemblies. If I was selling a product and put .NET 1.1 Framework required, I bet less than 5% of the Windows users would know if they met this requirement or not. The installer would have to figure it out, but how many users are willing to download a huge installer to try out my program? Not many.
So, the question is, who is going to use your program?
|
|
|
|
 |
|
 |
nalenb wrote:
So, the question is, who is going to use your program?
Exactly! Nowadays it seems that while the hardware gets more and more powerful, applications get more and more complicated (and slower) without - most of the time - obvious reasons.
In the end, it's really up to the developer to choose wisely what toolkits she will use.
---
Best Regards,
Manos S. Pappás
|
|
|
|
 |
|
 |
Yes nalenb, an irony for sure. I think, as we became used to the MFC runtime over time, and eventually it became part of the OS itself, the .NET runtime will also be less of an overhead in future.
Right now I am very excited about the benefit it offers. My average time to convert an idea into a solution is reduced by a great margin. Also I am mainly into enterprise solutions so the .NET runtime installation is not much of a trouble.
Salil Khedkar [^]
|
|
|
|
 |
|
 |
You've cover a complex issue (which Jeff Richter covers VERY well in 591 page book) in a couple of paragraph, again why?
|
|
|
|
 |
|
 |
Ouch. I think there are two targets I think of when I post an article on CP. One is - enlighten the community with something new I might have come up with. And the second is to get my concepts/ideas/code exposed for discussions and learn from the others point of view. I am targeting for the second one here.
Salil Khedkar [^]
|
|
|
|
 |
|
 |
So that you don't have to read a 591 page book to get the gist of it
The whole point of articles in CP is for people to simplify difficult subject matters.
|
|
|
|
 |
|
 |
Cons:
- Any child can decompile your code (do you know the Reflector?)
- Your code is compiled while user is waiting. So, the JIT compiler can't optimize your code. So, your code is slower than a VB6 generated one.
- The runtime does a lot of security checks in your code. So the user needs to wait a little bit more. And the JIT need to do less optimization.
- You have a Garbage Collector running while your application is running, and you never know when it will run. You need to take care (more than in unmanaged programming) of your allocations, so the GC will recall your memory in the first generation when possible. Sometimes your app has 5 Forms opened and Task Manager will report you’re using 30MB RAM. WinWord uses less than this.
- You need to call Dispose() to release resources. you don't have this problem using ASP or VB6. In C++, you would call IUnknown->Release() or use CComPtr anyway.
Strauss
|
|
|
|
 |
|
 |
Rodrigo Strauss wrote:
You have a Garbage Collector running while your application is running,
What this has to with the concept of an Assembly?
Rodrigo Strauss wrote:
Task Manager will report you’re using 30MB RAM
No, you're wrong: it'll report that the working set size is 30MB, and that means that you can be using something in the range of 4K RAM to 30MB RAM.
Just because the GC has reserved 30MB in RAM pages, this does not necessarily mean that Windows gave all that memory to the GC.
Besides that, the .NET framework references a lot of kernel and Windows libraries, which increases its working set, without spending a single byte of RAM.
Rodrigo Strauss wrote:
- You need to call Dispose() to release resources. you don't have this problem using ASP or VB6. In C++, you would call IUnknown->Release() or use CComPtr anyway.
Reference counting or generational GC has nothing to do with the concepts of assemblies as a form of sharing code. Besides that, assemblies can expose CCW, which will behave as any COM component, with AddRef, Release.
Rodrigo Strauss wrote:
So, your code is slower than a VB6 generated one.
Do you have some study to prove this?
Rodrigo Strauss wrote:
- Any child can decompile your code (do you know the Reflector?)
Again, this has nothing to do with the concept of assemblies: .NET assemblies can contain native code (use C++) - System.Windows.Forms classes have plenty of private native methods that can't be decompiled with Reflector.
Yes, even I am blogging now!
|
|
|
|
 |
|
 |
No.
You missed some very important points:
* The .NET virtual machine is less powerful than a real CPU. Example: it does not support 'long double'.
* Assemblies aren't really 'language independent'. They only work for languages that are variants of C#.
* IMHO, the really big problem with GC is the way it interferes with RAII.
Adding version info to DLLs is great (but somewhat obvious).
But they could have done it without tying it to .NET.
IMHO, the cure is worse than the disease. (Unless you were already using VB, in which case even amputation of all limbs would be better than the disease).
|
|
|
|
 |
|
 |
Liked the one about VB...
For rest of the stuff, let me take into account a few opinions and I will include the cons for Assemblies.
Salil Khedkar [^]
|
|
|
|
 |
|
 |
I agree that there are cons to assembly, however the severity with which you are trying to project them is not right, in my opinion. I will update my write up with the valid points soon.
Rodrigo Strauss wrote:
- Any child can decompile your code (do you know the Reflector?)
There are obfuscators which will garble your assembly metadata so that it would not be understandable to a human.
Rodrigo Strauss wrote:
- Your code is compiled while user is waiting. So, the JIT compiler can't optimize your code. So, your code is slower than a VB6 generated one.
- The runtime does a lot of security checks in your code. So the user needs to wait a little bit more. And the JIT need to do less optimization.
I agree, performance of managed code will be somewhat slower as compared to native machine code. But think about the facilities the .NET environment is providing you with. Also it is lot more efficient than what we might think in our minds. Do have a look at performance comparisons published on the net.
For rest of your concerns Daniel Turini has some excellent points.
Salil Khedkar [^]
|
|
|
|
 |
|
 |
Salil Khedkar wrote:
Rodrigo Strauss wrote:
- Any child can decompile your code (do you know the Reflector?)
There are obfuscators which will garble your assembly metadata so that it would not be understandable to a human.
It may make it not understandable to a human, but it is still understandable to copy & paste. The main questions for me when thinking about this issue is "Why do I need to protect the code?". If it's because you don't want the registration feature hacked then it's probably just best to use another language all together, but hackers will still figure out how to crack it, just not as quickly. If the reason is that you don't want people to be able to replicate what you are doing then take a step back, no matter what you are coding, most likely someone else could do it as well, and probably faster and better. Maybe you have passwords and other sensitive data embedded in the source code, if this is the case, you need to take a serious look at your design, because this is not a good idea at all. If it can be hacked from the source code, it can be hacked from the binaries.
-- Rocky Dean Pulley
|
|
|
|
 |
|
 |
Rodrigo Strauss wrote:
- The runtime does a lot of security checks in your code. So the user needs to wait a little bit more. And the JIT need to do less optimization.
Something that concerns me about this too is that developers may get a false sense of security when they hear that the JITTER does security checks on the compile while it runs it.
C/C++ (and other "unmanaged" languages) gets a bad wrap when it comes to security just because buffer overruns are a possible problem that sloppy code and create. However, bad logic (not encrypting data, log in holes, poor data verification, not deleting temporary data) is a big security threat too that often gets overlooked. I think once developers hear about security checking in .NET, they will probably focus even less on security because of a false sense of security--a very bad situation.
|
|
|
|
 |