languages and ide (integrated development environment)

12
Languages and IDE (Integrated Development Environment)

Upload: jasper-brooks

Post on 03-Jan-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Languages and IDE (Integrated Development Environment)

Languages and IDE (Integrated Development Environment)

Page 2: Languages and IDE (Integrated Development Environment)

Compiled Languages

Compiler(Including

Linker)hello.cpp

(high level)hello.exe(machine)

ResultExecutorhello.exe

Page 3: Languages and IDE (Integrated Development Environment)

Interpreted Languages

Interpreterhello.bas Result

Page 4: Languages and IDE (Integrated Development Environment)

Hybrid Compiler-Interpreter

Interpreter

Source code

Result

CompilerIntermediate language code

Page 5: Languages and IDE (Integrated Development Environment)

C++/CLI (Common Language Infrastructure)

CLR

C++/CLISource Code

Result

C++/CLI compiler MSIL code

This applies to C# and VB .NET too.

CLR = Common Language Runtime

CIL = C++ Intermediate Language

MSIL = Microsoft Intermediate Language

Page 6: Languages and IDE (Integrated Development Environment)

About C++\CLI • C++ (.h, .cpp, complied)• C++/CLI (compiled to MSIL, not machine code)

(not interpreted at runtime)• C++ vs. C++/CLI

– Unmanaged data vs. managed data

• Latter: allocated by an application, deallocated by CLR’s garbage collector

– Unmanaged code vs. managed code

• Managed code: memory management, code access security, multi-language integration

– Garbage collection

Page 7: Languages and IDE (Integrated Development Environment)

.NET

– Application development technologies• Console appl., Windows appl., Windows service,

web appl., web services

– .NET base class library– Common Language Runtime (above OS)

• For all languages and all platforms

• Execute code, add common functionalities

• Managed data, managed code

• Runtime services: code verification, garbage collection, etc.

Page 8: Languages and IDE (Integrated Development Environment)

.NET Advantages• Language natural

– Many non-MS languages can use base class library – Common Type System (CTS)– Common Language Specification (CLS)

• Minimum subset of CTS for all the .NET compatible languages

• Platform independent– Port .NET Framework to non-Windows platform w/o recompiling– JIT: Just-In-Time Compilation– A JIT compiler translates bytecode into the native machine language.

Page 9: Languages and IDE (Integrated Development Environment)

IDE(Integrated development environment)

• Microsoft Visual Studio for C++

Page 10: Languages and IDE (Integrated Development Environment)

Examples

• How to use Microsoft Visual Studio 2012

• Use Visual Studio to create a simple project after class

Page 11: Languages and IDE (Integrated Development Environment)

backups

Page 12: Languages and IDE (Integrated Development Environment)

Play with code

• 1. Console application – Output more

– Read so to pause • Console::Write(L"Enter the constant term(terminate): ");

• Int c = Double::Parse(Console::ReadLine());

• Console::Write(L"Verify");

• Boolean y = Double::Parse(Console::ReadLine());

• 2. Windows Form Application– Use different form name