One of the most important aspects of writing music correctly in various styles is to understand phrasing for a particular style. The basics of music phrasing remain the same across all styles, but special phrasing considerations need to be taken into account to achieve the desired sound of the style you are working with. An good example is swing music phrasing. Here a special consideration is applied to phrasing. While the rhythm section (bass, drums, piano, guitar) will be landing on the downbeat of chords, the "horns" will typically "push" (anticipate) the downbeats in their phrasing. Without this particular type of phrasing applied, this style of music will not sound accurate.
Singing Your Phrases
The best approach to begin phrasing your music is to "sing" it, whether out loud or in your head. Listen to how you phrase your music naturally, then notate that along with your articulations. Pay attention to the length of notes sounded. Are they held out or are they short? Which are connected?
Breathing & Non-Breathing Instrument Considerations
I like to break all instruments down into these two categories. Instruments that use the player's air to create sound (breathing) and instruments that do not (non-breathing). Guitars, percussion, keyboards and string instruments can sustain notes and play continuously without the need for the player to take a breath now and then. These are what I call non-breathing instruments. Brass & woodwind (trumpets, trombones, saxes, flutes, etc.) instruments must have places within their phrasing for the player to take a breath as these instruments use the player's air to create their sound (breathing). Your phrasing must ALWAYS take this into consideration when writing for these two types of instruments.
Watch that you don't end up writing phrases that have all connected notes in them. In ballad phrasing, this can happen very easily. Instead of all whole and half notes connected, it is best if we break them up a bit with some rests and shorter duration notes.
Special consideration on melodic phrasing in jazz include typically adding an accent when a note is anticipated, when an 8th note is followed by a rest it is typically short of staccato, and if an 8th note precedes that 8th note followed by a rest this 8th note is typically long and market with a legato.
Also remember in jazz writing, the melody will typically be using the harmony of the next chord played on the downbeat by the rhythm section when the primary beats (1 & 3) are anticipated. Even though it is sounding on the 8th note before the chord is played by the rhythm section. Example, if we look at the last two 8th notes above, we see A and D. If the chord in the next measure on the downbeat for the rhythm section is Dmin7, in jazz writing, we would use Dmin7 to harmonize the D since it would anticipate the Dmin7 played by the rhythm section on the downbeat of the next bar. This is something unique primarily to jazz and the fact that the 8th notes in this style would be swung instead of played straight as in other styles of music.
Where to Go From Here
Proper phrasing of your music is critical to your success when writing music. I could write volumes on the subject and you could read volumes, but NOTHING will help you master phrasing better or faster than just getting out there, doing it, making mistakes, and correcting them. Phrasing includes the use of note durations, articulations, dynamics, tempo, time signatures, rhythms, instrument considerations and style considerations. Always "sing" your phrases and write them down using everything mentioned in the previous sentence to accurately indicate how you want the phrase played.