Boards.ie uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Click here to find out more x
Post Reply  
 
Thread Tools Search this Thread
02-07-2013, 15:49   #1
pushpop
Registered User
 
Join Date: Nov 2004
Location: South Dublin
Posts: 153
Site Redesign Advice Needed

Hi there

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 whatever reason, the original author wrote the site such that large parts of the HTML (like top level <divs> and forms and JavaScript code) are output as part of a PHP echo rather than being embedded directly into the page itself, which seems like quite a wasteful an unmaintainable approach. Presumably it was done to allow dynamic content generation, but it seems like a case of the tail wagging the dog, as the actual dynamic elements are comparatively small.

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.

Thanks
pushpop is offline  
Advertisement
02-07-2013, 15:53   #2
professore
Registered User
 
professore's Avatar
 
Join Date: Aug 2004
Location: Cork City's Northside
Posts: 2,273
Quote:
Originally Posted by pushpop View Post
Hi there

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 whatever reason, the original author wrote the site such that large parts of the HTML (like top level <divs> and forms and JavaScript code) are output as part of a PHP echo rather than being embedded directly into the page itself, which seems like quite a wasteful an unmaintainable approach. Presumably it was done to allow dynamic content generation, but it seems like a case of the tail wagging the dog, as the actual dynamic elements are comparatively small.

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.

Thanks
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.
professore is offline  
Thanks from:
04-07-2013, 13:50   #3
amen
Registered User
 
Join Date: Oct 1999
Location: Galway
Posts: 2,359
Quote:
so we were planning on moving away to our own simple templating system consisting of a header, footer, body and sidebar based system
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.

Quote:
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.
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.

Quote:
Secondly, a lot of the code is dependant on one or two massive files which contains dozens of functions
Quote:
Thirdly, pages often duplicate functionality found on other pages, especially with regard to checking user session variables and performing certain mySQL queries.
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.

Quote:
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
What about the dynamic content?

What does this site do ? Any chance we could get a look ?
amen is offline  
05-07-2013, 12:34   #4
croo
Moderator
 
Join Date: Aug 2006
Location: Westmeath
Posts: 1,050
Quote:
Originally Posted by professore View Post
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.
What about drupal? Most people I know (outside of ireland) who want a custom CMS seemed to lean towards it. I know little of either so I am just curious how they compare.
croo is offline  
05-07-2013, 23:14   #5
smcelhinney
Registered User
 
Join Date: Dec 2004
Posts: 1,088
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.
smcelhinney is offline  
Advertisement
06-07-2013, 19:08   #6
maccored
Registered User
 
Join Date: Jan 2010
Location: LeinsterParanormal
Posts: 3,900
Send a message via Skype™ to maccored
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.
maccored is offline  
07-07-2013, 13:23   #7
yoyo
Moderator
 
yoyo's Avatar
 
Join Date: Aug 2005
Location: Dublin 6
Posts: 9,413
Quote:
Originally Posted by professore View Post
Oh and stay away from Joomla. A complete PITA.
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.

Nick
yoyo is online now  
07-07-2013, 22:35   #8
maccored
Registered User
 
Join Date: Jan 2010
Location: LeinsterParanormal
Posts: 3,900
Send a message via Skype™ to maccored
Quote:
Originally Posted by yoyo View Post
[*]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
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).
maccored is offline  
08-07-2013, 11:17   #9
yoyo
Moderator
 
yoyo's Avatar
 
Join Date: Aug 2005
Location: Dublin 6
Posts: 9,413
Quote:
Originally Posted by maccored View Post
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.

Nick
yoyo is online now  
Advertisement
09-07-2013, 13:51   #10
pushpop
Registered User
 
Join Date: Nov 2004
Location: South Dublin
Posts: 153
Quote:
Originally Posted by amen View Post
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 ?

PM sent !
pushpop is offline  
Post Reply

Quick Reply
Message:
Remove Text Formatting
Bold
Italic
Underline

Insert Image
Wrap [QUOTE] tags around selected text
 
Decrease Size
Increase Size
Please sign up or log in to join the discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Share Tweet