CAPE MAY, N.J.—New Jersey is the punchline of many jokes, with opinion polls confirming that the Garden State has the most negative reputation of any state in the nation. This ranking is deserved in some respects, at least when assessing the dismal condition of the built environment in many parts of the state. Much of the metropolitan landscape of New Jersey, particularly in the northern suburbs of New York City, is marred by a combination of industrial blight, suburban sprawl, and traffic-choked highways—the gritty scenery seen in the opening titles of the hit HBO series The Sopranos. But there is another part of the state with many towns that are models for good urban form, and perhaps for long-term conservation efforts as well.

For years, the New Jersey coastline has had an undeserved reputation for being a somewhat downmarket series of beach towns past their prime. The hedonism of the MTV reality TV series Jersey Shore, which only ran from 2009 to 2013, undoubtedly did much to reinforce this stereotype, and the last few decades of boom-and-bust casino development in Atlantic City hasn’t helped the region’s image, either. Yet along the 100-plus miles of coastline, stretching from the Lower New York Bay and Sandy Hook to the mouth of the Delaware River, there are many places that realize the central ideals of great urbanism—including walkability, vernacular architecture, preservation, and authentic sustainability.

The area’s prospects for success were secured by a combination of fortunate historical timing and favorable geography. The shore towns were some of the first resort destinations designed for the masses, in this case the burgeoning populations of nearby Philadelphia and New York. Passenger rail service from the big cities, which began as early as the 1850s and expanded for the rest of the 19th century, made rapid development possible all along the Jersey coastline. Ever faster trains allowed daytrippers of more modest means to visit the seashore, making the beach towns a playground for more than the wealthy classes who could afford upmarket hotels or second homes. At the same time, many religious leaders established summer encampments for their congregations, with at least one of these communities, Ocean Grove, still maintaining its explicitly Christian identity.

When tourists or pilgrims arrived, whether they were staying overnight or not, they found themselves in relatively compact, walkable settlements. Most hotels and beachfront amenities were an easy walk from the station, and in some cases, such as in Cape May, local interurban rail routes enabled travelers to reach smaller adjacent towns and villages. Further, the sites of many of the settlements, which were built on narrow barrier islands, limited development to a fixed area. This geography created an incentive, even in a pre-automobile area, to use the available land carefully. This physical reality holds today—near the shore, there is far less of the strip-mall sprawl that now litters the mainland along the Garden State Parkway.

The 1950s-era turnpike that now brings both vacationers and residents “down the shore” does not enter the historic districts, which means that unlike so many other pre-war urban neighborhoods torn apart by freeways, the original human scale of old shore towns remains largely intact. The dawn of the jet age and expansion of the interstate highway system in the 1960s also meant that many Philadelphians and New Yorkers were able to travel much further afield than the Jersey shore for their holidays. This initially resulted in some decline, but the slowed growth also indirectly contributed to preserving the late 19th and early 20th-century streetscape, now celebrated for its beauty and practicality. Cape May, for example, boasts the largest concentration of intact Victorian homes outside of San Francisco.

In most of these shore towns, there are relatively few superblocks, with small lots and alleys still dominant. Cape May has the abundance of restaurants and touristy boutiques one expects to find, but a practical supermarket sits almost at the center of town, and national-chain businesses are rare, at least downtown. Driving the narrow streets to find parking is difficult enough that many people seem to abandon their cars while they are here, walking between their accommodations, the beach, and shops. A three-block pedestrian mall, an idea tried and discredited in many other American downtowns, survives and appears to be prospering, at least in the summer.

This seasonal ebb and flow of residents has caused some to suggest these shore towns are not real places, and that any of the admirable characteristics of the townscape here are a kind of “dollhouse urbanism”—a series of charming facades where most the time nobody is actually home. While most of these places have always been summer resort towns, it’s true that the portion of full-time residents in many of them is lower than ever before. With renewed prosperity, there is also the rising sense that gentrification will make some shore towns accessible to only the rich. One former regular in the small hamlet of Avalon recently complained in the New York Times that a beloved deli had recently been replaced by seasonal outlets of high-end national fashion chains.

The solution to this demand is of course is to build more walkable urban places near the Jersey Shore, creating additional opportunities for the small-scale Main Street businesses that have long had a place on the streets here. Regional authorities should also aim to improve transportation options between shore towns and the major metropolitan areas of New York and Philadelphia. New Jersey Transit trains still serve some of the northern portion of the shoreline, and another regional train departs Philadelphia for Atlantic City about a dozen times a day. The trains are relatively slow, though, mostly running over very old infrastructure. New investment and restoration of service along the shore could spur development and the return of full-time residents as these cities are better connected to major job centers.

Revitalizing infrastructure would also once again make a car-free vacation or even day trip to the beach a more appealing prospect for the tens of millions who live nearby. If governments are serious about trying to reduce private vehicle and aircraft emissions, creating alternative transportation options to reach local resorts should be a priority. Notwithstanding sea-level rise, perhaps a low-carbon future can still include an occasional day at the beach.

With its settlement driven by a strange combination of Robber Baron-era capitalism and Great Awakening-style religious revivalism, the Jersey Shore was birthed by strange bedfellows. Yet these forces created communities that still are remarkably functional, enjoyable, and beautiful places to reside and play. Urbanists, preservationists, and real-estate developers often focus on places such as New York and Philadelphia. They may also have a lot to learn from the nearby Jersey Shore.

Lewis McCrary is executive editor of The American Conservative.