The No-Linker concept in .NET
Yesterday night while returning to my home, dropped in to my friends startup company. It so happened that I had to talk about “Gettting started with C#”.
I thought it would be great to write the HelloWorld program and start disecting it. It so happened that, we went on to discuss on topics like:
- Whats the difference b/w compiler and interpreter?
- What happens from the time of double click of an windows application till some output is got? We had gone as far as to see what is an OS loader, how processor executes instructions, where are instructions stored and all those stuff which should have been discussed at the college days.
- Defination of Object.
- Seing the anology of an object and me.
- Seing the anology of a class and human class.
- Class methods and Instance methods.
- Whats the difference b/w an *.exe and *.dll file
- About PE file format.
The most important point of the talk was when I understood that .NET does not have the concept of a Linker .
There is no linker because there is no such thing like statements in C/C++.
I could not resist to go deep further into the Metadata Tables and related basic stuff. Realized as to why Jeff Richter has given priority to Metadata and Assemblies in his excellent book “Advanced .NET programming”.
I am out to see whats the scenario in Java Technology case. (Recently lots of comparison is happening b/w Java Technologies and .NET) The best link of all is http://www.dwheeler.com/java-imp.html
C# Types
While having discussion with my friend yesterday, I realized that “There’s plenty of room in C# Types”.
Some of the questions i faced were:
Why did they go for Value Types?
What is actually a Stack and Heap?
Many more fundamental doubts arised. I am now in quest for answering those fundamental questions.
The First, among the plethora of doubts would be to clear “How much memory is allocated in Stack and in Heap for a simple program like the one below?”
//simple.cs
namespace ManiSoft.Practice
{
internal class Simple
{
public static void Main()
{
int x;
x = 7;
}
}
}
Also wondering at
Is x a Value Type? (B'cause it is within a Reference Type)
Ok. Out to read some basic stuff from Jeff Richter.
ASP.NET Application Hosting
Yesterday, I was successful in hosting my sample ASP.NET web application over the free ASP.NET web hosting facility available at http://europe.webmatrixhosting.net/
The best part was the usage of the System.Web.Mail namespace’s MailMessage Type.
Pretty cool stuff I thought.
Just set the properties of the email message to be sent; choose the smtp server and lo, message is sent.
since my company’s smtp server was temporarily not receiving mails, learnt about Relay server and other SMTP related stuff. (Thanks to my SysAdmin, Mr. Sudeesh)
Currently using hotmail’s smtp server.
The smtp server was OK today and hence i can now use the Web.config to store the smtp server address.
All it took to put up two pages of functional ASP.NET site was 2 hours.
My sample application stands at http://ideamani.europe.webmatrixhosting.net/
GTG Treking….
Back on Monday!
CLI and .NET
After a long delay, today got the chance to present the Common Language Infrastructure (CLI) presentation to my colleagues.
A very short, 20 minutes presentation. The shortest presentation of mine till now.
The Microsoft Powerpoint Slides can be downloaded from here(zip-290KB)
Related sites of interest would be:
ECMA – www.ecma-international.org
ISO – www.iso.ch
ROTOR – www.sscli.net
MONO – www.go-mono.com
DotGNU – www.gnu.org/projects/dotgnu/
.NET – www.microsoft.com/net
2003 has been the most eventfull year for me (Stepped into .NET). Hoping to get more surprises and changes in the coming year.
Using CVS for SourceControl
“An alternative to VSS” was the requirement. Decided to plunge into CVS. SA had the CVS server installed on a Linux machine. My task was to find and explore the various CVS clients for Windows.
First, tried WinCVS. Then went on to look for CVS plugins for VS.NET. Found Jalindi Igloo. Igloo was a major failure inspite of a detailed article on the CodeProject.
Then looked into the TortoiseCVS. Inspiring integration with the windows shell. The ease of use was spell bounding. The help accompanying installation gave a detailed look into the two different methodologies for SourceControl namely, Lock-Modify-Unlock and Copy-Modify-Merge. TortoiseCVS uses C-M-M model.
A VS.NET plugin for TortoiseCVS was under development. I tried it but failed to Check out a module.
Then looked into the SubVersion alternative for CVS. Even this follows C-M-M model. But, the VS.NET plugin developed for SubVersion, ankhsvn looks good by seing the Screen Shots. Got to install svn soon and try it. The free book on subversion is excellent.
Then went on to read the Microsoft’s “Team Development Guide” from Patterns&Practices. This guide is indispensible for VSS and VS.NET users.
Another Microsoft Article from MSDN was very good. This is related to SourceControl and build control for Web Projects.
For now, using WinCVS and TortoiseCVS together.
Waiting for something to happen………
Attended MSDN Yatra! Bangalore
Yesterday, attended the MSDN Yatra’s ‘ASP.NET Application Security’ session by MVP Srinivas Sampath.
Was a very well balanced session.
Started with the Theory of Planning an ASP.NET application for good security.
The different stages at which the security can be provided was explained with a neat diagram.
Usage of SSL was the highlight of the presentation.
Also usage of Stored Procedures instead of writing SQL in code was emphasized upon.
There were around 4 good demos.
One was how to configure IIS to enable SSL security.
The best was the Login Demo. It demonstrated a good template for authentication. Usage of Salt(Random Number), FormsAuthentication methods to store passwords safely in database.
It was followed by Authorization demo; identifying of User Roles etc.
I am going to implement these in my Application.
That’s it for now.