Floodgates in front of a window is genius, except that building destroyers can and will destroy both the floodgate and the window if given the opportunity, as evidenced in the epic of Battlefailed. To prevent this, try building them one floor above the ground so that ground monsters can't get to it...
Though this still begs the question what one will do if attempting to keep out flying monsters and demons though. In that case... well, I can't really think of a way to make a window an actually practical thing to have at that point, you might as well just make a solid glass wall and call it a window. Perhaps if one were to build a box like this...
|
===
XBB|
===
|
X = Window
B = Retractable bridge
= / | = Walls
The idea would to build a high wall, probably in a cave, and then create a window that would look down onto the caverns below. Just retract the bridge once something big and scary shows up, and bam, your vantage point is now both covered and impervious to building destruction (it is apparently impossible for a building destroyer to destroy a bridge that is directly above or below them... which is where they would need to be in order to destroy such a bridge. Actually... if one were to remove the window, this design would make for an extremely defensible archer tower. Maybe I'll use this myself! I like threads like this because they make me think up all this cool new shit <3