#1327
Answered
11/1/23, 4:11 PM
Dragon1992
Answers: 1

MVC Page metadata stored in a database

Hi again! :-)

I am studying PHP Jet more and more ...

And as I'm starting to understand the principles, I thought it would be cool to make my own CMS based on Jet.

Is it possible to store metadata about a site in a database? I understand the factory system... I understand that I can create my own class for defining pages. But can I store the pages in the database?

Thanks!

Answers (1)

#11
11/2/23, 10:36 AM
PHPJetTeam
1

Welcome back :-)

Yes, it's possible. And I'll let you in on a secret: in "ancient: versions of the PHP Jet framework, it was ;-)

But in general, it's a good idea to avoid using a database wherever possible. It's the bottleneck of online applications.

However, I have an idea for you how it could be done.

  • Entities stored in a database for management within the CMS. This is convenient and you can use the full power of the CMS to do it. Entities would use the same mechanisms as MVC_Page and could be used for content previews.

  • Existing MVC_Page entities and a build mechanism for published content.

Do you see where I'm going with this?

But yes, that would be a bit more implementation intensive, but it's possible.

If you don't mind more database usage, then there's nothing stopping you from creating entities with ORM.

Good luck and have a nice day!

Your Answer