Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Vous consultez la documentation d'Apigee et d'Apigee hybrid. Consultez la documentation d'Apigee Edge.
Cette section concerne les antimodèles courants qui surviennent lorsque des proxys d'API sont déployés sur Apigee.
Qu'est-ce qu'un antimodèle ?
Un antimodèle est une pratique de conception logicielle qui est inefficace ou contre-productive, c'est-à-dire l'opposé d'une "bonne pratique".
En d'autres termes, un antimodèle est une pratique que le logiciel vous autorise à faire, mais qui peut avoir un impact négatif sur la fonctionnalité ou les performances.
Prenons l'exemple de la classe "God Class/Object" aux accents de tout-puissance. Dans la programmation orientée objet, une god class est une classe qui contrôle trop de classes pour une application donnée, comme illustré par l'arborescence de référence suivante :
Figure 1 : God class
Comme le montre l'illustration, la god class utilise et référence trop de classes.
Le framework sur lequel l'application a été développée n'empêche pas la création de ce type de classe. Il présente toutefois de nombreux inconvénients, les principaux étant :
Sa difficulté de gestion
Son point de défaillance unique lorsque l'application s'exécute
Par conséquent, une telle classe est un antimodèle que vous devez éviter de créer.
La bonne nouvelle, c'est que vous pouvez identifier ces antimodèles et les corriger avec les bonnes pratiques appropriées. Ainsi, les API que vous déployez sur Apigee répondront mieux à leur objectif.
Résumé des antimodèles
Le tableau suivant répertorie des antimodèles d'API courants :
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/03 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/03 (UTC)."],[[["\u003cp\u003eThis documentation outlines common antipatterns encountered when deploying API proxies on Apigee and Apigee hybrid.\u003c/p\u003e\n"],["\u003cp\u003eAn antipattern is a software design practice that is ineffective or counterproductive, potentially causing adverse functional or performance impacts, as opposed to a best practice.\u003c/p\u003e\n"],["\u003cp\u003eAntipatterns, such as a "God Class" in object-oriented programming, are undesirable practices that can lead to maintenance issues and single points of failure.\u003c/p\u003e\n"],["\u003cp\u003eSeveral policy, generic, and backend antipatterns are detailed, including issues related to caching, quota management, and managing Apigee resources.\u003c/p\u003e\n"],["\u003cp\u003eThe document also provides a link to download a comprehensive eBook that goes over these antipatterns.\u003c/p\u003e\n"]]],[],null,["# Introduction to antipatterns\n\n*You're viewing **Apigee** and **Apigee hybrid** documentation.\nView [Apigee Edge](https://docs.apigee.com/api-platform/antipatterns/intro) documentation.*\n\nThis section is about common antipatterns that arise when API proxies are deployed\non Apigee.\n\nWhat is an antipattern?\n-----------------------\n\nAn [*antipattern*](https://en.wikipedia.org/wiki/Anti-pattern) is a software\ndesign practice that is ineffective or\ncounterproductive---in other words, the opposite of a \"best practice.\"\nTo put it another way, an antipattern is something that the software allows you to do, but\nthat may have an adverse functional or performance impact.\n\nFor example, consider the omnipotent-sounding \"God Class/Object\". In objected oriented\nprogramming, a *god class* is a class that controls too many classes\nfor a given application, as illustrated by the following reference tree:\n**Figure 1**: God class\n\nAs the image illustrates, the god class uses and references too many classes.\n\nThe framework on which the application was developed does not prevent the creation of such a\nclass, but it has many disadvantages, the primary ones being:\n\n- Hard to maintain\n- Single point of failure when the application runs\n\nConsequently, such a class is an antipattern that you should avoid creating.\n\nThe good news is that you can identify these antipatterns and rectify them with\nappropriate best practices, which will make the APIs you deploy on Apigee best serve their intended\npurpose.\n\nSummary of antipatterns\n-----------------------\n\nThe following table lists some common API antipatterns:\n\n### Download antipatterns eBook\n\nIn addition to the links above, you can also download the antipatterns in eBook format:\n\n- [The Book of Apigee Antipatterns v2.0 (PDF)](https://docs.apigee.com/files/Apigee_Edge_Antipatterns_2_0.pdf)"]]