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

website presentation help for programmer

Options
  • 18-04-2008 2:08pm
    #1
    Registered Users Posts: 5,380 ✭✭✭


    I come from a programming background and from time to time have dabbled in web development... from a business logic point of view i can pretty much do anything i need to do in PHP or if i need performance Java.

    Where i do struggle is on the presentation side of things (i guess most programmers do :o )... I know one of the problems with PHP is that the business logic and presentation are mixed in php files, is there any way to avoid this?

    When people are designing the business logic in php, what program's do they use for the layout?? Up until now i've been using my regular programming editors... what do the professionals use when working with the likes of php?

    I have an ok knowledge of html (have messed around with it for years doing little projects), just need to know what the latest ways of doing things are, for example i know tables are not the way everyone does things now... Could anyone recommend a course / book which would help me out from a presentation point of view??


Comments

  • Closed Accounts Posts: 7,145 ✭✭✭DonkeyStyle \o/


    Tables are still in for tabular data, just not for layout.
    I know one of the problems with PHP is that the business logic and presentation are mixed in php files, is there any way to avoid this?
    Well if you really wanted to devorce yourself from presentation you could probably just work in XML and let someone else worry about formatting.

    I suppose it depends on how much presentation you actually do already.
    Dumping things out with plain html tags like <p> <h1> <em> <h2> <ul> <li> and grouping areas with <div>s will still give you (or someone else) a lot of presentation options after the fact using an external stylesheet.
    Definitely read up on CSS if you haven't already.


  • Registered Users Posts: 1,464 ✭✭✭daveyjoe


    Have a look at one of PHP MVC frameworks to get proper seperation of code...
    http://www.mustap.com/phpzone_post_73_top-10-php-mvc-frameworks

    I've only used CakePHP, there are nice screencasts to help get you started. Haven't used it in nearly two years so it may have changed quite a bit, using django at the moment.


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    It's generally considered best practice to seperate design (html markup / css) from the code logic (your PHP) wherever possible. This makes it much easier to maintain both aspects of the site.

    If you don't want to go the full MVC framework route, a templating engine such as Smarty is useful for seperating design from code. I use it a lot myself.


  • Registered Users Posts: 5,380 ✭✭✭DublinDilbert


    Thanks for the replies, they have been quite useful...

    I downloaded CakePHP yesterday and done a tutorial and got something simple up and running fairly quickly. It does look good but might be a bit complex for what I'm doing at the minute. Its nice to have as an option if i had to work on something really complex.

    Just had a look at smarty there and it looks fairly cool.... i like also the fact you could edit the template with a wyswug editor....

    I'm going to try smarty for a few small sites i have to do...

    Could anyone recommend a wyswug editor?

    Thanks again for the help....


Advertisement