mvc and template #595
-
Note: consider using Discussions to open a conversation about new features…🚀 Feature Request |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @tslxxcxy In contrast, the API project template is streamlined for building RESTful APIs only, without view rendering or UI scaffolding. Use it when your application is purely backend and will be consumed by clients like SPAs, mobile apps, or other services. Choose MVC when:
Choose API when:
In summary, the MVC template is meant for full-featured web apps with UI, and the API template for backend-only services. Personally, I often choose the API Project template for my closed source projects built with BlackSheep because usually I build front-end SPAs using Vue.js and TypeScript (I don't care about server side HTML rendering). The API template can be used to serve static files, if desired. |
Beta Was this translation helpful? Give feedback.
Hi @tslxxcxy
The MVC project template is ideal when you want to build web applications that can serve both dynamic HTML pages and APIs. It provides a folder structure ready for controllers, views (using Jinja templates by default, and allowing alternative solutions), and serving static files, making it easier to implement server-side rendered websites.
In contrast, the API project template is streamlined for building RESTful APIs only, without view rendering or UI scaffolding. Use it when your application is purely backend and will be consumed by clients like SPAs, mobile apps, or other services.
Choose MVC when: