All teen comedies owe some debt to John Hughes and Amy Heckerling.

The milieu of suburban teenage life that they explored decades ago has defined the genre since. The social divisions, the boredom, the dances, the irrepressible awkwardness and the irrational dreaminess of high school students never before seemed so accessible, and so neatly packaged with a perfect soundtrack — even if their scope was rather limited to a particular set of middle class students.

It’s no surprise that we continue to tell slightly different variations of the same story. There are still outcasts and bullies and war stories to be told from the halls of suburban high schools, and every generation deserves its own silly teenage misfit story. While it’s neither as biting as “Mean Girls” nor as sweetly referential as “Easy A,” the earnest and sometimes amusing “The DUFF” is a fine addition to the canon.

In the film, Mae Whitman stars as Bianca, an overall-wearing overachiever who’s just trying to navigate her senior year alongside her two best friends Jess (Skyler Samuels) and Casey (Bianca A. Santos).

But their dynamic is not equal, the handsome, popular and sweetly dim-witted football player Wesley (Robbie Amell) bluntly informs Bianca at a party. Bianca, he explains, is the Designated Ugly Fat Friend (aka “The DUFF”) of the group. She’s the one who goes unnoticed till someone wants to gain access to her comparably more beautiful friends.

This revelation causes Bianca to take off on her own, unfriending her longtime pals (in the only way that contemporary kids might know how — on every last social media site) and convincing Wesley to help her break out of DUFF prison.

On its face, with the popular guy teaching the misfit girl how to fit in, it’s like “Can’t Buy Me Love” in reverse. Or “Some Kind of Wonderful” in reverse. Or even “She’s All That,” but without the bet.

But then director Ari Sandel takes a modern turn. In “Mean Girls,” chaos ensues when the queen bee makes hard copies of the secret-filled and reputation destroying “burn book.” Here, Wesley’s vindictive on-again, off-again girlfriend Madison (Bella Thorne, taking her “Alexander and the Terrible, Horrible, No Good, Very Bad Day” brat to the next level) just has to press send on an embarrassing video.

The act of digital aggression spreads rapidly throughout a school hungry for someone else to laugh at, and Bianca becomes even more of a social pariah.

In some ways, “The DUFF” is an up-to-the-minute and empowering version of the stories we know all too well. Bianca doesn’t want or need to be popular in the classic sense. She just wants to be treated as her own person. And while Wesley might help her find more flattering clothes and bras, his main goal isn’t to assimilate, it’s to make Bianca more comfortable in her own skin.

Whitman, who cut her teeth on “Arrested Development” as the “homely” Ann Veal, stole scenes in “Scott Pilgrim vs. the World,” and gained more mainstream recognition on the television show “Parenthood,” is a star comedienne. Pint-sized and porcelain-skinned, she uses her unabashed physicality and expressive, Elizabeth Taylor-like eyebrows to ultimate effect, even if it takes a stretch of the imagination to accept the fact that this girl might be overlooked or deemed ugly in a social setting.

Amell, meanwhile, uses his symmetrical CW good looks (“The Flash” and “The Tomorrow People”) well in a difficult role. His easy chemistry with Whitman carries the movie.

With a supporting cast that includes Allison Janney (a bit wasted here), it’s Ken Jeong who stands out. Jeong, who has made a sort of cottage industry for himself playing twisted characters in already deviant comedies, tones it down a notch here as an affable, goofy editor at the school paper.

While “The DUFF” whiffs on the comedy front more often than it succeeds and is likely not destined to become the “Sixteen Candles” for a new generation, it is eminently watchable and even a bit touching. It takes a special kind of movie to nail a revelatory dance scene. On that front, “The DUFF” and its leads pass with flying colors.