Basic of dart
Dart overview (ডার্ট ওভারভিউ):
Dart is a client-optimized language for developing fast apps on any platform. Its goal is to offer the most productive programming language for multi-platform development, paired with a flexible execution runtime platform for app frameworks.(ডার্ট যে কোনো প্ল্যাটফর্মে দ্রুত অ্যাপ তৈরি করার জন্য একটি ক্লায়েন্ট-অপ্টিমাইজ করা ভাষা। এর লক্ষ্য হল মাল্টি-প্ল্যাটফর্ম বিকাশের জন্য সর্বাধিক উত্পাদনশীল প্রোগ্রামিং ভাষা অফার করা, অ্যাপ ফ্রেমওয়ার্কের জন্য একটি নমনীয় এক্সিকিউশন রানটাইম প্ল্যাটফর্মের সাথে যুক্ত করা।)
Languages are defined by their technical envelope—the choices made during development that shape the capabilities and strengths of a language. Dart is designed for a technical envelope that is particularly suited to client development, prioritizing both development (sub-second stateful hot reload) and high-quality production experiences across a wide variety of compilation targets (web, mobile, and desktop).(ভাষাগুলিকে তাদের প্রযুক্তিগত খাম দ্বারা সংজ্ঞায়িত করা হয়—বিকাশের সময় করা পছন্দগুলি যা একটি ভাষার ক্ষমতা এবং শক্তিকে আকার দেয়। ডার্ট একটি প্রযুক্তিগত খামের জন্য ডিজাইন করা হয়েছে যা ক্লায়েন্ট ডেভেলপমেন্টের জন্য বিশেষভাবে উপযোগী, উভয় ডেভেলপমেন্ট (সাব-সেকেন্ড স্টেটফুল হট রিলোড) এবং বিভিন্ন ধরনের সংকলন লক্ষ্য (ওয়েব, মোবাইল এবং ডেস্কটপ) জুড়ে উচ্চ-মানের উৎপাদন অভিজ্ঞতাকে অগ্রাধিকার দেয়।)
Dart also forms the foundation of Flutter. Dart provides the language and runtimes that power Flutter apps, but Dart also supports many core developer tasks like formatting, analyzing, and testing code.(ডার্টও ফ্লটারের ভিত্তি তৈরি করে। ডার্ট ভাষা এবং রানটাইম সরবরাহ করে যা ফ্লটার অ্যাপগুলিকে শক্তি দেয়, তবে ডার্ট ফর্ম্যাটিং, বিশ্লেষণ এবং পরীক্ষার কোডের মতো অনেকগুলি মূল বিকাশকারী কাজগুলিকেও সমর্থন করে।)
Dart: The language (ডার্ট: ভাষা):
The Dart language is type safe; it uses static type checking to ensure that a variable's value always matches the variable's static type. Sometimes, this is referred to as sound typing. Although types are mandatory, type annotations are optional because of type inference. The Dart typing system is also flexible, allowing the use of a dynamic type combined with runtime checks, which can be useful during experimentation or for code that needs to be especially dynamic. (ডার্ট ভাষা টাইপ নিরাপদ; একটি ভেরিয়েবলের মান সবসময় ভেরিয়েবলের স্ট্যাটিক টাইপের সাথে মেলে তা নিশ্চিত করতে এটি স্ট্যাটিক টাইপ চেকিং ব্যবহার করে। কখনও কখনও, এটি শব্দ টাইপিং হিসাবে উল্লেখ করা হয়। যদিও প্রকারগুলি বাধ্যতামূলক, টাইপ অনুমানের কারণে টাইপ টীকাগুলি ঐচ্ছিক৷ ডার্ট টাইপিং সিস্টেমটিও নমনীয়, যা রানটাইম চেকের সাথে মিলিত একটি গতিশীল টাইপ ব্যবহারের অনুমতি দেয়, যা পরীক্ষার সময় বা বিশেষভাবে গতিশীল হওয়া প্রয়োজন এমন কোডের জন্য কার্যকর হতে পারে।)
Dart has built-in sound null safety. This means values can't be null unless you say they can be. With sound null safety, Dart can protect you from null exceptions at runtime through static code analysis. Unlike many other null-safe languages, when Dart determines that a variable is non-nullable, that variable can never be null. If you inspect your running code in the debugger, you see that non-nullability is retained at runtime; hence sound null safety.(ডার্টে বিল্ট-ইন সাউন্ড নাল সেফটি রয়েছে। এর মানে হল মান শূন্য হতে পারে না যদি না আপনি বলেন যে তারা হতে পারে। সাউন্ড নাল সেফটি সহ, ডার্ট আপনাকে স্ট্যাটিক কোড বিশ্লেষণের মাধ্যমে রানটাইমে শূন্য ব্যতিক্রম থেকে রক্ষা করতে পারে। অন্যান্য অনেক নাল-সেফ ল্যাঙ্গুয়েজ থেকে ভিন্ন, যখন ডার্ট নির্ধারণ করে যে একটি ভেরিয়েবল অ-নালযোগ্য, সেই ভেরিয়েবল কখনই নাল হতে পারে না। আপনি যদি ডিবাগারে আপনার চলমান কোড পরিদর্শন করেন, আপনি দেখতে পাবেন যে রানটাইমে অ-নূলতা বজায় রাখা হয়েছে; তাই শব্দ নাল নিরাপত্তা.)
The following code sample showcases several Dart language features, including libraries, async calls, nullable and non-nullable types, arrow syntax, generators, streams, and getters. (নিম্নলিখিত কোড নমুনাটি লাইব্রেরি, অ্যাসিঙ্ক কল, বাতিলযোগ্য এবং নন-নাললেবল প্রকার, তীর সিনট্যাক্স, জেনারেটর, স্ট্রীম এবং গেটার সহ বেশ কয়েকটি ডার্ট ভাষার বৈশিষ্ট্যগুলি প্রদর্শন করে।)
Dart: The libraries (ডার্ট: লাইব্রেরি):
Dart has a rich set of core libraries, providing essentials for many everyday programming tasks (ডার্টের মূল লাইব্রেরির একটি সমৃদ্ধ সেট রয়েছে, যা প্রতিদিনের অনেক প্রোগ্রামিং কাজের জন্য প্রয়োজনীয় সরবরাহ করে:):
- Built-in types, collections, and other core functionality for every Dart program (
dart:core) - Richer collection types such as queues, linked lists, hashmaps, and binary trees (
dart:collection) - Encoders and decoders for converting between different data representations, including JSON and UTF-8 (
dart:convert) - Mathematical constants and functions, and random number generation (
dart:math) - Support for asynchronous programming, with classes such as
FutureandStream(dart:async) - Lists that efficiently handle fixed-sized data (for example, unsigned 8-byte integers) and SIMD numeric types (
dart:typed_data) - File, socket, HTTP, and other I/O support for non-web applications (
dart:io) - Foreign function interfaces for interoperability with other code that presents a C-style interface (
dart:ffi) - Concurrent programming using isolates—independent workers that are similar to threads but don't share memory, communicating only through messages (
dart:isolate) - HTML elements and other resources for web-based applications that need to interact with the browser and the Document Object Model (DOM) (
dart:js_interopandpackage:web)
Beyond the core libraries, many APIs are provided through a comprehensive set of packages. The Dart team publishes many useful supplementary packages, such as these(মূল লাইব্রেরিগুলির বাইরে, অনেকগুলি API প্যাকেজের একটি বিস্তৃত সেটের মাধ্যমে সরবরাহ করা হয়। ডার্ট টিম অনেক দরকারী সম্পূরক প্যাকেজ প্রকাশ করে, যেমন):
- characters
- intl
- http
- crypto
- markdown
Additionally, third-party publishers and the broader community publish thousands of packages, with support for features like these(উপরন্তু, তৃতীয় পক্ষের প্রকাশক এবং বৃহত্তর সম্প্রদায় এই ধরনের বৈশিষ্ট্যগুলির জন্য সমর্থন সহ হাজার হাজার প্যাকেজ প্রকাশ করে):
- XML
- Windows integration
- SQLite
- compression
Dart: The platforms (ডার্ট: প্ল্যাটফর্ম):
Dart's compiler technology lets you run code in different ways (ডার্টের কম্পাইলার প্রযুক্তি আপনাকে বিভিন্ন উপায়ে কোড চালাতে দেয়:):
Native platform: For apps targeting mobile and desktop devices, Dart includes both a Dart VM with just-in-time (JIT) compilation and an ahead-of-time (AOT) compiler for producing machine code.(নেটিভ প্ল্যাটফর্ম: মোবাইল এবং ডেস্কটপ ডিভাইসগুলিকে লক্ষ্য করে এমন অ্যাপগুলির জন্য, Dart-এ জাস্ট-ইন-টাইম (JIT) সংকলন সহ একটি Dart VM এবং মেশিন কোড তৈরির জন্য একটি আগাম-অফ-টাইম (AOT) কম্পাইলার উভয়ই অন্তর্ভুক্ত রয়েছে।)
Web platform: For apps targeting the web, Dart can compile for development or production purposes. Its web compilers translate Dart into JavaScript or WebAssembly.(ওয়েব প্ল্যাটফর্ম: ওয়েবকে লক্ষ্য করে অ্যাপগুলির জন্য, ডার্ট বিকাশ বা উত্পাদন উদ্দেশ্যে কম্পাইল করতে পারে। এর ওয়েব কম্পাইলার ডার্টকে জাভাস্ক্রিপ্ট বা ওয়েব অ্যাসেম্বলিতে অনুবাদ করে।)
The Flutter framework is a popular, multi-platform UI toolkit that's powered by the Dart platform, and that provides tooling and UI libraries to build UI experiences that run on iOS, Android, macOS, Windows, Linux, and the web.(ফ্লাটার ফ্রেমওয়ার্ক হল একটি জনপ্রিয়, মাল্টি-প্ল্যাটফর্ম UI টুলকিট যা ডার্ট প্ল্যাটফর্ম দ্বারা চালিত হয়, এবং এটি iOS, Android, macOS, Windows, Linux এবং ওয়েবে চালিত UI অভিজ্ঞতা তৈরি করতে টুলিং এবং UI লাইব্রেরি প্রদান করে।)
Dart Native (machine code JIT and AOT)
During development, a fast developer cycle is critical for iteration. The Dart VM offers a just-in-time compiler (JIT) with incremental recompilation (enabling hot reload), live metrics collections (powering DevTools), and rich debugging support.(বিকাশের সময়, একটি দ্রুত বিকাশকারী চক্র পুনরাবৃত্তির জন্য গুরুত্বপূর্ণ। ডার্ট ভিএম ইনক্রিমেন্টাল রিকম্পাইলেশন (হট রিলোড সক্ষম করে), লাইভ মেট্রিক্স সংগ্রহ (ডেভটুলকে পাওয়ারিং) এবং সমৃদ্ধ ডিবাগিং সমর্থন সহ একটি জাস্ট-ইন-টাইম কম্পাইলার (JIT) অফার করে।)
When apps are ready to be deployed to production—whether you're publishing to an app store or deploying to a production backend—the Dart ahead-of-time (AOT) compiler can compile to native ARM or x64 machine code. Your AOT-compiled app launches with consistent, short startup time.(যখন অ্যাপগুলি প্রোডাকশনে স্থাপন করার জন্য প্রস্তুত হয়-আপনি কোনও অ্যাপ স্টোরে প্রকাশ করছেন বা প্রোডাকশন ব্যাকএন্ডে স্থাপন করছেন-তখন ডার্ট এহেড-অফ-টাইম (AOT) কম্পাইলার নেটিভ ARM বা x64 মেশিন কোডে কম্পাইল করতে পারে। আপনার AOT-সংকলিত অ্যাপটি ধারাবাহিক, সংক্ষিপ্ত স্টার্টআপ সময়ের সাথে লঞ্চ হয়।)
The AOT-compiled code runs inside an efficient Dart runtime that enforces the sound Dart type system and manages memory using fast object allocation and a generational garbage collector.(AOT-সংকলিত কোডটি একটি দক্ষ ডার্ট রানটাইমের মধ্যে চলে যা সাউন্ড ডার্ট টাইপ সিস্টেম প্রয়োগ করে এবং দ্রুত বস্তু বরাদ্দ এবং একটি প্রজন্মের আবর্জনা সংগ্রহকারী ব্যবহার করে মেমরি পরিচালনা করে।)
Dart Web (JavaScript dev & prod and WebAssembly)
Dart Web enables running Dart code on web platforms powered by JavaScript. With Dart Web, you compile Dart code to JavaScript code, which in turn runs in a browser—for example, V8 inside Chrome. Alternatively, Dart code can be compiled to WebAssembly.(ডার্ট ওয়েব জাভাস্ক্রিপ্ট দ্বারা চালিত ওয়েব প্ল্যাটফর্মে ডার্ট কোড চালানো সক্ষম করে। ডার্ট ওয়েবের সাথে, আপনি জাভাস্ক্রিপ্ট কোডে ডার্ট কোড কম্পাইল করেন, যা ফলস্বরূপ একটি ব্রাউজারে চলে—উদাহরণস্বরূপ, Chrome-এর ভিতরে V8। বিকল্পভাবে, ডার্ট কোড WebAssembly এ কম্পাইল করা যেতে পারে)
Dart web contains three compilation modes:
- An incremental JavaScript development compiler enabling a fast developer cycle with incremental recompilation (enabling hot reload).(একটি ক্রমবর্ধমান জাভাস্ক্রিপ্ট ডেভেলপমেন্ট কম্পাইলার ক্রমবর্ধমান পুনঃকম্পাইলেশন (হট রিলোড সক্ষম করে) সহ একটি দ্রুত বিকাশকারী চক্র সক্ষম করে।)
- An optimizing JavaScript production compiler which compiles Dart code to fast, compact, deployable JavaScript. These efficiencies come from techniques such as dead-code elimination.(একটি অপ্টিমাইজিং জাভাস্ক্রিপ্ট প্রোডাকশন কম্পাইলার যা ডার্ট কোডকে দ্রুত, কমপ্যাক্ট, স্থাপনযোগ্য জাভাস্ক্রিপ্টে কম্পাইল করে। এই দক্ষতাগুলি ডেড-কোড নির্মূলের মতো কৌশলগুলি থেকে আসে।)
- An optimizing WebAssembly (WasmGC) production compiler which compiles Dart code to super-fast, deployable WebAssembly GC code.(একটি অপ্টিমাইজিং WebAssembly (WasmGC) প্রোডাকশন কম্পাইলার যা ডার্ট কোডকে অতি দ্রুত, স্থাপনযোগ্য WebAssembly GC কোডে কম্পাইল করে।)
The Dart runtime
Regardless of which platform you use or how you compile your code, executing the code requires a Dart runtime. This runtime is responsible for the following critical tasks(আপনি কোন প্ল্যাটফর্ম ব্যবহার করেন বা আপনি কীভাবে আপনার কোড কম্পাইল করেন তা নির্বিশেষে, কোডটি কার্যকর করার জন্য একটি ডার্ট রানটাইম প্রয়োজন। এই রানটাইম নিম্নলিখিত গুরুত্বপূর্ণ কাজগুলির জন্য দায়ী):
Managing memory: Dart uses a managed memory model, where unused memory is reclaimed by a garbage collector (GC).(মেমরি পরিচালনা: ডার্ট একটি পরিচালিত মেমরি মডেল ব্যবহার করে, যেখানে অব্যবহৃত মেমরি একটি আবর্জনা সংগ্রহকারী (GC) দ্বারা পুনরুদ্ধার করা হয়।)
Enforcing the Dart type system: Although most type checks in Dart are static (compile-time), some type checks are dynamic (runtime). For example, the Dart runtime enforces dynamic checks by type check and cast operators.(ডার্ট টাইপ সিস্টেম প্রয়োগ করা: যদিও ডার্টে বেশিরভাগ টাইপ চেক স্ট্যাটিক (কম্পাইল-টাইম), কিছু ধরণের চেক ডায়নামিক (রানটাইম)। উদাহরণস্বরূপ, ডার্ট রানটাইম টাইপ চেক এবং কাস্ট অপারেটর দ্বারা গতিশীল চেক প্রয়োগ করে।)
Managing isolates: The Dart runtime controls the main isolate (where code normally runs) and any other isolates that the app creates.(আইসোলেটগুলি পরিচালনা করা: ডার্ট রানটাইম প্রধান আইসোলেটকে নিয়ন্ত্রণ করে (যেখানে কোড সাধারণত চলে) এবং অন্য যেকোন আইসোলেট যা অ্যাপ তৈরি করে।)
On native platforms, the Dart runtime is automatically included inside self-contained executables, and is part of the Dart VM provided by the dart run command.(নেটিভ প্ল্যাটফর্মে, ডার্ট রানটাইম স্বয়ংক্রিয়ভাবে স্বয়ংক্রিয়ভাবে স্বয়ংসম্পূর্ণ এক্সিকিউটেবলের মধ্যে অন্তর্ভুক্ত করা হয় এবং এটি ডার্ট রান কমান্ড দ্বারা প্রদত্ত ডার্ট ভিএম-এর অংশ।)
Comments
Post a Comment