Hike Messenger משתפר מבחינת מהירות ופשטות בעזרת רכיבי ארכיטקטורה של Android
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.

חברת Hike הושקה בשנת 2012, והיא מפתחת מוצרים שמטרתם לפשט את האינטרנט כדי להביא את הודו אונליין. אפליקציית Hike משלבת צ'אט, הודעות, פידים ושילובים עם אפליקציות של צד שלישי לתחבורה ולתשלומים.
החברה פיתחה את התכונות האלה במהירות רבה ובנקודות זמן שונות, וכתוצאה מכך נוצר מה שהחברה כינתה 'חוב טכני ואדריכלי משמעותי'. החברה רצתה לפשט את הקוד שלה במהירות, כי החוב הזה הפך לצוואר בקבוק שפגע ביציבות, בתחזוקה ובביצועים.
מה הם עשו
חברת Hike פנתה אל רכיבי הארכיטקטורה של Android, שהפכו ל"סכין השווייצרית שלנו לפתרון כל האתגרים האלה", אומר סמנכ"ל הטכנולוגיה וישוואנת' רמאראו. האפליקציה התחילה להשתמש ב-ViewModel, שמאפשר לנתונים לשרוד שינויים בהגדרות (כמו סיבוב המסך), ב-LiveData, מחזיק נתונים שניתן לצפייה, ובספריית ההתמדה Room.
"אנחנו אפליקציה מודרנית ודינמית, ו-Room ו-LiveData מתאימים מאוד לעקרונות העיצוב המתקדם שלנו", מוסיף רמראו.
בנוסף, ב-Hike בודקים את Paging Library, שמאפשר לאפליקציה לטעון מידע ממקור נתונים בהדרגה לפי הצורך, בלי להעמיס על המכשיר או להמתין יותר מדי זמן לשאילתת מסד נתונים גדולה.
"ידענו על Architecture Components באופן כללי ורצינו ללמוד עוד", אומר Ramarao. "מה שהתחיל כבדיקה של שיטות מומלצות במערכת האקולוגית של Android הפך לכלי חשוב להתמודדות עם חוב טכני וחוב ארכיטקטוני. בסופו של דבר, זה הפך לדרך למודרניזציה של הארכיטקטורה ושיטות הפיתוח שלנו".
תוצאות
הודות לרכיבי ארכיטקטורה, חברת Hike הצליחה לצמצם באופן משמעותי את מספר שורות הקוד הכולל באפליקציה שלה, וגם להפוך את הקוד לקריא יותר ולכזה שקל יותר לתחזק. רכיבי הארכיטקטורה של Android גם עזרו להם להעלות את דירוג המשתמשים ללא קריסות לרמה של מעל 99%, משהו שהם התקשו להשיג בעבר.
שנתחיל?
רכיבי הארכיטקטורה של Android פתוחים לכל המפתחים כחלק מ-Android Jetpack. תחילת העבודה עם רכיבי ארכיטקטורה של Android
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2018-05-03 (שעון UTC).
[[["התוכן קל להבנה","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"]],["עדכון אחרון: 2018-05-03 (שעון UTC)."],[],[],null,["# Hike Messenger gains speed and simplicity with Android Architecture Components\n\nLaunched in 2012, Hike is building products with the aim of simplifying the\ninternet to bring India online. Hike combines chat, messaging, feeds,\nand integrations with third-party transportation and payment apps.\nIt developed these features very rapidly and at different points in\ntime, resulting in what the company called \"significant technical and\narchitectural debt.\" Because this debt was becoming a bottleneck to\nstability, maintainability and performance, the company wanted to simplify\nits code quickly.\n\nWhat they did\n-------------\n\nHike turned to [Android Architecture Components](/jetpack/arch), which\nbecame \"our Swiss army knife to tackle all of these challenges\" says\nCTO Vishwanath Ramarao. It began using\n[ViewModel](/topic/libraries/architecture/viewmodel), which allows data to\nsurvive configuration changes (such as screen rotations);\n[LiveData](/topic/libraries/architecture/livedata), an\nobservable data-holder class; and the\n[Room](/topic/libraries/architecture/room) persistence library.\n\"We're a modern, reactive app, and Room and LiveData fit really\nwell with our forward-design principles\" Ramarao adds.\n\nHike is also evaluating the [Paging Library](/topic/libraries/paging),\nwhich makes it easier for an app gradually to load information as needed from a\ndata source, without overloading the device or waiting too long for a big\ndatabase query.\n\u003e \"We were aware of Architecture Components in general and wanted to learn more\"\n\u003e Ramarao says. \"But what started as an exploration of the Android-ecosystem\n\u003e best practices became an important tool to tackle our technical and\n\u003e architectural debt. It ultimately became a way of modernizing our\n\u003e architecture and development practice\".\n\nResults\n-------\n\nThanks to Architecture Components, Hike significantly reduced the total\nlines of code in their app, while also making that code more readable\nand maintainable. Android Architecture Components also helped them to\nraise their crash-free user ratings to well beyond 99 percent,\nsomething they'd struggled to accomplish in the past.\n\nGet started\n-----------\n\nAndroid Architecture Components is open to all developers as part of\n[Android Jetpack](/jetpack). [Get\nstarted with Android Architecture Components](/jetpack/arch)."]]