The honorable thing to do is to declare war several turns before the units engage in combat. That is how the game is supposed to work. Anything else is a surprise attack, which must be carried out well in order to avoid the diplo penalty. Makes sense to me.
Yea, I actually wish a DOW took one turn to go into effect so "sneak attacks" weren't part of the game. First of all, it's too easily exploited -- I can wait to declare war on the turn where my enemy's Composite Bowman just happens to be in a hex where I can kill it in one turn. Second of all, the fact that an AI can DOW me and attack after any of my turns means that if I have a hostile neighbor, I feel obliged to micromanage my units to be in optimal defensive positions every turn, even when at peace, which is just fiddly.
On topic, generally speaking, I love this mechanic. The first time post-expansion an AI said "we are concerned about your troops massing outside our borders" and gave me the option "you are right to be concerned, and it's time for you to die (DECLARE WAR)", I giggled with glee! You caught me, and called me out! I was going to spend a couple more turns optimally positioning my invasion force, but, fair play! Let's do this!
I certainly agree with making the promise more transparent and possibly lowering the duration to 30 turns if it's actually longer than that. (The facts aren't in.) One cool improvement would be a decaying diplo penalty. So if you break the promise and DOW one turn later, you get the full global diplo hit. If you DOW 25 turns after the promise, you get half the diplo hit. If you DOW 49 turns later, you get 2% of the diplo hit.
Also, some people here take the Civ 5 diplomacy model a little bit too seriously. When they get a diplo hit for something, they react like a scolded child whose mommy is very disappointed with them. "Bu... but... Napoleon told me I was a bad boy! I have to see those scarlet letters about breaking my promise every time I ask him to trade luxuries! It's not fair!" It's just a diplo hit! It's not even a happiness penalty or anything that affects your civ directly.
The Civ 5 diplomacy AI system still has a lot of flaws and shortcomings (the major ones IMO being the lack of any "casus belli" system and the lack of reciprocity in some demand options), but finally after two expansions and major patches, it's the best the series has ever had.