These are largely just different terms for the same things, but named differently to remind you of some important details. For a rectangle, we usually refer to the length and width; properly, these are the longer side and the shorter side, respectively, but that really makes no difference.
John Adams hated political parties, but he was backed by the Federalists and ran for President as a Federalist and won.   After Adams served, Thomas Jefferson, James Madison James Monroe served two terms each as members of the Democratic Republican party. By this time the Federalist Party all but disappeared.
William Henry Harrison. William Henry Harrison was the 9th President of the United States of America. Elected by the Whig party, he served as the president for one month in 1841 before dying of pneumonia. At 68, he was the oldest person elected president before Ronald Reagan in 1980, and he also served the shortest term of any president.