Relative Content

Tag Archive for api-design

Node.js API Architecture

I am currently working on a web app and want to design the interface between nodejs / mongoose and the backbone app.

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?

C++ library API: new or getters?

I’m writing a C++ wrapper for my C library (my C++ skills are a bit rusty) and I’m wondering what’s preferable: allowing user to construct objects themselves or give them objects via getters?