forked from gaearon/overreacted.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hebrew support and optimized for change translation (gaearon#513)
- Loading branch information
Showing
4 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: מאופטם לשינוי | ||
date: '2018-12-12' | ||
spoiler: איך לעשות API מעולה? | ||
--- | ||
|
||
איך לעשות API מעולה? | ||
|
||
עיצוב *טוב* של API הוא כזה שקל לזכור אותו וחד משמעי. הוא מעודד קריאות, נכונות וביצועים, ועוזר למפתחים ליפול ל״בור ההצלחה" [the pit of success](https://blog.codinghorror.com/falling-into-the-pit-of-success/) | ||
|
||
אני קורא להיבט הזה של העיצוב "במקום הראשון" מכיוון שאלה הדברים הראשונים אליהם מפתח/ת ספרייה נוטה לשים לב. אולי תהיו צריכים להתפשר על חלקם ולשקלל יתרונות וחסרונות, אבל לפחות הם תמיד יהיו במחשבה שלכם. | ||
|
||
למרות זאת, אלא אם כן את/ה שולח/ת חללית למאדים, הקוד שלך ככל הנראה ישתנה לאורך הזמן. וכך גם הקוד של צרכני ה API שלך. | ||
|
||
מעצבי ה API הכי טובים שאני מכיר, לא עוצרים בהיבטים של ״במקום האשון״ כמו קריאות. הם מקדישים מאמץ באותה מידה, אם לא אף יותר, למה שאני קורא עיצוב API ״במקום השני״: **איך קוד המשתמש ב API יתפתח לאורך הזמן.** | ||
|
||
שינוי קטן בדרישות יכול לגרום להפלה של הקוד הכי אלגנטי שיש. | ||
|
||
*API* מעולה צופה את זה. הם צופים את זה שתרצה להזיז חלק מהקוד. להעתיק ולהדביק חלקים. לשנות שמות. לאחד מקרים מיוחדים לעזר גנרי רב פעמי. להתיר הפשטה בחזרה למקרים ספציפים. לקצץ. לאפטם צווארי בקבוק. לזרוק חלקים ולהתחיל אותם מחדש. לעשות טעויות. לתמרן בין הסיבה והתוצאה. לתקן באג. לסקור את התיקון. | ||
|
||
APIs מעולים לא רק נותנים לך ליפול ל״בור ההצלחה״, הם גם עוזרים לך *להישאר* שם. | ||
|
||
הם מאופטמים לשינוי. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters