Since you're interested in generic ways to connect devices to Alexa, I'll explain the two main methods that devices use when integrating with the Echo platform.
Skills
Most of the devices that have 'first-class' integration with Alexa have a custom skill. For example, the Belkin Wemo has a skill, and so does the TP-Link device you link to in the question.
Generally, you'd use a smart home skill when developing this for a custom product. This type of skill can respond to things like:
- “turn off the living room lights”
- “increase the temperature by two degrees”
- “dim the living room lights to 20%”
If the smart home skill type doesn't give enough flexibility, custom skills can be made to respond to pretty much anything.
Connector Services
Some devices don't have an Alexa skill, but can instead be set up using IFTTT. At its simplest, a smart device could be invoked by sending a HTTP request through the Maker channel, and your smart plug could run a trivially simple web server to listen and respond to that. Some devices already have pre-made channels so that you can use IFTTT like 'glue' between Alexa and your device.
You might also consider connecting to another smart home platform, like SmartThings, which has its own hub. With that, you can connect to devices that support ZigBee and Z-Wave, which might end up saving money on the device (typically, ZigBee is less expensive to implement than Wi-Fi in many use cases). I found a SmartThings plug which uses ZigBee—this would have to be connected through a SmartThings hub, because Alexa doesn't 'speak' ZigBee directly.
If you were interested in developing a smart plug yourself (which probably is not a good idea if you're trying to save money...), you'd need at the very least:
- some way of connecting to a network (either ZigBee/Z-Wave + a hub, or Wi-Fi)
- logic on the smart plug to respond to a request to turn on/off (this could potentially be a basic web server, if you were able to secure it, or perhaps implementing a known protocol and connecting to a smart hub so that the hub could control it)
- a connector service or a skill to send requests from Alexa.
If you think that sounds like a lot of work, you're right—a pre-made solution will likely be more secure, easier and less cost in the end; the economies of scale make it much easier for a large manufacturer to develop a product than a single home plug.
(Plus, I wouldn't entirely trust myself not to wire things wrong and electrocute myself! Whatever you do, be safe.)
If you've found a 'smart' device that connects to a network, but doesn't integrate with Alexa, see if you can connect it through either a connector service, or read their documentation and try to implement a skill yourself, if the device has an API that would support it.