The rhythmic placements of notes can be just as important as their pitch. Unless you’re writing a march or something compareable, avoid monotonuos rhythmic figures. Hitting every downbeat of a bar makes melodies very firm but also quickly feels static. Tieing over barlines helps alot when you want to create rhythmic variety and get away from the downbeat heavyness. Try to create interesting structures by not being too predictable with your rhythm. For instance a nice way to stay interesting is to now and then incorporate ternary rhythms (e.g. triplets) in music that is mainly binary (meaning based on 8th or 16th note structures) and vice versa. Remember that even the best melodic line can sound boring if it has an uninspired rhythm.