2016년 2월 11일 목요일

[Link] C#, .Net Framework, Mono, Xamarin 소개 링크 정리 및 프로그래밍 가이드 링크

C#을 알아보며 링크만 정리함....

C# 소개


http://soen.kr/book/dotnet/book/2-1-2.htm

마이크로소프트에서 개발한 객체지향 프로그래밍 언어.
아네르스 하일스베르(덴마크어: Anders Hejlsberg), Turbo Pascal > Delphi > C#

  • C++와 자바에서 강한 영향을 받았고 대부분의 유사 feature가 포함되어 있음
    • 괜찮은 Language feature(Generic, Lamda, LINQ 등)들은 포함되는 추세
  • 특징
    • 완전한 객체 지향 언어, 전역 함수, 전역 변수 불가
    • Garbage Collection 지원
    • 엄격한 Data형 형식 확인, 문법 확인
    • 다중 상속, 디폴트 인수, 비트 필드 지원 안 함
    • 클래스간 프렌드 지정 불가

모바일, 윈도우, 인터넷 등 다양한 domain에서 사용됨
C#으로 개발된 결과물은 .NET framework과 Mono에서 동작 가능


https://namu.wiki/w/C%23

마이크로소프트에서 개발한 객체지향 프로그래밍 언어. '씨샵'이라고 읽는다. C++ 자바에서 강한 영향을 받았다. 이름의 유래는 두 가지에서 따왔다고 한다.# 첫번째 의미는 음악에서 유래한 것으로, 도(C)에 반음(#)을 올린 것.[1] MS에서는 출판물 등에서 키보드의 #(원래는 숫자를 의미) 대신 유니코드의 진짜 반음 올림 기호(♯, U+266F)를 쓰기도 한다. 두번째 의미는 많은 사람들이 알고 있듯이 C++++라는 뜻도 있다고 한다. ++++을 상하좌우로 박으면 #가 되기 때문.

https://en.wikipedia.org/wiki/C_Sharp_(programming_language)

The reference C# compiler is Microsoft Visual C#, which is open-source.[50]
Microsoft is leading the development of a new open-source C# compiler and set of tools, previously codenamed "Roslyn". The compiler, which is entirely written inmanaged code (C#), has been opened up and functionality surfaced as APIs. It is thus enabling developers to create refactoring and diagnostics tools.
Other C# compilers exist, often including an implementation of the Common Language Infrastructure and the .NET class libraries up to .NET 2.0:
  • The Mono project provides an open-source C# compiler, a complete open-source implementation of the Common Language Infrastructure including the required framework libraries as they appear in the ECMA specification, and a nearly complete implementation of the Microsoft proprietary .NET class libraries up to .NET 3.5. As of Mono 2.6, no plans exist to implement WPF; WF is planned for a later release; and there are only partial implementations of LINQ to SQLand WCF.[51]
  • The DotGNU project (now discontinued) also provided an open-source C# compiler, a nearly complete implementation of the Common Language Infrastructure including the required framework libraries as they appear in the ECMA specification, and subset of some of the remaining Microsoft proprietary .NET class libraries up to .NET 2.0 (those not documented or included in the ECMA specification, but included in Microsoft's standard .NET Framework distribution).
  • Microsoft's Rotor project (currently called Shared Source Common Language Infrastructure) (licensed for educational and research use only) provides a shared source implementation of the CLR runtime and a C# compiler, and a subset of the required Common Language Infrastructure framework libraries in the ECMA specification (up to C# 2.0, and supported on Windows XP only).

C# 언어 및 .NET Framework 소개

  • MS에서 개발한 프로그램 개발 및 실행을 관리하는 런타임.
    • 실행중인 프로그램을 처리하는 실행 엔진인 CLR(공용 언어 런타임, Common Language Runtime) 포함
    • 응용 프로그램에서 사용 가능한 .NET FCL(Framework Class Library) 포함
  • 주요 지원 언어
    • C#, Visual Basic .NET, C++, Iron Python, F#


https://msdn.microsoft.com/ko-kr/library/z1zx9t92.aspx

C# 프로그램은 CLR(공용 언어 런타임)이라는 가상 실행 시스템 및 통합된 클래스 라이브러리 집합이 포함된 Windows 필수 구성 요소인 .NET Framework에서 실행됩니다. CLR은 다양한 언어와 라이브러리가 매끄럽게 함께 작동하는 실행 및 개발 환경을 구축하는 데 기준이 되는 국제 표준 CLI(공용 언어 인프라)를 Microsoft에서 상업용으로 구현한 것입니다.
C#으로 작성된 소스 코드는 CLI 사양을 따르는 IL(Intermediate Language)로 컴파일됩니다. IL 코드와 리소스(예: 비트맵 및 문자열)는 일반적인 확장명이 .exe 또는 .dll인 어셈블리라는 실행 파일로 디스크에 저장됩니다. 어셈블리에는 어셈블리의 형식, 버전, 문화권 및 보안 요구 사항에 대한 정보를 제공하는 매니페스트가 포함되어 있습니다.
C# 프로그램을 실행하면 어셈블리가 CLR로 로드되고 CLR은 매니페스트에 포함된 정보를 기반으로 다양한 작업을 수행합니다. 그런 다음 보안 요구 사항이 충족되면 CLR은 JIT(Just In Time) 컴파일을 수행하여 IL 코드를 네이티브 기계어 명령으로 변환합니다. CLR은 또한 자동 가비지 수집, 예외 처리 및 리소스 관리와 관련된 기타 서비스를 제공합니다. CLR을 통해 실행되는 코드를 "관리 코드"라고도 하며, 이는 특정 시스템을 대상으로 하는 네이티브 기계어로 컴파일되는 "비관리 코드"와 대조적인 의미입니다. 다음 다이어그램은 C# 소스 코드 파일, .NET Framework 클래스 라이브러리, 어셈블리 및 CLR의 컴파일 타임 및 런타임 관계를 보여 줍니다.

C# 소스 코드에서 컴퓨터 실행으로


C# 프로그래밍 가이드

https://msdn.microsoft.com/ko-kr/library/67ef8sbd.aspx

MS C# 샘플 코딩 규칙
https://msdn.microsoft.com/ko-KR/library/ff926074.aspx

Hello World code

// A Hello World! program in C#.
using System;
namespace HelloWorld
{
    class Hello 
    {
        static void Main() 
        {
            Console.WriteLine("Hello World!");

            // Keep the console window open in debug mode.
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
    }
}


Mono

http://www.mono-project.com/
https://en.wikipedia.org/wiki/Mono_(software)
https://namu.wiki/w/C%23#s-3.2
https://ko.wikipedia.org/wiki/%EB%AA%A8%EB%85%B8_(%EC%86%8C%ED%94%84%ED%8A%B8%EC%9B%A8%EC%96%B4)

  • Cross Platform, Open Source .NET Framework
    • .NET Framework 호환
    • C# compile, Mono Runtime, .NET Framework Class library, Mono Class Library 포함
  • 현재 Xamarin (Ximian>Novel>Xamarin)에서 주도
  • Multi-Platform, Multi-Language Support
    • Android, Linux, BSD, OS X, Windows, Solaris, PlayStation 3, Wii, Xbox 360
  • Novell, Microsoft 와의 특허 문제가 있었으나 MS의 약속, .NET core의 오픈소스화로 우려 거의 없어짐 (확인 필요..)
  • 간략 history
    • 2000년에 MS에서 ECMA-335에 기반한 .NET framework 발표
    • 2001년 Mono Open Source Project 발표
      • Miguel de Icaza(Ximian 근무)가 Linux에서 .NET framework 동작에 관심을 가지게 되며 시작
    • 2004년 Mono 1.0 릴리즈, Linux외 다른 OS도 시작
    • 2011년 Novell 구조조정여파로  Mono팀이 Xamarin으로 이동
      • 이후 Xamarin에서 Mono 개발을 주도하며 iOS, Android등에 대한 지원도 시작.

Xamarin

https://www.xamarin.com/
http://www.slideshare.net/Xamarin/native-i-os-android-and-windows-development-in-c-with-xamarin-4
https://developer.xamarin.com/guides/cross-platform/getting_started/introduction_to_mobile_development/
http://www.slideshare.net/joekoletar/minnesota-entrprise-mobile-user-group-meeting?from_action=save
http://developer.rhino3d.com/guides/rhinocommon/what_are_mono_and_xamarin/
http://www.slideshare.net/gilbok/xamarinforms-mvp-comcamp-2015?qid=e862ad23-0b08-4dd7-8d0a-a4c911f7414f&v=&b=&from_search=1
http://www.slideshare.net/kmstechnology/cross-platform-mobile-development-with-c-and-xamarin


  • Cross-Platform App Development Platform/SDK?
  • 2011년 Mono 개발자들이 설립한 회사며 2016년 MS가 인수.
  • C# 언어와 Xamarin tool로 Native UI를 사용한 Android, iOS, Windows app들을 개발 가능
  • 장점
    • Cross-Platform Development in C#
    • Native UI, Native Performance
    • Reuse existing code
  • 단점
    • Requires platform development knowledge
    • Need Max OS X for iOS development
  • Products
    • Xamarin Platform
      • Xamarin Studio, Xamarin.Android, Xamarin.iOS, Xamarin.Mac
    • Xamarin.Forms
      • Native UI Control과 mapping 된 Portable UI Control Set
    • Xamarin Test Cloud
    • Xamarin Studio, Xamarin for Visual Studio




댓글 없음:

댓글 쓰기