WPF Architecture

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys in this lecture we will understand about WPF architecture now to be very frank to you this is a very boring topic and if you are a developer or you say you are developing the bluebe of applications from my experience I can tell you I have been developing and WPF application since last 7 years and I didn't encounter any case where I needed to understand WP of architecture by developing a code but since you are working in the group EF so you need to know or you need to understand the architecture of the technology in which you are working so therefore this lecture is just for the understanding that how WPF is structured internally and this is a theoretical lecture so rather pay attention and try to remember all these points what I have told you in this lecture and if you go to interviews many interviews might ask you that what do you understand about the architecture of WPF so you might be in a good position to explain to them that you understand the architecture of WPF so let's move forward so WPF is basically divided into three components and this is the diagram or say picture which I found in Google so you can easily find this diagram in Google and this explains the architecture of WPF so it has three components - Lea and - Lea and the operating system core elements so as you can see in the - layer there is window base dll there is presentation framework Gailen there is presentation code DLL so these three dll's or these three libraries constitute the main part of WPF so if you are working in WPF application you will see these all three dll's in your application references so let me show you this quickly so let's go to the references this is a WPF application what I have made it usually doesn't have anything so here here the 3d lens presentation core presentation framework and windows base so these three dll's constitute the main part of WPF application also what our dll's they those are libraries or say assemblies or you can say there are collection of classes so these presentation core presentation framework and Windows base have all the classes that are required to work in WPF say suppose I am using a grid so this grid class is present somewhere in presentation framework okay so let's move back to our slides so here other description of this presentation framework so this section has Windows panel styles controls layouts content and so on and it implements the end-user presentation features including data binding tank dependencies animations and many more so let's see in our application so let's go back to our application and let's open this presentation framework in the object browser so here is the presentation framework gala and let me expand this right so this is a assembly which I have expanded and now I can see the classes which are contained in this assembly you can see the all the controls are contained in this assembly same button calendar canvas or say data grid image group box etcetera so all these presentation things or say styles controls layouts etcetera are contained in the presentation framework DLL next comes the presentation code DLL now this is a API expose by WPA are providing for 2d 3d geometry and so on and it also contains visual elements so let's check into our DLL so let me collapse presentation framework and expand presentation COO you can see I have all the media elements in presentation frame core data say brush or color so all the visual elements are present all the elements those are responsible for the visual representation are present in presentation core say ellipses are phones phone family so all these things are responsible for the visual representation of the elements in WPF so this is contained in presentation core dll okay let's move back and next comes the windows-based DLL so it holds some more basic elements that are capable to be reused outside the WPF environment like dispatcher objects and this dependency objects now dispatcher object is a very important concept in WPF which is responsible for the multi-threading part in WPF so this is contained in Windows based DLL and all the dependency objects those are responsible in taking part in data binding and dependency properties are also contains in a contained in Windows based DLL so let's go back and expand window piece okay and you can see system not Windows Store threading namespace is present in Windows based ALL and it also contains in dispatcher class right and this dispatcher class is responsible for threading in WPF so this threading part is maintained by Windows base and if you can if you expand this system dot Windows so you can get the dependency object in Windows B stll okay and you can see the dependency property is also present in here so this system dot Windows based DLL is the responsible for dependency properties and dispatcher objects so let me collapse it and close it so I guess this presentation framework presentation core and windows-based dll's are clear to you these three dll's constitute the managed part of WPF application let's move back and then comes the unmanaged part or the middle part of WPF architecture so it has a milk or DLL which is not visible to us in our application but you can understand that it acts as a interface between managed and the unmanned part or say suppose the milk or DLL is acting as a bridge between user and the presentation framework presentation core and windows tll okay and then the second part is windows codecs tll now you can see in the description it is mentioned that in WPF applications processes like image processing image displaying and scaling are done with the help of windows codecs dll's now to understand this dll you need to understand what are codecs so codecs are the small programs those are responsible for anything that is displayed on the screen so let me show you a very simple example a very simple deal day-to-day basis example what you do in your day-to-day basis now you might have watched many movies and or TV series in your laptops right so here is one of my favorite series it's called arrow and you can see all the episode of this series in in the MKV format okay so the file format of the video file is a MKV format and it it is by default a VLC media player file that means when I will run this episode my episode will be opened in VLC media player right and since VLC media player supports the MKV codecs I can run this file say suppose I try to open it in Windows Media Player right so let us try to on this in Windows Media Player so let's go there and let me check window Media Player and try to open it in Windows Media Player and you can see this MKV format is not supported by Windows Media Player that's because window media player player does not have the necessary codecs installed in it okay so let me and you can see the error in here the player might not support the file type or it might not support the codec so codec is what what is responsible for displaying something onto the screen let's move back to our slide so this windows codecs DLL contains all the necessary codecs those are responsible for displaying the 3d the animation each and everything on to our screen let's move forward and here comes the operating system part or say the you can see the last part say operating system core element layer okay so this is the operating system core element clear so these all things are present in the system within which you are working so say suppose you are working in a system with nvidia graphic card or you are working with a system that is owned by HP or Dell so it will have some drivers from HP or some drivers from Dell so all these things will be covered in this layer ok so it is basically the end user system configuration so it has a DirectX API so DirectX API I have told in my first lecture also its responsible for the 3d animation parts in a video game or say suppose in a computer so that is contained in this layer then user 32 and GDI although all the these two parts are present in window forms also so these and two things are responsible for the windows look and feel of our controls Save button text box all these are windows look and feel and these are present just because of user 32 and GDI okay and then we have CLR environment so if you are working with a WPF application you need to install the.net framework runtime 4.0 or 5.0 whatever it be but you need to install the.net framework in it okay in the moment you install the.net framework in it you will have a CLR in it so you need to have CLR in the system so you can work with the.net classes okay and then we have device drivers so whichever system you are working in it be del bead HP you do each and every system will have each n individual drivers for them so this part is basically operating system core element or the third part of wp of architecture so the if a user is working in a very highly configured system it might have a very highly configured user operating system core element say suppose if you have a low-end computer so it might have a low-end operating system core element okay this part depends on the system in which you are working so I hope this lecture has cleared the wp of architecture for you now you I guess you might be in good position if someone asks you what is the architecture of WPF remember the three key points on WPF - layer WP of n minus layer and the operating system core element part which has all the things that are associated with your n system okay so I hope you enjoyed this video if you have any doubt please leave a comment below I will try to answer it and please do subscribe to my channel thank you so very much
Info
Channel: DotNetSkoool
Views: 46,199
Rating: undefined out of 5
Keywords: C# Training, DotNetSkoool, WPF Training, WPF, WPF Architecture
Id: H7qI1LPvEIs
Channel Id: undefined
Length: 12min 54sec (774 seconds)
Published: Fri May 06 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.