연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
절차 개요
컴퓨터 공학 용어에서 프로시져는 특정 작업을 실행하는 재사용 가능한 코드입니다.
Blockly는 프로시져를 정의하고 호출하는 코드를 생성하는 블록 세트로 프로시져를 구현합니다.

→ 블록 사용에 관한 추가 정보
→ 커스텀 프러시저 블록 만들기에 대한 추가 정보
→ 입력된 매개변수와 같은 새로운 기능을 추가할 수 있는 커스텀 수술 모델 만들기에 관한 추가 정보
내장 및 플러그인 비교
Blockly는 프러시저 블록의 두 가지 구현을 제공합니다.
하나는 지원 데이터 모델에 의존하는 절차 블록을 구현하는 @blockly/block-shareable-procedures에 있습니다. 이렇게 하면 한 작업공간에 정의 블록이 있고 다른 작업공간에 호출 블록이 존재하는 등 프로시져 블록으로 작업을 실행할 수 있습니다. 플러그인은 프러시저 블록에 권장되는 구현입니다.
다른 하나는 Blockly 핵심에서 제공하는 기존 구현입니다. 이러한 블록에는 지원 데이터 모델이 없으며, 절차에 관한 모든 정보는 블록 자체에서 가져옵니다. 작업공간에서 사용 가능한 프로시저를 알 수 있는 유일한 방법은 해당 작업공간에 포함된 프러시저 정의 블록을 검사하는 것입니다. 이러한 블록은 이전 버전과의 호환성을 위해 계속 지원되지만 대부분의 개발자는 플러그인이 제공하는 새로운 블록을 사용할 수 있습니다.
XML 직렬화를 사용하는 경우 새 블록을 사용할 수 있지만 작업공간 간에 공유할 수는 없습니다. 이 기능에는 JSON serializer만 제공하는 추가 직렬화가 필요합니다. XML을 사용하면 새 블록은 기존 블록과 동일하게 작동합니다.
JSON으로 업그레이드하는 방법 자세히 알아보기
커스텀 프러시저 블록을 정의한 경우 새 데이터 모델과 호환되도록 업데이트해야 합니다.
커스텀 프러시저 정의 블록을 정의했지만 기본 제공 프러시저 호출 블록을 사용하는 경우 정의 블록을 업데이트할 때까지 기존 호출자 블록을 계속 사용해야 합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2023-12-02(UTC)
[null,null,["최종 업데이트: 2023-12-02(UTC)"],[[["In Blockly, procedures are reusable code blocks that execute specific tasks, allowing users to define and call them within their projects."],["Blockly offers two procedure block implementations: a recommended plugin-based approach with data models for advanced features and a legacy core implementation for backward compatibility."],["The plugin-based implementation enables procedure sharing across workspaces when utilizing JSON serialization, whereas XML serialization limits sharing but functions similarly to legacy blocks."],["Custom procedure blocks require updates to ensure compatibility with the newer data models introduced by the plugin-based implementation."],["When using custom procedure definition blocks with built-in procedure call blocks, it's necessary to retain the legacy caller block until the definition block is updated for compatibility."]]],["Blockly uses blocks to define and call procedures, which are reusable code segments. It offers two implementations: a recommended plugin (@blockly/block-shareable-procedures) with a backing data model for features like cross-workspace sharing, and a legacy core implementation without a data model. The plugin blocks support JSON serialization for sharing; XML serialization is limited. Custom procedure blocks must be updated to use the new data models. Custom definition blocks used with the built-in caller block should use legacy caller blocks until the definition block is updated.\n"]]