This blog is meant to provide information, thoughts and links that may be found useful to a computer programmer. There is no set strategy or limits of what topics will be discussed.

Showing posts with label Program Language. Show all posts
Showing posts with label Program Language. Show all posts

May 23, 2008

Review: C# & VB.Net Conversion

I'm not sure about others, but I find quite often I need to convert from one language to the other. Now, I feel I'm fairly well versed in both C# and VB.Net; however, VB.Net is more natural for me because I originally started programming with VB 3.0.

I've taken the time to learn and apply some of my knowledge towards C#; and I'll admit there are some very nifty parts to C# that you won't find in VB.Net. But, the same goes with VB.Net having some features that C# lacks. I'm not writing this to debate which language is better; in my opinion both have their strong and weak points, and depending on the situation you may find one language will handle the requirements better than the other. It all seems to come down to personal taste; I've yet to meet a challenge that one language could perform that the other one could not. Now, I've had challenges where performing something was easier in one language over the other, but the other language could still perform the same feat with a little more ingenuity.

This all leads up to the fact that both languages have strong examples for certain features or code samples; and there are times when it is difficult to convert the language over. The other day I picked up a book from Amazon.com called "C# & VB.Net Conversion". To my surprise this book covers .Net 1.1 and earlier; yet, it still very much applies to converting code that is used in .Net 3.5 and earlier!

This book is well laid out, once you glance over the conventions used and table of contents. You can quickly find information for one language and then immediate see the equivalent feature (or method to accomplish this feature) for the other language.

I'd give this book a rating of 3.5 out of 5, only because I couldn't find a more recent version of the book. There have been some changes in both languages that make less than 10% of this book obsolete; so, this isn't the 'solve all conversion problems' book. But, my research indicates that as of this writing there isn't really a book that will do any more than the one I picked up.

I wanted to pass along this finding to anyone who reads this book and has a need to learn to convert between the two languages; it's well worth the time to read to make this process easier. Especially since you can get used versions of this book that are in great condition from Amazon.com for around $6 or less (including shipping).

Until next time, Happy Coding!

April 4, 2007

What is .NET?

This blog is merely an attempt to help you understand the .NET Framework. It will not cover in detail how to use the framework or what is contained within the framework. It will provide links to locations that will provide this needed detailed information.

 

To understand the history of .Net we need to understand how Windows operates. To utilize the classes within windows (pre-.Net) the programmer would need to access Application Programming Interfaces (APIs). These would allow the programmer to access specific classes that were designed to interact with the Microsoft Windows Operating System.

 

An example would be that the developer would need to access a CD-ROM from the CD-ROM Drive. The developer would first reference an API wrapper in the application and then provide coding that would access the drive. The beauty of this method, back then, was the developer didn't have to know how to create code that would directly interact with the mechanical and electronics of the drive. All the developer needed to know was how to initiate the API for accessing the drive, what the API would return as a result (success/fail of accessing, information about the drive, information contained on the CD, etc), and then the developer needed to know how to handle these results.

 

Now all of this sounds simple when you look at the overview of what needs to happen; unfortunately, in practice it was not as simple as it is today. The largest problem the developer would face was learning all the arguments needed; the exact location of the desired classes to instantiate, and many other problems. Microsoft had attempted to increase the ease of the development methods by introducing COM, GDI, and many other things. This was Microsoft's beginning to implement OOP concepts (For more information on OOP, see our earlier blog, "What is Object-Oriented Programming (OOP) and why do you need it?").

 

To lessen the burden on the developer, increase the ease of software developing, and to increase the power of the applications developed, .NET Framework was created. .NET Framework had initially started as 1.0.

 

.NET Framework is essentially a large collection of classes that are, or can be used, in conjunction with the Microsoft Windows Operating System. Some of the classes contained in the framework are: Microsoft.VisualBasic.FileIO, Microsoft.WindowsMobile.DirectX.Direct3D, System.Collections, System.Collections.Generics, System.Data, System.Data.SQL, System.Data.Design, System.Security. The complete list is exhaustive; and the previously mentioned framework classes are a small sample of what you could find. You will want to visit the .NET Framework Class Library Reference website to see a complete listing.

 

.NET Framework is a collection of components. It models the method(s) in which an application can operate with the Operating System. The core of the framework is the Common Language Runtime (CLR) model. This model's principal concept is that it uses 'managed' methods to interact with code and data. Managed Coded and Data provide a safer method of application programming. Some other components within the .NET Framework are: Base Class Library (BCL), Metadata/Intermediate Language (MIL), Common Type System. These are just some of the models and is merely an introduction to the .NET Framework. You can visit the .NET Framework Developer Center to find further information on how the framework is placed together, why it is there and especially how to leverage its current technologies.

 

By visiting the .NET Framework Developer Center you will be able to access a huge amount of information; in particular whenever you run across a section that shall cover the "best practices" for a subject, you should immediately bookmark it. These "best practices" sections will help to eliminate bugs, increase productivity, increase reliability, and most importantly increase the security of your application!

 

A thought that should constantly be kept in the back of your mind is that the .NET Framework is very robust; because of the robustness it is always being improved upon and new versions are being developed. .NET 2.0 is currently the framework in active use (at the time of this writing); however, .NET 3.0 has been officially released and will shortly become the main stream framework with the production of applications that will utilize the power and security of the newer technologies found in Windows Vista Operating System.

 

The one thing this blog is attempting to do is to help you understand that the .NET Framework is integral to programming regardless of using any of the .NET programming languages ( i.e. Visual Basic.NET, Visual C#.NET, etc). You don't need to have a thorough knowledge of the subject, but you will eventually need some basic understanding of the concepts and how to use it.

March 9, 2007

Introduction to this blog

This blog will focus on discussing all different topics of the programming world.

I primarily program in the VB.Net language; however, I also dabble in a few other languages as well.

My primary focus will to enlighten the beginning programmers with concepts that are broken down to help in learning the vast world of programming. I shall also provide some other points of interest; such as, coding samples, discussions on opinion topics and whatever else I feel about rambling on for that particular blog.

I hope you will find this information useful, and always remember that these are my views and I am only human. I never expect anyone to agree with, or understand, my views; I only ask that the reader accept this as my view on the topic. I will understand, and expect, some readers to disagree with my views.

I welcome any comments on my blogs. However, I do reserve the right to edit, delete and/or use any postings on my blog in any way I choose. In other words, if you leave a comment that I feel is inappropriate or needs to be toned down, or just simply shortened, I will do so!

If you are looking to read a blog that will help you to learn how to program in the Visual Basic language, please read my Visual Basic Helper blog (http://visualbasichelper.blogspot.com).

If you are looking to read a blog that will help you to learn how to program in the C# (pronounced C-Sharp) language, please read my C# Helper blog (http://csharphelper.blogspot.com).

Enjoy my future ramblings!

Thank you,
James