Benjamin H. Barton is the Helen and Charles Lockett Distinguished Professor of Law at the University of Tennessee and author of " Glass Half Full: The Decline and Rebirth of the Legal Profession " (Oxford University Press, June 2015). The opinions expressed in this commentary are his.

(CNN) The American legal profession has faced a tsunami of bad news since 2008. White-shoe, corporate law firms have faced waves of layoffs or even shuttered their doors . While the very top firms are rolling again, the 50 years of explosive growth that started in the 1960s are now a memory.

But at least corporate lawyers have had recent glory days. Solo practitioners , the largest single group of American lawyers and the heart and soul of the profession, have struggled for a quarter of a century.

Since the 1960s the IRS has collected and published income levels for all American lawyers filing as solo practitioners. In 1988, solo practitioners earned an inflation-adjusted $70,747. By 2012, earnings had fallen to $49,130, a 30% decrease in real income. And note, $49,130 is not the starting salary for these lawyers. It is the average earnings of all 354,000 lawyers who filed as solo practitioners that year.

And the bad news has just started for these lawyers, who now face new competition from online providers of legal services such as LegalZoom and Rocket Lawyer.

Law school applications have plummeted. If the current trend continues, fewer students will apply to law school in 2015-16 than enrolled in law school in 2010-11. Law schools are closing campuses merging and buying out faculty and staff

Why legal services will get better

The legal profession is facing a major retrenchment. We are now far enough from the bottom of the recession to determine that these trends are structural, not cyclical. Yet all is not lost for the American public or the legal profession. There is a glass half-full vision that has been largely ignored.

Consumers are the obvious beneficiaries. If you have enjoyed the digital revolution in music and photography, you will likewise enjoy the legal market in 10 to 20 years. Legal services will be cheaper, more accessible and better. That is bad for lawyers in the same way digital photography was bad for Kodak. It is outstanding news for the country as a whole.

This trend trickles down from cheaper corporate legal work and bubbles up from LegalZoom and other online providers of legal services for ordinary Americans.

Lawyers and legal fees are what economists call "transaction costs." When transaction costs fall, more transactions occur, and goods and services are more likely to end up with their highest-value users. When corporations pay less for lawyers, they can make their products cheaper or pass the savings on to shareholders. When more Americans have wills probate costs shrink.

The benefits will be especially marked for the poor and middle class. Study after study show that legal fees are too high for most middle- and low-income Americans, even when they face a very serious legal problem.

Even junior lawyers charge more than $200 an hour, and relatively simple matters like drafting a will or incorporating a business take 10 hours or so. As a result, many Americans cannot afford to get divorced, change child custody arrangements or defend themselves in eviction/foreclosure proceedings.

Lawyers will concentrate on important cases

Bar associations have argued for years that increased legal aid funding, required pro bono service, or a constitutional right to a free lawyer in civil cases are the answers to these problems, i.e. more individualized legal services by more lawyers.

This is an unrealistic analog, 1960s-era solution to a very serious problem. There will never be sufficient funds to pay for enough individualized legal work to meet the needs of the poor, let alone the middle class.

Fortunately, except for in-court representation, computerization is on the verge of bypassing the legal profession altogether and solving these problems. Start with the basics of American law -- statutes, regulations, and reported court decisions.

Nonprofits and government entities have put almost all of the raw materials of American law online and Google and other search engines have made that law easier to find than ever. An American with a smart phone now has more access to legal sources than most lawyers or judges did fifteen years ago.

After a wrenching period of change, the profession itself will be improved. The profession will benefit greatly as fewer students enter law school with a more realistic idea of what lawyers do and earn. The actual job of being a lawyer will also improve.

Virtually all of the legal work that is repetitive or simple -- whether corporate document review or a basic divorce -- will be automated, outsourced or handled by less expensive non-lawyers. Only the most complicated, important and interesting work will remain. As Richard Granat puts it , "lawyers will practice at the top of their license."

The best of times for corporate law firm profits has been the worst of times for the lawyers themselves.

Corporate lawyers have seen a boom in misery to go along with the rise in their pay. The changes ahead will force "alternative billing" -- meaning a flat fee for simpler work rather than a rolling hourly charge -- encouraging creativity and efficiency rather than the grind of maximizing hourly billing.

Competition from virtual law firms will allow creative lawyers flexibility in the terms and conditions of their employment, allowing some lawyers to do corporate legal work on their own schedules, rather than as part of an 80-hour work week.

The legal profession, like other knowledge work, faces significant challenges as globalization and computerization reshape the economy. This process is brutally hard for the displaced.

Nevertheless, what economists call "creative destruction" is perhaps the most important benefit to a functioning market economy. Old business models and processes are replaced with cheaper, better alternatives. Jobs are lost, skills become outdated, but progress is made.