OAFC_Rob Posted May 12, 2011 Share Posted May 12, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/236238-cms-design-development/ Share on other sites More sharing options...
pornophobic Posted May 18, 2011 Share Posted May 18, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/236238-cms-design-development/#findComment-1216947 Share on other sites More sharing options...
OAFC_Rob Posted May 19, 2011 Author Share Posted May 19, 2011 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... Quote Link to comment https://forums.phpfreaks.com/topic/236238-cms-design-development/#findComment-1217527 Share on other sites More sharing options...
pornophobic Posted May 19, 2011 Share Posted May 19, 2011 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.) Quote Link to comment https://forums.phpfreaks.com/topic/236238-cms-design-development/#findComment-1217560 Share on other sites More sharing options...
OAFC_Rob Posted May 24, 2011 Author Share Posted May 24, 2011 Yes that would be brilliant, i'm always looking to learn and develop my skills further, still looking for a Junior Developer role since graduating Quote Link to comment https://forums.phpfreaks.com/topic/236238-cms-design-development/#findComment-1219472 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.