1 / 9

Programação Visual

Programação Visual. Aula 1 Plataforma .Net. VB. VB. C++. C++. C#. C#. JScript. JScript. …. …. VB. VB. C++. C++. C#. C#. JScript. JScript. …. …. Common Language Specification. Common Language Specification. Common Language Specification. Common Language Specification.

kalb
Download Presentation

Programação Visual

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. Programação Visual Aula 1 Plataforma .Net

  2. VB VB C++ C++ C# C# JScript JScript … … VB VB C++ C++ C# C# JScript JScript … … Common Language Specification Common Language Specification Common Language Specification Common Language Specification ASP.NET: Web Services ASP.NET: Web Services Windows Windows ASP.NET: Web Services ASP.NET: Web Services Windows Windows e Web Forms and Web Forms Forms Forms e Web Forms e Web Forms Forms Forms Visual Studio.NET Visual Studio.NET Visual Studio.NET Visual Studio.NET ADO.NET: Dados e XML ADO.NET: Data and XML ADO.NET: Dados e XML ADO.NET: Dados e XML Base Class Library (Framework) Base Class Library (Framework) Base Class Library (Framework) Base Class Library (Framework) Common Language Runtime Common Language Runtime Common Language Runtime Common Language Runtime Programação Visual – Engenharia Informática - EST Setubal

  3. System.WinForms System.Web Controls Drawing Web Services Web Forms Windows Application Services ASP.NET Application Services System Base Framework ADO.NET XML SQL Threading IO Net Security ServiceProcess Common Language Runtime Type System Metadata Execution .NET Framework Architecture Programação Visual – Engenharia Informática - EST Setubal

  4. Value types Value types l l Primitives Primitives Ø Ø int i; float f; int i; float f; Enums Enums Ø Ø enum State { Off, On } enum State { Off, On } Structs Structs Ø Ø struct Point { int x, y; } struct Point { int x, y; } Reference types Reference types l l Classes Classes Ø Ø class Foo: Bar, IFoo { … } class Foo: Bar, IFoo { … } Interfaces Interfaces Ø Ø interface IFoo : IBar { … } interface IFoo : IBar { … } Arrays Arrays Ø Ø string[] s = new string[10]; string[] s = new string[10]; Delegates Delegates Ø Ø delegate void Empty(); delegate void Empty(); Common Type System Programação Visual – Engenharia Informática - EST Setubal

  5. Source code VB C# C++ Unmanaged Component Compiler Compiler Compiler Managed code Assembly IL Code Assembly IL Code Assembly IL Code Common Language Runtime JIT Compiler Native Code Operating System Services Linguagens Intermédias e JIT’s Programação Visual – Engenharia Informática - EST Setubal

  6. Linguagens Intermédias e JIT’s • O código é escrito em C# • O código é compilado resultando num ficheiro .exe que contém • O programa em código MSIL (MS Intermediate Language) • Uma parte read-only com um cabeçalho PE standard (Win32-portable executable) • Uma função _CorExeMain do runtime .NET • 3. Quando a aplicação é executada o SO carrega o PE e as Dinamyc Linked Lybraries (dll) tal como faz com qualquer PE válido. ... Incluindo o dll que exporta a função _CorExeMain (mscoree.dll) Programação Visual – Engenharia Informática - EST Setubal

  7. Linguagens Intermédias e JIT’s 4. O carregador do SO salta para o ponto de entrada dentro do PE (exactamente como executa qualquer outro PE) Mas como o o SO não pode executar código MSIL (óbvio!), o ponto de entrada é uma pequena instrução que executa o salto para a função _CorExeMain do mscoree.dll 5. A função _CorExeMain inicia a execução do código MSIL que foi colocado na PE. Como o código MSIL não pode ser executado directamente, o CLR compila o MSIL, utilizando um compilador just-in-time, para instruções nativas da máquina (CPU) Note-se que a compilação do JIT ocorre à medida que os métodos do programa não evocados. O código executável é mantido em cache e recompilado apenas se existirem alterações Programação Visual – Engenharia Informática - EST Setubal

  8. Linguagens Intermédias e JIT’s • Podem utilizar-se três tipos de JIT’s • PreJIT • Geração de código na instalação (vantagens / desvantagens) • JIT (por defeito ... Atenção!) • Tal como descrito nos slides anteriores • EconoJIT • Concebido para sistemas com recursos limitados • Code pitching – descarta código gerado quando faltam recursos ao sistema (memmória) • Vantagens/desvantagens Programação Visual – Engenharia Informática - EST Setubal

  9. .NET Class Library WebForms / WinForms CLR Always uses Native Code Compilation ASP.NET ADO.NET SOAP / XML .NET versus Java/J2EE • Java Core API • Java Beans • Java Swing • Java Virtual Machine • Native Code Compilation is optional • JSP • JDBC • EJB / JMS / SOAP / XML Programação Visual – Engenharia Informática - EST Setubal

More Related