![]() As you can see, instead of one call returning a single number, we have to make two calls returning 90% of the data we don’t need for our client.Īnother example is the reverse situation. The generic API returns a list of accounts with their details (which are not needed by the watch app), then the consumer has to make another call to get specific details of the account, including its current amount. By default, all it does is to display the amount of money available on the default banking account. Imagine a simple banking app on a smartwatch. It’s crucial to explain this in more detail, so I’ll use examples. Multiple clients may suffer because of too many API calls to fulfill their UI requirements. ![]() If one solution is supposed to fit all the needs, it usually means it is not optimized for any. Another client may connect tomorrow and no changes in the API are required because of that. API consumers depend on the generic API but the generic API does not depend on the way the consumer uses it. ProsĮasy to enhance when application functionality is added and there is one single place to make modifications and publish new API contracts.įrom the separation of concerns perspective, it is also great. Good design conforms with Domain Driven Design and it attempts to anticipate business processes and use cases, which turn into conversations between different APIs.Ī generic API is not aware of its consumers, which from the dependency standpoint is good. Generic API is а one-size-fits-all, trying hard to accommodate the needs of every consumer. We may have direct HTTP calls by using pub/sub patterns with a messaging backbone. API calls can be orchestrated or choreography may be used. API can be used for detecting state changes (pooling), publishing, and receiving business events on the application or service bus. They are often the largest number of consumers and are in large enterprises where the API can be accessed by corporate API brokers using queues and intermediaries. ![]() Intelligent speakers, car applications and a myriad of other connected devices also would like to enhance the user’s experience and in order to do that they need to use APIs. ![]() They also call on APIs to get that information, but in different forms and using different conversation patterns. For instance, banking applications usually start with the simple information about a default account and then options to perform various operations on the account, while web applications welcome users with more information up front about their accounts and other financial services offered by the bank. Mobile applicationsĪndroid and iOS applications for phones, tablets and devices very often have different UIs than web pages and are optimized for mobile usage. Modern advanced apps utilize the power of the browser run-time using local storages, enabling more efficient network usage or even give the ability to work offline. ![]() They call on Application Program Interfaces (API) to generate and update the views and react to events on the user interface (UI) by invoking command APIs to modify the state of business processes and data. Modern web UI frameworks such as React, Vue or Angular are de facto standalone and rich JavaScript applications running in the browser environment. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |