Download presentation
Presentation is loading. Please wait.
Published byRosalind Walsh Modified over 8 years ago
1
C# &.NET Review
2
ConceptsDescriptionReference Computer Science The science of data processing WP Overview ProgrammingData Structures & Algorithms WP Overview Data StructuresFormatted data storeWP Overview AlgorithmsMethods to process data efficiently WP Overview The Essence
3
ConceptsDescriptionReference Code ReuseAcross functions (modules) Across modules (DLL) Across processes (OLE, object-linking-embedding) Across systems (WS, Cloud Computing) WP Overview SystemsSolution systems for solving real world problems WP Overview SkillsKnowledge, Solution, Design, Create WP Overview The Essence
4
Online Object Sharing (Tim Reynolds, 2005)
5
Data Structures
6
ConceptsDescriptionReference Value TypesStack objectsC2 Reference TypesHeap objectsC2 PropertiesSecured data with accessorsC2 BoxingValue to referenceC2 UnboxingReference to valueC2 DatasetMemory mapping of a database table C10 DataGridGUI for a database tableC10 Data Structures
7
ConceptsDescriptionReference Meta DataData that describes dataC3 SchemaCollection of meta dataC3 ManifestoMeta data describes assembliesC3 ReflectionAPIs for reading meta data. Allowing the creation of classes and objects dynamically. C3 Data Structures
8
ConceptsDescriptionReference IP PacketsThe format for transmitting dataC9 XMLText format for describing dataC13 SOAPObject-oriented XML data formatC11 Data Structures for the Internet
9
ConceptsDescriptionReference Web.configXML data for configure web applications C9 Session Cache For storing web application global data C9 CookiesFor storing web data at clientsC11 DatabasePersistent data store on a server.C12 Session State Server Persistent web application data store on another server C9 Data Structures for the Internet
10
Algorithms
11
ConceptsDescriptionReference PropertiesSafe and convenient way to access protected data C2 ReflectionsAPIs for dynamical creation of classes and objects. C3 EDPEvent-driving programmingC4 GUIGraphical User Interface representing algorithms C4 ControlsGUI items for generating events. C4 Algorithms
12
ConceptsDescriptionReference Web FormsGUI EDP programming modelC5/C9 Code Behind Protecting source code by creating DLLs to share. C9 XCopyObject-oriented deploymentC9 DB Access Patterns Protocols for dynamically access data online. C12 TransactionAll-or-None DB operationsC12 Algorithms
13
ConceptsDescriptionReference AuthenticationIdentifying usersC10C10, PA5 AuthorizationGiving user permissionsC10C10, PA5 DB-based Authentication Storing credentials in a database C10C10, PA5 Role-based Authorization Giving group permissionsC10C10, PA5 Code-based Authorization Dynamically giving user permissions C10C10, PA5 Algorithms (Security)
14
ConceptsDescriptionReference Web Services Protocols for dynamically sharing algorithms online. C11 WS ProxiesRepresenting WS at client side.C11 For-fee WSAuthentication protocols for web services C11 WSDLFormat for describing web methods (APIs to algorithms) C11 Algorithms (WS)
15
Systems
16
ConceptsDescriptionReference CIL/CTSFor language-independent programming WP Overview CLRFor platform-independent execution WP Overview DLLSecured way of sharing codeC3C3, PA1 Web Services Protocols for dynamically sharing code online C11 Systems (Foundations)
17
ConceptsDescriptionReference Console Application Stand-alone command-line applications C1/C3C1/C3, PA1 Windows Forms For developing stand-alone GUI EDP applications C4C4, PA2 Web Applications For developing web-based GUI EDP applications C5C5, PA3 Enterprise Applications For developing multi-tier web applications C9/C10/C12C9/C10/C12, PA4/PA5 Online Visual Programming Studio For building GUI EDP applications online. C3/C5C3/C5, PA3 Systems (Applications)
18
ConceptsDescriptionReference Web ServicesProtocols for dynamically sharing code online C11 WS Consumptions Protocols for developing applications that consumes WSs. C11 Cloud Computing Virtualized on-demand scalable web applications. C11 SaaS (Software as a Service) Cloud-based applications to be shared online with users and programmers. C11 Systems (Cloud Computing)
19
More.NET Features
21
Remoting, WCF, WPF, WF, MVC, LINQ, Multithreading, Task Parallel, IoT
22
Remoting
23
XML Web Services Proxy of Interface 2 Client 2 Application 1 UDDI Registry 1 WSDL Interface 1 UDDI Registry 2 Application 2WSDL Interface 2 SOAP WEB Proxy of Interface 1 Client 1 WS Class, Contract, Registry, Proxy. XML/HTML: inefficient communication, limited representation power.
24
Remoting is for closely coupled applications with a tighter coupling of client and server. Such applications have their own client programs and don’t depend on browsers to communicate with the servers. They are “rich-client” applications and distributed applications. Better suited for two-way communication between clients and servers than are conventional Web applications. Closely coupled applications utilize network bandwidth more efficiently because they can use lean binary protocols in lieu of HTTP. “Rich-clients” can use Windows forms to better overcome the limitations of HTML. Close coupling facilitates stateful connections between clients and servers, which in turn simplifies the task of building stateful applications.. Remoting
25
Closely coupled applications building tools: –DCOM (Distributed Component Object Model), –CORBA (Common Object Request Broker Architecture), –Java RMI (Remote Method Invocation)..NET Remoting: System.Runtime.Remoting is for building closely coupled rich-client applications without the hassles that come with COM programming—apartments, IDL (Interface Definition Language), reference counting, lack of exception handling, incompatible languages and data types, and so on..NET remoting is a better COM than COM.. Remoting
26
Windows Communication Foundation (WCF)
27
WCF: Windows Communication Foundation For distributed applications. Using service oriented architecture (SOA). Clients can consume multiple services; Services can be consumed by multiple clients. (M:M) Services have WSDL interface. WCF examples: WSS (Web Services Security, extension to SOAP to apply security to web services), WS-Discovery (Web Services Dynamic Discovery, a multicast discovery protocol to locate services), For building WS-based Multi-tier web application.
28
WCF: Windows Communication Foundation Endpoints: client connects to a WCF service at an Endpoint, each service exposes its contract via endpoints. End point ABC: address, binding, contract WCF endpoints use SOAP envelope to communicate with clients (for platform independence). Behaviors allow the developer to customize how the messages are handled.
29
Windows Presentation Foundation (WPF)
30
WPF: Windows Presentation Foundation Graphical subsystem. Based on DirectX 2D and 3D graphics, vector graphics and animation Remote or standalone Safe remote view with IE. Uses XAML to define UI elements. XAML: eXtensible Application Markup Language
31
Windows Workflow Foundation (WF)
32
WF: Windows Workflow Foundation Workflow: a series of distinct programming steps. An activity at each step. Workflow Designer in Visual Studio. Workflow Engine: scheduling, managing, tracking workflows. To create applications that execute an ordered business process (UA curriculum proposal approval system).
33
LINQ Language Integrated Query
34
Embedded SQL in C# as strings StringBuilder builder = new StringBuilder (); builder.Append ("select count(*) from users " + "where username = \'"); builder.Append (username); builder.Append ("\' and pwd = \'"); builder.Append (password); builder.Append ("\';"); MySqlCommand command = new MySqlCommand (builder.ToString (), connection); Int64 count = (Int64) command.ExecuteScalar ();
35
LINQ: Language Integrated Query var results = from c in SomeCollection where c.SomeProperty < 10 select new {c.SomeProperty}; foreach (var result in results) Console.WriteLine(result);
36
MVC (Model View Controller)
37
DBMS / Database ServerApplication Server WEB S E R V E R WEB C L I E N T Database User Interface Database Engine Supporting Software Database API MODEL Application Logic CONTROLLER App User Interface VIEW Architecture of a Four-Tier Application
38
Multithreading
39
Multithreading is a mechanism for performing two or more tasks concurrently. In the managed world of the common language runtime, the fundamental unit of execution is the thread. A managed application begins its life as a single thread but can spawn additional threads. Threads running concurrently share the CPUs/GPUs by using scheduling algorithms provided by the system. To an observer, it appears as if all the threads are running at once.. Multithreading
40
Example using System; using System.Threading; class MyApp { static void Main () { for (int i=0; i<10; i++) { Thread thread = new Thread( new ThreadStart(ThreadFunc)); thread.Name = "My thread # " + i; thread.Start (); }
41
Example static void ThreadFunc () { String name = Thread.CurrentThread.Name; for (int i=0; i<10; i++) { for( int j=0; j<100000000; j++); //work System.Console.WriteLine (name + " running at "+ DateTime.Now); }
42
Task Parallel
43
Parallel Extensions Managed concurrency library TPL: Task Parallel Library PLINQ: Parallel LINQ Multithreading based. Take advantages of muti-core (Intel) and many core (Nvidia GPU)
44
Microsoft Universal Windows Platform Device independence PCs, Surfaces, Smart Phones, Xboxes Any language supported by.NET Use XAML (eXtensible Application Markup Language) to define application
45
IoT Internet of Things Connecting everything over the Internet
46
Microsoft: https://www.microsoft.com/IoT https://www.microsoft.com/IoT Can be connected to Microsoft Cloud (Azure) Tim and Cory use IoT to connect to their RasberryPI to play video gamesRasberryPI Will be taught in HCI (Human Computer Interaction) course in the summer.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.