Friday 31 July 2009

Beginning C# Lesson 0 - Defining C#

Source code is a text file with a .cs extension in C# (console,windows,WPF... apps).
Integrated Development Environments’ such as "Visual Studio 2008" and "SharpDevelop" provide a software developer with tools to design, write, implement and analyse their applications, the actual source however, is just a textile.
This lesson is aimed at beginner C# programmers, who either want to learn from the beginning (no prior programming knowledge requires just basic computer knowledge), or are looking to learn a new language.
Let’s start with some general programming theory!

What is a program?

A program is an object (.exe, .OthereExtension) that can perform a series of steps, the steps the program can invoke (execute) are stated inside a programs “source code”.

Source code as mentioned is a text file which is then feed into a “Compiler” or an “Interpreter”.
A Compiler converts the source into an object such as a exe while an interpreter reads the source code in “real time”(or for computer literate psudo-realtime) into a running program for example a “Browser” such as Firefox reads HTML source code and renders the data on screen.

What is C#?

C# is an “Object Orientated Programming Language” (OOP) which means instead of running an instruction procedurally line by line as statements, the compiler uses “objects” to send and receive data. The concept of OOP is to model programs based on the real world, for example there could be an object called “Car” that has some properties such as “Number of wheels”, “Max speed”, “Vendor”, and the Car object may have some steps it can perform “Accelerate”, “Reverse”, “Listen to the journey CD”, the car is an object, and we can send data from this object to other objects but i will explain more about this concept later.


C# uses the .Net environment which means that many of the syntax (keywords used inside a language) that are used only work on a system that has the .Net framework installed (Windows computers), so if you’re looking to program on a Mac or Linux, the programs won’t work as natively as you want, of course there are applications on Mac and Linux that simulate .net so the programs work, but .Net is focused on windows and is founded by Microsoft.



What is C# good for?

C# is good for allot of things, there is a class library called “XNA” that allows developers to make retail games, many of them are powerful and every “Xbox360 Market Place” game that is developed by a small business is made by this, however it is not as powerful and customization than another close language called “C++”, the main difference is that in C# you can make a game quickly, with less hassle, and it is more manageable to extend and maintain than C++. And as C# is still in development and version four is being released soon, it is improving all the time.

C# is good for web applications, ASP.net allows developers to make web forms or other web content, it allows socket programming to send and receive data from ports and other cool stuff.

Overall it is a strong language as many of its features and code style is from C (as C# is from the C programming language family), and can make enterprise applications that are secure, perform fast and easy to maintain, this however is up to you as any programming language requires you to explore its inner workings and learn new stuff frequently.

No comments:

Post a Comment