Okay now let's learn about the architecture of dotnet applications at a very high level when you build an application with c-sharp your application consists of building blocks called classes these classes collaborate with each other at runtime and as a result the application provides some functionality now what is a class a class is a container that has some data which is also called attributes and functions which is also called methods functions or methods have behavior they execute code they do things for us datarepresents the state of the application let me use an example think of a car a car has some attributes like its make its model its color these are the attributes of a car a car also has some functions we can start it or we can move it so you can think of a car as a class in a real world application we have tens hundreds or even thousands of classes each class responsible for a piece of functionality an example of that is classes that are responsible for getting the data from the user process the data and display something to the user now as the number of classes in an application grows we need a way to organize these classes that's where we use a namespace so a namespace is a container for related classes for example in dotnet framework we have namespaces each containing tens of related classes we have namespaces for working with data like databases we also have namespaces for working with graphics and images we have namespaces for working with security now in real world application as these namespaces grow we need a different way of partitioning an  application and that's where we use an assembly and assembly is a container for related namespaces physically it's a file on the disk which  can either be an executable or a DLL  which stands for dynamically linked library so when you compile an application the compiler builds one or more assemblies depending on how you partition your code in the next lecture we're gonna write a very simple structure application and you're going to see all these concepts in action.

Post a Comment

If you have any doubt please let me know

Previous Post Next Post