Well, it depends what points of comparison you use.
Obama – Former Civil Rights Attorney, Constitutional Law Professor, State Senator, and U.S. Senator.
Trump – Former Real Estate Developer and Reality TV Show Host.
Obama – Consistently Presidential.
Trump – Consistently Un-presidential to a significant degree, in the opinion of everyone aside from his most blindly dedicated followers.
Obama – At least as honest as most politicians.
Trump – Extremely dishonest; given to spreading conspiracy theories and, ironically, to believing fake news (i.e. that “Obama wiretapped him”) while decrying “fake news” (any news that makes Trump look bad).
The chart below shows the percentage of untrue statements made by various candidates and elected politicians – with Trump coming in first (least honest) and Obama coming in last (most honest) – based on empirical fact-checking.
Obama – Consistently pleasant, kind and balanced. Rarely displayed strong emotion.
Trump – Consistently immature, dramatic in multiple venues, including Twitter.
SCANDALS – First 100 Days
Obama: Zero. (This continued for his two full terms in office.)
Trump: Russian election collusion, white supremacist chief of staff, the Russian-prostitute pee report, the income tax thing, the nepotism debate, the business-blind-trust thing, the anti-Semitism, the tweets, accusing a former president of a felony, the Angela Merkel handshake, the golf, the Mar-a-Lago trips, the Senate investigation, the House investigation, Jeff Sessions and the Russians, Carter Page and the Russians, Jared Kushner and the Russians, Michael Flynn and the Russians, Rex Tillerson and the Russians.
VOTES – Year -Electoral / Popular
2008 – 365 / +9,550,193
2012 – 332 / +4,982,291
2016 – 305 / −2,864,974
Obama won both his presidential elections with significant electoral and popular leads. Trump won with a significant electoral win, but lost the popular vote by almost three million votes.
LEGISLATION – First 100 Days
Obama: His first piece of legislation was the Lilly Ledbetter Act, requiring equal pay regardless of age, race or gender.
During his first month in office, he signed the American Recovery and Reinvestment Act—the stimulus package credited with saving the economy of the entire world.
The act also increased education funding by $100 billion, lowered taxes for the middle class, created programs for low-income workers, reined in Wall Street and provided $105 billion for infrastructure.
He signed legislation to end the wars in Afghanistan and Iraq.
Trump: He tried to repeal and replace Obamacare, but that failed miserably.
He allowed internet companies to sell your personal information.
He signed a law that made it easier for mentally ill people to buy guns.
He cut Planned Parenthood funding.
Approval Ratings – First 100 Days
Obama: 65 percent
Trump: 41 percent
So – how can one say that Barack Obama was a better president than Donald Trump?
A combination of facts with near-universal opinion (i.e. regarding presidential conduct) works well.