What API design for storing generic data in a more specific format?
for In the project I am working on we send messages about widgets over message queues, serializing them onto the queues as XML. The XML schema contains tags for properties that are common to all types of these widget messages, such as the widget type, command name and destination. It can also contain an arbitrarily sized list of key-value pairs to allow storage of properties that are only relevant for a specific type of widget message. The WidgetMessage
class encapsulates this data and the WidgetMessageXmlWriter
and WidgetMessageXmlReader
classes provide serialization to and from the XML.
“Public APIs are forever: Only one chance to get it right”?
In an OS book I just read that, “Public APIs are forever: Only one chance to get it right”. Is it true? Is it applicable only in APIs of Operating Systems or other APIs too? For example, will this be true for the APIs of Android Applications such as Tasker, Locale and Pushover?
How to optimize calls to multiple APIs at once and return as one set?
I have a web app that searches across 2 APIs right now. I have my own Restful web service that I call, and it does all the work on the backend to asynchronously call the 2 APIs and concatenate them into one result set for my web app to use.
Using natural language grammar in fluent API
I’m tinkering with a query abstraction over WebSQL/Phonegap Database API, and I find myself both drawn to, and doubtful of, defining a fluent API that mimics the use of natural English language grammar.
Managing Alerts in Web Application Using RESTful API
I have designed a RESTful API and I am now working on creating a web application to use the service.
Testing a REST client against a REST Server. How to do fixtures?
When writing unit tests, it’s common to use fixtures: little testable data, so we can say:
1. Get all clients should include Willy Wonka.
2. Delete client 3, and now get clients should not include Willy Wonka anymore.
Designing a loosely coupled app -> stored proc interface for PostgreSQL. A couple of questions
I am in the middle of designing a next generation database access class for one of the programs I am building. We use PostgreSQL exclusively.
Would it be possible to publish my code on an official site with a third-party library?
I’m building a rather large and extensive wrapper in Delphi for an email system called Mandrill. There are wrappers for this API in many other languages, but not for Delphi. So, I’m hoping to produce the first full wrapper. The problem is, I’m utilizing a third-party JSON parser called superobject. I’m afraid that if I complete this wrapper, I won’t be able to provide my code for Mandrill to share, because of this third-party library.
Joda Time vs Java Time
Although Joda is feature rich and more sophisticated than standard Java time, it may not always be the best thing to use. How do I decide if I should use Joda Time or Java Time in any Java code?
How to count hits in an HTTP API without bogging down the DB
I’m building an API and want to count hits for each user. It’s a HTTP API implemented in Python. I could keep the count in a database (using PostGreSQL) but it’ll be a very busy API, so I don’t want the overhead in the DB. I’m looking at Redis or just writing plain text logs. But is there a better approach?