Advertisment

Understanding WinForms

author-image
PCQ Bureau
New Update

Lets talk about designing GUI-based Win32 applications. Before .Net, both the grammar and the functionality were part of the development tool, like VB or VC++. By grammar, we mean the syntactical construction of an idea, like looping and variable definition in the context of a given language. On the other hand, functionality refers to way things would be done. A classic example of this would be showing a Window to a user. While doing so in VB 6 would simply require the developer to add a form to their project and run it, a VC++ developer would have to derive classes from CWinApp, CFrameWnd, etc to do the same task, not to mention the scores of lines of code that would need to be written. Thus, if either of the two developers were expected to shift to the other platforms for their development needs, not only would they have a learning curve for the grammar, but also from the point of few of functionality, ie, how to do a given task in the new development environment.

Advertisment

With .Net, this intimacy between functionality and grammar has been broken. While any of the .Net-compliant languages offer their respective grammar, the way to do a particular task would remain the same irrespective of the language used. This is because the functionality is no longer part of the language, but has become a part of the .Net runtime environment. So, if you were to show a form using either VB.Net or VC# (or any .Net-compliant language), you would always be using the ShowDialog method of the Form class object in question. Thus, if developers are familiar with the classes that offer required functionality, they are more than half way up, in their transition to learn another .Net language. The only learning curve they would have before them would that be of the grammar of the language, which will always be there.

So, because you can utilize your existing insight of the FCL across languages, you are more productive than you ever were in the days of VS6.

Kumar Gaurav Khanna

Advertisment