Square با Compose بهره وری را افزایش می دهد
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Square به میلیونها فروشنده کمک میکند تا تجارت خود را اداره کنند - از پردازش امن کارت اعتباری گرفته تا راهحلهای فروش و راهاندازی یک فروشگاه آنلاین رایگان. Square مدتی است که به سمت رابط کاربری اعلامی حرکت کرده است، اما به جای ادامه ساختن فریم ورک خود، آنها تصمیم گرفتند به Jetpack Compose بروند و از هزینه های نگهداری اجتناب کنند و از پیشرفت هایی که در سیستم Android Views به ارمغان می آورد، استفاده کنند.
کاری که آنها انجام دادند
تیم Square شروع به ساخت سیستم طراحی خود در Compose کرد، با این هدف که تیم سیستم طراحی و مهندسان محصول خود را قادر به حرکت سریعتر کنند. از آنجایی که برنامه آنها قبلاً با یک معماری جریان داده یک طرفه سازماندهی شده است، "برای مهندسان محصول بسیار آسان است که در یک زمان یک صفحه را با Compose یک صفحه تعویض کنند." در حین پذیرش Compose، آنها دیدهاند که "گاهی اوقات آنقدر ساده است که انتظار دارید پیچیدهتر باشد. همه چیز فقط کار میکند. "
نتایج
با استفاده از Compose، میتوانیم به جای حل مشکل گستردهتر ایجاد یک چارچوب UI اعلامی، روی چیزهایی تمرکز کنیم که مختص Square و زیرساخت UI ما هستند .
تیم مهندسی دریافتند که Compose بهره وری آنها را بهبود می بخشد و استدلال، سازماندهی و نوشتن کد را آسان تر می کند و ابزار Android Studio در زمان زیادی صرفه جویی می کند.
" استایل دادن به اجزای ساده تر و سریعتر است. خواندن کد برای اجزای پیچیده نیز آسان تر است. سازماندهی کد و خوانایی آن در Compose آسان تر است. سیستم چیدمان Compose از نظر مفهومی ساده تر است، بنابراین استدلال در مورد آن آسان تر است. پیش نمایش ها در ساخت مولفه ها صرفه جویی زیادی در زمان دارند ."
شروع کنید
درباره Compose بیشتر بیاموزید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2021-07-28 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2021-07-28 بهوقت ساعت هماهنگ جهانی."],[],[],null,["[Square](https://squareup.com/) helps millions of sellers run their\nbusiness -- from secure credit card processing to point of sale solutions to\nsetting up a free online store. Square has been moving to declarative UI for\na while but rather than continuing to build their own framework, they decided to move to\nJetpack Compose, avoiding the maintenance costs and taking advantage of the\nimprovements it brings over the Android Views system.\n\nWhat they did\n\nThe Square team started building their design system in Compose, with the goal\nof enabling their design system team and product engineers to move faster.\nBecause their app is already organised with a unidirectional data flow\narchitecture, *\"It's really easy for product engineers to swap in Compose one\nscreen at a time.\"* While adopting Compose, they've seen that *\"sometimes it's\nalmost so simple you expect it to be more complicated. **Things just work.**\"*\n\nResults\n\n*\"By using Compose, we can **focus on things that are unique to Square** and our UI\ninfrastructure, rather than solving the broader issue of building a\ndeclarative UI framework.\"*\n\nThe engineering team found that Compose improved their productivity, making the\ncode easier to reason about, organise, and write, and the Android Studio\ntooling saved them a lot of time.\n\n*\"It's **simpler and faster to style components** . Reading the code for complicated\ncomponents is easier as well. It's **easier to organize code and make it\nreadable** in Compose. The layout system of Compose is conceptually simpler so\nit's **easier to reason about. Previews are a big time saver** when building\ncomponents.\"*\n\nGet started\n\nLearn more about [Compose](/jetpack/compose)."]]