Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

Site Redesign Advice Needed

  • 02-07-2013 3:49pm
    #1
    Registered Users Posts: 160 ✭✭


    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


Comments

  • Closed Accounts Posts: 5,857 ✭✭✭professore


    pushpop wrote: »
    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.


  • Registered Users Posts: 2,781 ✭✭✭amen


    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.
    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.
    Secondly, a lot of the code is dependant on one or two massive files which contains dozens of functions
    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.
    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 ?


  • Moderators, Technology & Internet Moderators Posts: 1,333 Mod ✭✭✭✭croo


    professore wrote: »
    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.


  • Registered Users Posts: 1,127 ✭✭✭smcelhinney


    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.


  • Registered Users Posts: 10,660 ✭✭✭✭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.


  • Advertisement
  • Moderators, Technology & Internet Moderators Posts: 11,003 Mod ✭✭✭✭yoyo


    professore wrote: »
    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


  • Registered Users Posts: 10,660 ✭✭✭✭maccored


    yoyo wrote: »
    [*]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).


  • Moderators, Technology & Internet Moderators Posts: 11,003 Mod ✭✭✭✭yoyo


    maccored wrote: »
    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


  • Registered Users Posts: 160 ✭✭pushpop


    amen wrote: »
    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 !


Advertisement