Вопрос

I am building a website, newfutureuniversity.org, and I'm not sure if I should rebuild it under a CMS or not. I can do procedural PHP but not OOP PHP (I could learn it if needed though). I have been struggling with this problem for some time so I decided to ask it here.

My page right now works this way: Every page has an include at the beginning and at the end, and each of them calls other includes. For example, the one on the beginning calls the 'translation.php', 'login.php', 'menu.php', etc.

Requirements

  • Code management. I'm currently using AjaXplorer. It's great, very complete and the little it cannot do the tools my host ( 000webhost ) provides suffice. The other good side is that it allows multiple users with different permissions. I need this functionality to remain.

  • Blog. I am using Chyrp for blogging since it's lightweight and accomplish my objectives for the blog bit.

  • Users. Not using any engine, just build my own in old plain PHP. Users can register, log in etc.

  • Languages. Also built my own. It allows me to translate every bit of information.

  • Wiki. Or similar. I need (not done yet) a highly personalized wiki engine for the files in the page. I am not sure yet if finding some lightweight one and personalize it or doing one myself. Also, I should include CKeditor in the wiki engine.

  • Some more future features that I still have to think about.

As you can see, I need a 'base' and different types of engines running at the same time on different directories.

Problems

If there were no problems I wouldn't be writing this question. These are the main problems I find:

  • Centralized user. The most important problem. Because I'm mixing different engines, each one uses (and even worse if I include the wiki) different user tables. I want a visitor to only need to register once, and then to be able to surf through the wiki, the blog, submit files or to do anything else with the same user name.

  • Centralized programmer. Same as the user but with the programmers I plan to add to the project. Also it should work with the permissions. Not needed, but much better if possible.

  • Style. Instead of having to manually change the engines, to have the same style by default to every one. This is probably not possible but also not really important (nor needed), just time consuming.

Therefore, these engines must be built on the same 'base' (CMS), not individually run on different directories. I was thinking about switching to Drupal for the enormous support out there or Joomla for being 'more' customizable, based in what I have read online.

Question

Will these 2 CMS (or any other you propose) keep all the requirements and solve the problems? Or are CMS modules (wiki one, blog one, etc) still build to be standalone? meaning that each one will build a different user table structure. Are there any other advantages from using a CMS?

Ideally the CMS itself would build the user tables and then the modules access them instead of creating their own. I have never worked with a CMS so I would need to learn about them but that's not a problem if it works.

Это было полезно?

Решение

CMS is NOT a framework. A CMS allows users/admins who don't have knowledge of php, html, css or any other language you might be using to change the content of your site. In some way, it should not restrict your coding. In other words, a CMS can be part of a framework, or your home-fabric piece of code. I see a response which starts with "When I was using CMS..". When you are making your site interactive in some sort, it is a CMS. You are managing the contents of your site with a form that puts some text into a database. Just like the textarea I am typing in now, I am a user that uses the CMS of stackExchange, but I'm just having less rights than the admin. But I am again using the CMS. But stackexchange is building his sites in a framework of some sort, so you can be using a framework AND implement the CMS functionality.

Also, try to understand OOP, it's hard to get into, but when you get the hang of it, it is great to use. It simplifies your code a lot. I learned it through Flash (ActionScript 3.0). I find it easier to understand the basics of OOP over there because you have direct visual output of what you are doing. It's easier than PHP-OOP since PHP and OOP aren't actually fitting together. It is a OOP look-a-like (which gets better and better every time). So try to learn OOP first.

So as a conclusion you might think that I will say build your own CMS functionality in a framework of your choice. But it's kinda hard to get into a framework AND OOP from scratch. So maybe you should build a few trial-and-error websites with very simple functionality to learn OOP and Frameworks. I am learning CakePHP as we speak and learned OOP a couple of years ago. It's kinda hard. So do it step-by-step and think about what you are trying to accomplish and what you need for that. I think this topic is a very good start.

Just for the record, every programmer who is smart, and I think you are, is using the OOP method, since you don't have to rewrite pieces of code, or have to copy-paste. When your code is good, you will have no repeating code anywhere. Which is nice when you run into a bug on 200 pages of the site and knowing you only have to change one file instead of 200. :)

Другие советы

If I were you, I would invest time in learning how to use frameworks, zend, code igniter, yii, etc. A CMS just ties your hands in terms of new layout features or simple functionality improvements.

Definitely go for PHP/OOP. You will find a lot of easy solutions to many problems you come across when using CMS, also you will improve your programming skills, which is the most important thing of all, right?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top