I and a team of other developers are going to be overhauling the design of the website that was originally put together by someone else, and I was looking for a couple of pointers on certain issues.
The current site is mostly PHP/jQuery/CSS, with each page generated from a DreamWeaver template, and an editable section in the middle, where the actual page content goes. Dreamweaver is a nightmare as it inserts huge amounts of nested markup onto the page and its expensive, so we were planning on moving away to our own simple templating system consisting of a header, footer, body and sidebar based system.
For the ajax enabled content, it's usually buttons that have a clicker assigned via jquery, which call another php script which echo's a return code when complete, and the button clicker's callback processes the return code.
There are other issues as well. There is no discernible design pattern used like MVC or similar - it's a case of PHP/JS/HTML mixed with SQL queries in the same files. Secondly, a lot of the code is dependant on one or two massive files which contains dozens of functions - these offer no benefit, only a weakness as a single syntax error in one of those files brings the whole site down. Thirdly, pages often duplicate functionality found on other pages, especially with regard to checking user session variables and performing certain mySQL queries.
Our plan is to rebuild the site using a template from themeforest for the interactive portions of the site, and then bring over the static content and restyle it slightly. However, I'm trying to weigh up the benefits of using an MVC framework like Zend or Laravel while we're doing all the other upheaval. I'm not too up to date on the what the best framework to use would be, or what benefits it would bring us.
If anyone has done anything similar, I'd love to hear how you went about it.
I have been doing websites for years, even at one point wrote a complete CMS myself in PHP, and my answer is Wordpress. That is all. Nothing compares to it, especially in how easy it is for end-users to use. Otherwise you're re-inventing the wheel. Oh and stay away from Joomla. A complete PITA.
If possible don't write your templating systme. Use a tired and tested one. I'm not sure from what you say above if you are
A: Createing a standard form say TemplateForm which you then copy and rename to use as MainForm, AboutForm etc
B: Creating a Master Template form which will host content for other forms .
You want to be using option B not A.
maybe be is trying to get some server side data and refresh just a portion of a page base on a user selection instead of the whole page.
So which is it? On one hand are you complaining about a large file with common functions and on other code duplication. Its either one or the other.
I don't agree with a single large file but in general have a single common function called multiple times is preferable.
What about the dynamic content?
What does this site do ? Any chance we could get a look ?
I attended Drupal Development Conference recently where the Drupal development community themselves admitted that it has the steepest learning curve of all PHP based CMS.
If it's devs or designers managing your content, Drupal is fine. If its Joe Soap with little or no exposure to technology, dont force Drupal on them.
For a lightweight, easy to use, easy to integrate content management system, check out Perch.
ive been developing sites for years (literally, started in 1997) and i totally agree with professore. Wordpress has a custom template system which is really easy to set up and lets you basically set up every page, section, category - whatever, differently. Very customisable and basically runs on a 'header, footer, body and sidebar based system' already. as mentioned - no point in reinventing the wheel. Plus you dont need a team of developers to maintain a wordpress site.
While I like Wordpress it is also very limited compared to Joomla or Drupal etc. Stuff that is not supported/requires much hacking on Wordpress:
- Different Widgets on different pages - Widget Scope plugin solves this issue, but its functionality that should be in Wordpress from the start
- Different sidebars to be assigned to different pages, not as simple as creating a new template and using it, requires making new sidebar templates, registering them, more messing
- Display/hide content/sidebars/widgets for various different permissions groups
- Add custom permission groups/customize permissions
- Add Custom module positons (HTML content/news items/sliders etc.) and allow the CMS to control there display. Wordpress workaround is to make a new template, which is fine, but being able to assign module positions would be more flexible.
Wordpress is great, but also limited compared to the likes of Joomla or Drupal. All the stuff I mentioned above Joomla and Drupal support out of the box/no hacking/plugins needed. I do prefare Joomla over Drupal, as was mentioned above Drupal development is quite time consuming but should definitely be considered.
I'd say a slight bit of coding to do, rather than messing to be honest. Wordpress is pretty customisable and its quite straightforward. If you need a second (or third/fourth/etc) sidebar you're going to have to make a new sidebar template(s) regardless of what cms you use. Outside of that all you need is a custom header (where you can change a lot of other parts as well if you wish).
It's very straightforward, although adding multiple sidebars, displaying on certain pages, displaying for certain groups is easier and more efficient with a modular CMS like Joomla or Drupal. I'm working on a website atm where the client want different widgets displaying on different pages (I don't like hardcoding so want to leave them the flexibility of customizing them) and due to the current site being Wordpress I am sticking with that platform.
What they want would be more efficiently implemented in either Joomla or Drupal. I use either Joomla or Wordpress depending on site i'm building. Wordpress is great for this simpler sites but if you want multi level permissions, highly customizable image galleries, forums, registration etc. then there are better CMS's out there.
PM sent !