ASP.NET Razor

Razor
원저자마이크로소프트
개발자닷넷 재단
발표일2010년 6월(16년 전)(2010-06)
안정화 버전
3.2.7 / 2018년 11월 29일(7년 전)(2018-11-29)[1]
미리보기 버전
4.0.0-rc1 / 2015년 11월 18일(10년 전)(2015-11-18)
저장소github.com/aspnet/Razor
github.com/aspnet/AspNetWebStack
github.com/dotnet/aspnetcore
프로그래밍 언어C#, VB.NET, HTML
운영 체제마이크로소프트 윈도우[2]
종류웹 애플리케이션 프레임워크
라이선스아파치 라이선스 2.0[3]
웹사이트www.asp.net/web-pages
Razor 파일 포맷
파일 확장자.razor, .cshtml, .vbhtml
인터넷 미디어 타입
text/html
개발마이크로소프트

Razor(레이저)는 C# 또는 VB.NET 프로그래밍 언어로 동적 웹 페이지를 만드는 데 사용되는 ASP.NET 프로그래밍 구문이다. Razor는 2010년 6월에 개발 중이었고[4] 비주얼 스튜디오 2010 용으로 2011년 1월에 출시되었다.[5] Razor는 간단한 구문의 보기 엔진이며 MVC 3와 웹매트릭스 도구 세트의 일부로 출시되었다.[5]

Razor는 AspNetWebStack의 구성 요소가 되었고, ASP.NET Core의 일부가 되었다.[6]

설계

Razor 구문은 C# 프로그래밍 언어를 기반으로 한 템플릿 마크업 구문으로 프로그래머가 HTML 구성 워크플로우를 사용할 수 있도록 한다. 코드 블록을 나타내기 위해 <%= %> 기호와 함께 ASP.NET 웹 폼 (.aspx) 마크업 구문을 사용하는 대신 Razor 구문은 @ 문자로 코드 블록을 시작하며 코드 블록을 명시적으로 닫을 필요가 없다.

Razor의 아이디어는 HTML과 코드 간의 전환을 최소화하면서 코드 중심의 템플릿 접근 방식을 사용하여 HTML 생성을 위한 최적화된 구문을 제공하는 것이다.[7] 이 설계는 문자 및 키 입력의 수를 줄이고, HTML 코드 내에서 명시적으로 표시된 서버 블록을 요구하지 않음으로써 보다 유연한 코딩 워크플로우를 가능하게 한다.[4] 다른 장점은 다음과 같다.[8]

같이 보기

각주

  1. “Microsoft ASP.NET Razor”. 《NuGet》. 
  2. “Introduction to Razor Pages in ASP.NET Core” (미국 영어). 《learn.microsoft.com》. 
  3. “Razor/LICENSE.txt at master · aspnet/Razor · GitHub”. 《GitHub》. 2022년 10월 12일. 
  4. “ScottGu's Blog - Introducing "Razor" – a new view engine for ASP.NET”. 《asp.net》. 2010년 11월 10일에 원본 문서에서 보존된 문서. 2024년 3월 8일에 확인함. 
  5. “MSDN Blogs”. 《msdn.com》. Microsoft. 2012년 7월 2일에 원본 문서에서 보존된 문서. 2011년 7월 8일에 확인함. 
  6. Chadwick, Jess (2011년 9월 9일). 《Programming Razor: Tools for Templates in ASP.NET MVC or WebMatrix》 (영어). "O'Reilly Media, Inc.". ISBN 978-1-4493-1716-4. 
  7. Jon Galloway. “MVC 3 - Razor View Engine”. 《The Official Microsoft ASP.NET Site》. 
  8. “ASP.NET MVC View Engine Comparison”. 《stackoverflow.com》. 

외부 링크

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.