Blockly چیست؟
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Blockly یک کتابخانه وب است که به شما امکان می دهد یک ویرایشگر کد مبتنی بر بلوک قابل تنظیم به برنامه خود اضافه کنید. ویرایشگر از بلوکهایی مانند قطعه پازل برای نمایش مفاهیم کد مانند متغیرها، عبارات منطقی، حلقهها و موارد دیگر استفاده میکند. به کاربران اجازه می دهد بدون نگرانی در مورد نحو یا ارعاب خط فرمان برنامه ریزی کنند.
با تفکیک بیشتر آن، می توانید از دو طریق به Blockly فکر کنید:
- مانند یک رابط کاربری سرگرم کننده پازل.
- مثل یک ریسمان ساز فانتزی.
شما اتصالات پازل و فیلدهای ورودی را تعریف می کنید و سپس Blockly رندر پیچیده، کشیدن و اتصال آنها را انجام می دهد.
شما رشته ای را تعریف می کنید (معمولاً کد) که برای هر بلوک تولید می شود، و سپس Blockly رشته های کامل بلوک ها را به هم متصل می کند. اینکه با این نتیجه چه کاری انجام می دهید به شما بستگی دارد. شما می توانید هر کاری انجام دهید، از حل یک پیچ و خم، انیمیشن سازی یک شخصیت، تا تجزیه و تحلیل برخی داده ها. برای مثالهای بیشتر، به مقدمه برنامههای Blockly مراجعه کنید.
Blockly به شما امکان می دهد بدون نگرانی در مورد جزئیات نحوه عملکرد بلوک ها، روی اعمال بلوک ها در دامنه خود تمرکز کنید. برای اطلاعات بیشتر به چرا مسدود کردن مراجعه کنید؟
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eBlockly is a JavaScript library that empowers developers to integrate a visual, block-based programming editor into their web applications.\u003c/p\u003e\n"],["\u003cp\u003eThis editor simplifies coding by using interlocking blocks to represent code elements, making it accessible to users with varying levels of programming experience.\u003c/p\u003e\n"],["\u003cp\u003eBlockly handles the visual aspects and logic of connecting blocks, allowing developers to focus on defining the functionality and behavior of their application.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can customize Blockly to generate code in various programming languages and utilize it for diverse applications like game development, data analysis, and educational tools.\u003c/p\u003e\n"]]],["Blockly is a web library enabling developers to integrate a visual, block-based code editor into applications. It utilizes puzzle-piece blocks to represent code elements, allowing users to program without syntax concerns. Developers define block connections and the resulting code strings. Blockly handles rendering, dragging, and string concatenation. Developers can then use the generated code strings to create various applications like solving mazes or analyzing data, allowing focus on their application instead of block interactions.\n"],null,["# What is Blockly?\n\nBlockly is a web library that lets you add a customizable blocks-based code\neditor to your app. The editor uses puzzle-piece like blocks to represent code\nconcepts like variables, logical expressions, loops, and more. It lets users\nprogram without having to worry about syntax or the intimidation of the command\nline.\n| **Note:** Blockly is for developers, Blockly apps are for learners. If you're here to use apps rather than build them, try some of the products from [companies\n| that create Blockly apps](https://developers.google.com/blockly#learn-with-blockly).\n\nBreaking it down further, you can think of Blockly in two ways:\n\n1. Like a fun puzzle-piece UI.\n2. Like a fancy string builder.\n\nYou define the puzzle connections and input fields, and then Blockly handles the\ncomplicated rendering, dragging, and connecting of them.\n\nYou define the string (usually code) that gets generated for each block, and\nthen Blockly handles concatenating whole strings of blocks. What you do with\nthat result is up to you. You can do anything from solving a maze, to animating\na character, to analyzing some data. For more examples, see the [Introduction to\nBlockly applications](/blockly/guides/design/app-overview).\n\nBlockly lets you focus on applying blocks to your domain without worrying about\nthe details of how blocks work. For more information see\n[Why Blockly?](/blockly/guides/get-started/why-blockly)"]]