Objects and Libraries

Goals

When we import the Tinkerforge Device Manager in our HTML file, we automatically get access to a global variable called tf (short for Tinkerforge). This variable stores a reference to the Tinkerforge Device Manager (TDM) object and all its functionality. The TDM object is part of an external library that we import into our application and that gives us additional functionality for our app. This functionality comes as a set of functions to deal with Tinkerforge devices. If we didn't have the external library, we would have to implement the functionality ourselves, and therefore re-invent the wheel. In programming, we want to avoid re-inventing an existing functionality at all costs.

How do we find external libraries?

There are different ways to find out whether a functionality was already implemented by someone else. The simplest is to use Google and search for terms that describe what we need. Depending on the programming language we use, there are platforms that bundle external libraries so that they are easier to find.

How do we know what an object can do?

Last updated

Was this helpful?