Decimoseptimo
Decimoseptimo

Reputation: 103

Is strapi suited to serve html, or to be used as a traditional mvc web framework?

What's my understanding of strapi? It's based the koa framework (I read its docs, still unsure what can be done with it), it has routing, it has and admin panel, includes basics like users & permissions, it can generate code, that code includes models and controllers, ultimately it returns data to consume.

But, I'm supposed to use it as a backend framework to generate html code and run business logic? things for that you'd normally use a web framework like say laravel, sails... All in all it's advertised as "halfway between a node framework ...".

Has anyone done this?

Upvotes: 1

Views: 1371

Answers (1)

Maciej
Maciej

Reputation: 126

I'm testing Strapi.io myself right now so I'll try to answer this question the best way I can.

As you could read Strapi is a headless CMF (Content Managment Framework), where you can create your whole app with API-first approach, model this API with comfortable plugin inside admin panel and manage data both inside and on the framework agnostic client side with help of REST/GraphQL operations. Of course you can handle views inside Strapi, but most of examples in their repo are made with separation in mind. So you handle M and C in Strapi app and create V with whatever you like that can connect to this backend.

For example - I created Strapi app inside /server and implemented Next.js connected by Strapi Javascript SDK in /client directory. SDK is helpful for authentication with JWT on client side and CRUD operations. Vue + Nuxt.js official example (deliveroo clone) by Pierre Burgy is build like that.

On backend (Strapi) you can create plugins that will add new APIs and shape the admin experience. You can create Wordpress panel with it if you want, backed up by React, Svetle etc. on client side.

Upvotes: 1

Related Questions