What is a Headless CMS?

2019.04.06 17:43

졸리운_곰 조회 수:106

What is a Headless CMS?

Have you heard this term going around? It's quite in vogue. It's very related to The Big Conversation™ on the web the last many years. How are we going to handle bringing Our Stuff™ all these different devices/screens/inputs.

Responsive design says "let's let our design and media accommodate as much variation in screens as possible."

Progressive enhancement says "let's make the functionality of this site work no matter what."

Designing for accessibility says "let's ensure everyone can use this regardless of their capabilities as a person."

A headless CMS says "let's not tie our data to any one way of doing things."

 

#A "regular" CMS gives us three things

  1. A way to store data
  2. CRUD UI
  3. Ways to display the data

#A "headless" CMS only shares the first two

  1. A way to store data
  2. CRUD UI
  3. An API to the data

The "head" (that we are chopping off! eww!) is the display or "view" part of a CMS.

#TL;DR graphic

#Tech comparison

Perhaps in a regular CMS, the only way to get at the stored data is functions it provides. Like:

<?php MyCoolCMS->get_post_data(12); ?>

<h1>
  <?php echo post_title(); ?>
</h1>

<?php echo post_contents(); ?>

If you want at that data, the only way in is using the functions it provides. You could probably write a view that outputs like an API. Or you could write queries into the data storage to get what you want. But those things aren't "first class citizens" of the CMS.

In a headless CMS, access to that data would be a URL endpoint like:

https://api.our-stuff.com/posts?id=12

Which would spit out:

[
  {
    id: 12,
    title: "Post Title",
    authorName: "Chris Coyier",
    dateCreated: "2007-07-03 10:42:02",
    postContent: "<p>A long time ago...</p>"
  }
]

Or something like that.

The URL structure and query params and all that would be up to the CMS and in all likelihood be "RESTful". I'm not qualified to give advice there, but it's a pretty easy thing to web search and read about, as well as look at reference implementations.

#You don't even know what the next THING is.

Maybe it's a little implant in your wrist that projects a screen onto your forearm. It's super popular. Everyone is getting one. The company that makes it allows people to write apps for it, but it doesn't have a web browser. It's got network access though.

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

So now, if you wanted to, you could use whatever system they have set up to write an app, use the network access, and get your data over to it to use.

You didn't have to know this new thing was coming along, your data is already ready-to-travel.

#Just because it's an API doesn't mean the views using it are client side

Oh great, more sites that only work with JavaScript.

Nah. Server side code can read and digest data from an API just as well as client side code can.

#Can you use a "regular" CMS as a "headless" CMS?

Sure.

We have a tutorial on the WordPress REST API that might be of interest.

WordPress is certainly a "regular" CMS in that is absolutely has the concept of views, but it's not required that you use those views. If you wanted to digest WordPress entirely through the API, that's possible.

#Listen to a whole conversation about this

Dave Rupert, Jeff Eaton, Matt Dennewitz and I talked at length about this on ShopTalk.

#Are people actually doing this?

Yes. I've seen some implementations and hear tale of widespread usage across major publications. I'm not sure I'm cleared or qualified to explain them though.

Are any of you doing it?

 

[출처] https://css-tricks.com/what-is-a-headless-cms/

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
818 basic lite coin (cryptocurrency) 구현 implementation Naivecoin file 졸리운_곰 2019.05.09 109
817 실시간 서비스 경험기(배달운영시스템) file 졸리운_곰 2019.05.06 149
816 구름(Cloud)을 가장자리(Edge)로 내몰다, 엣지 컴퓨팅 file 졸리운_곰 2019.05.04 119
815 엣지 컴퓨팅, 클라우드 컴퓨팅 시대의 새 장(場) 열다 file 졸리운_곰 2019.05.04 170
814 엣지 컴퓨팅(Edge Computing) 이란? file 졸리운_곰 2019.05.04 151
813 openblockchains/awesome-blockchains file 졸리운_곰 2019.05.04 389
812 프로젝트가 장난이야?! file 졸리운_곰 2019.05.01 149
811 스마트시대_개발자로살아남기.pdf file 졸리운_곰 2019.05.01 158
810 [심심할 때 읽는 프로젝트 이야기 PDF] 소책자 file 졸리운_곰 2019.05.01 122
809 프로젝트이야기 2: 빅데이터를 이용한 경로탐색정보 분석 file 졸리운_곰 2019.05.01 140
808 프로젝트 명 : 부가서비스 관리 시스템 개선 졸리운_곰 2019.05.01 124
807 물류관리사 하는일 & 연봉 알아보기 file 졸리운_곰 2019.04.08 997
806 [ERR] Timed out after 1m0s: health check never passed.#1119 졸리운_곰 2019.04.07 116
805 단숨에 Go언어(Golang) 배우기 file 졸리운_곰 2019.04.06 179
804 GraphQL 이란? file 졸리운_곰 2019.04.06 120
803 GraphQL과 RESTful API file 졸리운_곰 2019.04.06 128
» What is a Headless CMS? file 졸리운_곰 2019.04.06 106
801 빅데이터 예측 분석 위한 6가지 핵심 기술 졸리운_곰 2019.04.03 125
800 "빅데이터의 핵심은 시각화와 예측 분석이다" 팁코 file 졸리운_곰 2019.04.03 119
799 안드로이드 마메 실행법 file 졸리운_곰 2019.03.30 642
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED