1 / 46

C# & .NET Review

C# & .NET Review. The Essence. The Essence. Online Object Sharing (Tim Reynolds, 2005). Data Structures. Data Structures. Data Structures. Data Structures for the Internet. Data Structures for the Internet. Algorithms. Algorithms. Algorithms. Algorithms (Security). Algorithms (WS).

plaisted
Download Presentation

C# & .NET Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C# & .NETReview

  2. The Essence

  3. The Essence

  4. Online Object Sharing (Tim Reynolds, 2005)

  5. Data Structures

  6. Data Structures

  7. Data Structures

  8. Data Structures for the Internet

  9. Data Structures for the Internet

  10. Algorithms

  11. Algorithms

  12. Algorithms

  13. Algorithms (Security)

  14. Algorithms (WS)

  15. Systems

  16. Systems (Foundations)

  17. Systems (Applications)

  18. Systems (Cloud Computing)

  19. More .NET Features

  20. Remoting,WCF, WPF, WF,MVC, LINQ,Multithreading,Task Parallel,IoT

  21. Remoting

  22. Client 1 Proxy of Interface 2 UDDI Registry 2 SOAP UDDI Registry 1 Client 2 Proxy of Interface 1 SOAP Application 1 WSDL Interface 1 Application 2 WSDL Interface 2 WEB XML Web Services WS Class, Contract, Registry, Proxy. XML/HTML: inefficient communication, limited representation power.

  23. Remoting • 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. .

  24. Remoting • 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. .

  25. Windows Communication Foundation(WCF)

  26. 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.

  27. 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.

  28. Windows Presentation Foundation(WPF)

  29. 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

  30. Windows Workflow Foundation(WF)

  31. 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).

  32. LINQLanguage Integrated Query

  33. Embedded SQL in C# as strings StringBuilder builder = new StringBuilder(); builder.Append ("select count(*) from users " + "whereusername = \'"); builder.Append (username); builder.Append ("\' and pwd = \'"); builder.Append (password); builder.Append ("\';"); MySqlCommand command = new MySqlCommand (builder.ToString (), connection); Int64 count = (Int64) command.ExecuteScalar ();

  34. LINQ: Language Integrated Query var results = from c in SomeCollection wherec.SomeProperty < 10 select new {c.SomeProperty}; foreach (var result in results) Console.WriteLine(result);

  35. MVC(Model View Controller)

  36. DBMS / Database Server Application Server WEB S E R V E R WEB C L I E N T App User Interface VIEW Supporting Software User Interface Application Logic CONTROLLER Database Engine Database Database API MODEL Architecture of a Four-Tier Application Architecture of a Four-Tier Application

  37. Multithreading

  38. Multithreading 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. .

  39. 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 (); } }

  40. 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); } } }

  41. Task Parallel

  42. 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)

  43. 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

  44. IoTInternet of ThingsConnecting everything over the Internet

  45. Microsoft: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 games • Will be taught in HCI (Human Computer Interaction) course in the summer.

More Related