Though frequently treated and described as a vegan gelatin substitute in other parts of the world, win (วุ้น) or agar (also "agar agar") is used to make snacks/desserts throughout East and Southeast Asia where people—let me know if I'm wrong on this—consume, because they like it, not because they want to eat JELL-O but have to settle for something similar.
Agar is not a gelatin wannabe; it is an ingredient in its own right. The two aren't interchangeable. And when it comes to this classic application, my mind can't even grasp the thought of replacing agar with gelatin.
The substance, derived from algae, works in a similar manner as gelatin but results in jelly desserts with less flexible and more brittle texture than JELL-O. And that's the texture that is sought after in this dessert.
One thing to keep in mind when working with agar is that it needs to be brought to the boiling point along with the liquid which it's supposed to gel. Gelatin can dissolve and be activated at a lower temperature. This means you can activate gelatin powder just by dissolving it in hot water. Not so with agar.
You need to boil the mixture for at least half a minute -- more if you deal with a larger amount of liquid and agar -- in order to get the agar ready for work. The agar powder may look like it instantly dissolves into the liquid the moment you whisk it in and you may not notice any grittiness, but do not let that fool you. Agar sets much more easily and quickly than gelatin, but it is imperative that you prepare it properly.
But the good news is that unset or poorly-set agar can be remelted to get the agar working again.
Telephone brand is the most common brand of agar powder in the US market; it's also, from my experience, the most reliable. You should not have trouble finding it at well-stocked Asian market, especially one that specializes in Southeast Asian ingredients.
Beginners, don't let the multiple-layer design intimidate you; this is easier to do than it looks. In fact, mine isn't anywhere near as elaborate as some agar desserts which you see in Asia. For those who make this for the first time, you may want to start off with just one layer of coffee and one layer of coconut. Once you feel like you have gotten the hang of it, you can be as creative with your design as you want. Some people like to make a large pan of it then cut it into simple squares or cute different shapes with assorted cookie cutters. Some like to use smaller, bite-sized molds.
To alternate layers, just wait until the previous layer has set not firmly but just until its surface has developed some resistance. If the previous layer has set too hard, the two layers won't stick together and become separate when serving. if the previous layer is not set well enough, the two colors blend together and you won't get the desired design. To solve the former problem, you can either pop the mold into the microwave (the oven or steamer, if your mold is made of metal) and reheat it using the lowest heat just to get the surface of the previous layer jiggly again. As for the latter problem, there's no solution, you just have to tell people that you did that on purpose, that you were going for the café au lait (de noix de coco, in this case) look.
In the course of alternating layers and waiting for one to set before pouring another on top, the prepared agar mixture may thicken too much and become difficult to pour from the pot. If that happens, simply put the pot back on the stove just to get the liquid flow easily again.
Regardless of whatever mold(s) or design you use, make sure that the end result has between 30-50% of the coconut layer in it. When you look at the recipe, you'll realize that the coconut layer is salted whereas the coffee layer is not. This is based on the assumption that both layers are represented in each bite with the coconut layer providing the mild saltiness that complements the sweet (and ever so slightly bitter) coffee layer. You can be creative with the layering design, but be sure to keep the proper ratio in mind.