On a slow news day Obama knows how to get our attention. He declared a recent act of Congress, the Defense of Marriage Act, unconstitutional. He distracts the newsie's attention from his weirdo responses to Egypt and Libya by bringing up a hot button topic, (a wedge issue) that his left wing base will love, and perhaps the independents will not be offended by.
As a matter of process, Obama is way out in left field by declaring an act of Congress to be un constitutional all. The standard procedure is to propose new legislation to Congress, rather than declaring existing legislation unconstitutional.
As a practical matter, Obama will solidify his left liberal base, attract a lot of press coverage, and outrage the Republicans. Where the vast mass of independents really stands is unknown, clearly Obama thinks this will rally them to his banner. I hope he is wrong but you never know, Obama was clever enough to get elected president, so you cannot write him off as a dunderhead.