Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Concepts of Asp.Net

6,861 views

Published on

Published in: Technology
  • Be the first to comment

Concepts of Asp.Net

  1. 1. The Global Open University Nagaland ASP.NET Special Tips & Tricks
  2. 2. Agenda  Part I - Fundamentals Programming Models Design Goals and Architecture CLR Services– Visual Studio 2005
  3. 3. Unify Programming Models Windows APIWindows API .NET Framework.NET Framework Consistent API availability regardless ofConsistent API availability regardless of language and programming modellanguage and programming model ASPASP Stateless,Stateless, Code embeddedCode embedded in HTML pagesin HTML pages MFC/ATLMFC/ATL Subclassing,Subclassing, Power,Power, ExpressivenessExpressiveness VB FormsVB Forms RAD,RAD, Composition,Composition, DelegationDelegation
  4. 4. Make It Simple To Use  Organization Code organized in hierarchical namespaces and classes  Unified type system Everything is an object, no variants, one string type, all character data is Unicode  Component Oriented Properties, methods, events, and attributes are first class constructs Design-time functionality
  5. 5. How Much Simpler? HWND hwndMain = CreateWindowEx(HWND hwndMain = CreateWindowEx( 0, "MainWClass", "Main Window",0, "MainWClass", "Main Window", WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL,WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL, hInstance, NULL);(HWND)NULL, (HMENU)NULL, hInstance, NULL); ShowWindow(hwndMain, SW_SHOWDEFAULT);ShowWindow(hwndMain, SW_SHOWDEFAULT); UpdateWindow(hwndMain);UpdateWindow(hwndMain); Form form = new Form();Form form = new Form(); form.Text = "Main Window";form.Text = "Main Window"; form.Show();form.Show(); Windows APIWindows API .NET Framework.NET Framework
  6. 6. Hello World Demo  What you need
  7. 7. Agenda  Part I - Fundamentals Programming ModelsProgramming Models Design Goals and Architecture CLR ServicesCLR Services
  8. 8. Common Language Runtime Design Goals  Dramatically simplifies development and deployment  Unifies programming models  Provides robust and secure execution environment  Supports multiple programming languages
  9. 9. Architectural Overview ComCom FrameworkFramework Class loader and layoutClass loader and layout GC, stack walk, code managerGC, stack walk, code manager ILtoILto nativecodenativecode compilerscompilers SecuritySecurity ExecutionExecution SupportSupport Base ClassesBase Classes
  10. 10. AssemblyAssembly Compilation And Execution SourceSource CodeCode LanguageLanguage CompilerCompiler CompilationCompilation At installation or theAt installation or the first time eachfirst time each method is calledmethod is calledExecutionExecution JITJIT CompilerCompiler NativeNative CodeCode Code (IL)Code (IL) MetadataMetadata
  11. 11. Languages  The CLR is Language Neutral  All languages are first class players  You can leverage your existing skills  Common Language Specification  Set of features guaranteed to be in all languages  We are providing  VB, C++, C#, J#, JScript  Third-parties are building  APL, COBOL, Pascal, Eiffel, Haskell, ML, Oberon, Perl, Python, Scheme, Smalltalk…
  12. 12. Hello World Demo  What you needWhat you need  MSIL
  13. 13. Agenda  Part I - Fundamentals Programming ModelsProgramming Models Design Goals and ArchitectureDesign Goals and Architecture CLR Services
  14. 14. Component-Based Programming  3 core technologies make building and using components easy Type safety Automatic memory management Metadata  This greatly simplifies application development
  15. 15. Type Safety  Type safety ensures that objects are used the way they were intended to be used Prevents an object’s state from being corrupted  The CLR enforces type safety Attempting to coerce an object to an incompatible type causes the CLR to throw an exception  Type safety means code confidence Common programmer errors will be found immediately Rectangle(hwnd, 0, 0, 10, 10); //hwnd should be an hdc MessageBox(hwnd, “”, “”, IDOK); //IDOK should be MB_OK
  16. 16. Automatic Memory Management  The CLR tracks the code’s use of objects and ensures  Objects are not freed while still in use (no memory corruption)  Objects are freed when no longer in use (no memory leaks)  Code is easier to write because there is no question as to which component is responsible to free an object  When passed a buffer, who frees it: caller or callee?  Each process has 1 heap used by all components  Objects can’t be allocated from different heaps  You don’t have to know which heap memory was allocated in or which API to call to free the memory ○ In fact, there is no API to free memory, the GC does it
  17. 17. Metadata  Set of data tables embedded in an EXE/DLL  The tables describe what is defined in the file (Type, fields, methods, etc.)  Every component’s interface is described by metadata tables  A component’s implementation is described by Intermediate Language  The existence of metadata tables enables many features  No header files  Visual Studio’s IntelliSense  Components don’t have to be registered in the registry  Components don’t need separate IDL or TLB files  The GC knows when an object’s fields refer to other objects  An object’s fields can be automatically serialized/deserialized  At runtime, an application can determine what types are in a file and what members the type defines (also known as late binding)  Components can be written/used by different languages
  18. 18. Metadata: Creation And Use MetadataMetadata (and code)(and code) DebuggerDebugger SchemaSchema GeneratorGenerator ProfilerProfiler CompilersCompilers Proxy GeneratorProxy Generator Type BrowserType Browser CompilerCompiler SourceSource CodeCode XML encodingXML encoding (SDL or SUDS)(SDL or SUDS) SerializationSerialization DesignersDesigners ReflectionReflection TLB ExporterTLB Exporter
  19. 19. Runtime Execution Model ClassClass LoaderLoader CPUCPU ManagedManaged Native CodeNative Code AssemblyAssembly First callFirst call to methodto method First referenceFirst reference toto typetype AssemblyAssembly ResolverResolver First referenceFirst reference to Assemblyto Assembly IL to nativeIL to native conversionconversion
  20. 20. JIT Compiler - Inline
  21. 21. Standardization  A subset of the .NET Framework and C# submitted to ECMA ECMA and ISO International Standards Co-sponsored with Intel, Hewlett-Packard  Common Language Infrastructure Based on Common Language Runtime and Base Framework Layered into increasing levels of functionality
  22. 22. Rotor (SSCLI)  Shared-Source version of the CLR+BCL+C# compiler  Ports available: Windows, FreeBSD, OSX, etc  Real product code offers real world learning  http://sscli.org
  23. 23. Developer Roadmap • ““Orcas” releaseOrcas” release •Windows “Longhorn”Windows “Longhorn” integrationintegration •New UI tools andNew UI tools and designersdesigners •Extensive managedExtensive managed interfacesinterfaces Visual Studio OrcasVisual Studio Orcas “Longhorn”“Longhorn” Visual StudioVisual Studio .NET 2003.NET 2003 • ““Everett Release”Everett Release” •Windows Server 2003Windows Server 2003 integrationintegration •Support for .NET CompactSupport for .NET Compact Framework and deviceFramework and device developmentdevelopment •Improved performanceImproved performance Visual Studio 2005Visual Studio 2005 “Yukon”“Yukon” • ““Whidbey” releaseWhidbey” release •SQL Server integrationSQL Server integration •Improved IDE productivityImproved IDE productivity and community supportand community support •Extended support forExtended support for XML Web servicesXML Web services •Office programmabilityOffice programmability
  24. 24. Agenda  Part I - FundamentalsPart I - Fundamentals Design GoalsDesign Goals ArchitectureArchitecture CLR ServicesCLR Services
  25. 25. Agenda  Part I - FundamentalsPart I - Fundamentals Design GoalsDesign Goals ArchitectureArchitecture CLR ServicesCLR Services
  26. 26. PerformanceObjectives: make .NET an even greater programming platform  Long-Term: make the performance characteristics of the CLR similar to native code  Reduce marginal cost of additional managed processes  Reduce startup time and working set NGen  Compiles IL code to native code, saving results to disk  Advantages: no need to recompile IL to native code, and class layout already set so better startup time  Whidbey: Significant reductions in the amount of private, non-shareable working set  OS: ‘no-Jit’ plan, all managed code will be NGened
  27. 27. TryParseTryParse
  28. 28. CLR Security  New cryptography support PKI and PKCS7 support XML encryption support Enhanced support for X509 certificates  Enhanced Application Security Permission Calculator ○ Integration with ClickOnce Better SecurityException Debug-In-Zone  Managed ACL Support
  29. 29. This material has been taken from Online Certificate course on ASP.NET from Global Open University Online certification programme. For complete course material visit: http://tgouwp.eduhttp://tgouwp.edu About Global Open University : The global open university is now offering certification courses in various fields. Even you can study, give exam from comfort of your home. These are short term and totally online courses. For more details you can visit: Email id: info@tgouwp.edu THANKS for being here

×