Jump to content

Recommended Posts

hi,

 

i'm in the process of making a bespoke CMS system, orginally I was going to have it so the user input the data in a text editor and then clicked a button or link which would save that data to the database. It was a good workable solution with major draw in for SEO.

 

However today i have just learnt about "fopen", which I'm think could be even better because it would allow the user to write the content click save and then a page can be generated and saved to the server meaning actual pages which is better for SEO.

 

So my question is which method would be better in the short term and long term?

 

Also which do you think is easier to implement?

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/236238-cms-design-development/
Share on other sites

With using actual pages, or caching HTML as it is essentially you take up disk space that your users (assuming you are redistributing this script) might not have or want to take up. You can easily make it appear to be a page with .htaccess and rewrite rules if you are pulling it from a database.

 

It really is up to you which method you want to use. Personally, I find that a database for storing data is the best way to go. That way, if you have to make any changes to a page you just need to edit that page instead of opening the file, rewriting it and saving it again. If your server is at a high load time, HTML caching would be the way to go since it is less load on the web server (Apache, etc) to serve to the client, but if it's a low load time just stick with the database backend. If you start to need caching you could add in dynamic caching later. That is pulling information from the database and writing it to HTML files when changes are made/page is created.

As a best practice idea, it would ideal to save information in a database even if you are using files for serving. This way if something happens with a file, which can happen you don't need to search through all your files and find the one with the issue, just delete it and recreate it from your database.

Thanks you for your response, I believe I'm going to go with fopen for this CMS, as it will help demostrate a different method of doing it for my CV which is good. However, for future projects I think im going to do a little bit more research into advantages / disadvantages etc...

Thanks you for your response, I believe I'm going to go with fopen for this CMS, as it will help demostrate a different method of doing it for my CV which is good. However, for future projects I think im going to do a little bit more research into advantages / disadvantages etc...

 

That sounds good. If you'd like some resources that I've used I'd be more than glad. (I don't mean php.net, I mean tools, etc. for benchmarking etc.)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.