Comments on: Behaviour, Content and Presentation: why the 3 layer model is wrong http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/ standards, accessibility, and ranting and general stuff by the web chemist Thu, 03 Apr 2008 13:13:19 +0000 http://wordpress.org/?v=2.5 By: JackP http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21630 JackP Wed, 28 Nov 2007 23:37:11 +0000 http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21630 @all: like I <em>may</em> have mentioned I was being deliberately contentious - but when it comes to online discussions I find that the whole "server side processing" part of it seems to barely get a mention -- and to me without that you simply haven't got a web application. Which is why it deserves at least <em>one</em> layer in its own right... Mike makes a valid point in that the "server request" has been there all along -- the flip side of which of course is "so why do we only consider what gets served to the client?"... because without that fourth layer you've got static-only sites. Anyway, it's achieved my target: stirring up a debate. Whether the consensus is with me or against me matters less to me than whether I've made people <em>think</em>... @all: like I may have mentioned I was being deliberately contentious - but when it comes to online discussions I find that the whole “server side processing” part of it seems to barely get a mention — and to me without that you simply haven’t got a web application. Which is why it deserves at least one layer in its own right…

Mike makes a valid point in that the “server request” has been there all along — the flip side of which of course is “so why do we only consider what gets served to the client?”… because without that fourth layer you’ve got static-only sites.

Anyway, it’s achieved my target: stirring up a debate. Whether the consensus is with me or against me matters less to me than whether I’ve made people think

]]>
By: Seb Crump http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21629 Seb Crump Wed, 28 Nov 2007 23:26:12 +0000 http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21629 I always thought there was about four layers too - but haven't really tried to formalise/document them as such. I agree with Mike and zeroanarchy that the first layer is the fundamental one that's always been there, i.e. the server. However, now I come to think about it I think I would express it slightly differently... Data (Layer 0 - database and optional hence zero) -> [translate] -> Logic (Layer 1 - all the server response including dynamic coding, if present, but could just be provide plain html etc.) -> [transmit] -> Structure (Layer 2 - yer (X)HTML stuff) -> [transform] -> Style (Layer 3 - CSS, etc.) Of course the chain could work backwards. I never really considered JavaScript a 'behaviour' layer it mearly implements some client-side stuff already there or in the case of AJAX is a mechanism for handling the server request other than the 'normal' browser-triggered HTML related requests. I always thought there was about four layers too - but haven’t really tried to formalise/document them as such. I agree with Mike and zeroanarchy that the first layer is the fundamental one that’s always been there, i.e. the server.

However, now I come to think about it I think I would express it slightly differently…

Data (Layer 0 - database and optional hence zero) -> [translate] -> Logic (Layer 1 - all the server response including dynamic coding, if present, but could just be provide plain html etc.) -> [transmit] -> Structure (Layer 2 - yer (X)HTML stuff) -> [transform] -> Style (Layer 3 - CSS, etc.)

Of course the chain could work backwards.

I never really considered JavaScript a ‘behaviour’ layer it mearly implements some client-side stuff already there or in the case of AJAX is a mechanism for handling the server request other than the ‘normal’ browser-triggered HTML related requests.

]]>
By: zeroanarchy http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21624 zeroanarchy Wed, 28 Nov 2007 21:11:03 +0000 http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21624 It interesting that this topic has been brought up. I have been trying to find references to the standard implementation of layers eg. PHP and have never been able to understand why it was that layers became common practice and how. The benefits are obvious when working on a site in teams. In relation to this discussion I have been working on the following layer principal for several years. Database(Layer1) --> Code Layer(Layer2) --> Design layer(Layer3) --> CSS(Layer4) The database layer could refer to calls to Oracle function, stored procedures or HTML templated SQL. Code layer refers to your application code eg.. PHP, Java or ASP. Design layer refers to your HTML layer or template. And of course CSS is well straight forward. In a lot of cases it's obvious that this layout approach is not adhered to. This is an obvious disaster when working on enterprise level websites that take the following approach. Database Layer(layer 1) --> Code, design and CSS layer(layer 2) This is not necessarily the fault of the company or it's web team but rather in many instances it can be attributed to the CMS they have integrated that does not even meet the basic requirements of W3C compliance let alone developing an adequate layered approach. Regards zeroanarchy It interesting that this topic has been brought up. I have been trying to find references to the standard implementation of layers eg. PHP and have never been able to understand why it was that layers became common practice and how. The benefits are obvious when working on a site in teams.

In relation to this discussion I have been working on the following layer principal for several years.

Database(Layer1) –> Code Layer(Layer2) –> Design layer(Layer3) –> CSS(Layer4)

The database layer could refer to calls to Oracle function, stored procedures or HTML templated SQL.

Code layer refers to your application code eg.. PHP, Java or ASP.

Design layer refers to your HTML layer or template.

And of course CSS is well straight forward.

In a lot of cases it’s obvious that this layout approach is not adhered to. This is an obvious disaster when working on enterprise level websites that take the following approach.

Database Layer(layer 1) –> Code, design and CSS layer(layer 2)

This is not necessarily the fault of the company or it’s web team but rather in many instances it can be attributed to the CMS they have integrated that does not even meet the basic requirements of W3C compliance let alone developing an adequate layered approach.

Regards
zeroanarchy

]]>
By: Mike Cherim http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21621 Mike Cherim Wed, 28 Nov 2007 19:56:09 +0000 http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21621 Interesting approach --- one I'll have to mull over for a bit. I would have to say now that the fourth layer was there all along and not form input triggered/dependent. It's the HTTP request and that's where it all begins. Interesting approach — one I’ll have to mull over for a bit.

I would have to say now that the fourth layer was there all along and not form input triggered/dependent. It’s the HTTP request and that’s where it all begins.

]]>
By: Max Design - standards based web design, development and training » Some links for light reading (28/11/07) http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21607 Max Design - standards based web design, development and training » Some links for light reading (28/11/07) Wed, 28 Nov 2007 14:48:10 +0000 http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21607 [...] Behaviour, Content and Presentation: why the 3 layer model is wrong [...] […] Behaviour, Content and Presentation: why the 3 layer model is wrong […]

]]>
By: Richard Conyard http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21601 Richard Conyard Wed, 28 Nov 2007 12:29:21 +0000 http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21601 Jack, You need to split your process layer into more layers; well you don't have to, but to get a meaningful and maintainable abstraction. Not perfect but in place here is: Render layer (XSL) Data Capture and validation (sxForms and a bit of XSD) Business logic layer - still code unfortunately, but I'm having fun with some BPELesque stuff and playing with XML based languages Data - XML Jack,
You need to split your process layer into more layers; well you don’t have to, but to get a meaningful and maintainable abstraction. Not perfect but in place here is:
Render layer (XSL)
Data Capture and validation (sxForms and a bit of XSD)
Business logic layer - still code unfortunately, but I’m having fun with some BPELesque stuff and playing with XML based languages
Data - XML

]]>
By: Cole Henley http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21600 Cole Henley Wed, 28 Nov 2007 11:10:02 +0000 http://www.thepickards.co.uk/index.php/200711/behaviour-content-and-presentation-why-the-3-layer-model-is-wrong/#comment-21600 Interesting debate and here are some mumbling, rambling thoughts. I am involved both in building back-ends of a site in PHP - consuming/processing data from a variety of sources (databases, web services, etc) - as well as the front-end product (HTML), 'presentation' layer (CSS) and 'behaviour' layer (Javascript). The three-tier referred to in web-standards refers to this front-end but I work in an environment that employs a different three-tier system distinguishing between the data itself, business logic (the processing and delivery of data) and presentation (the consumption and presentation of data). As someone involved in placing these data sources online, all my work is - in the broader scheme of things - considered to be presentational. Your fourth 'process' layer provides a useful interface between the back-end and front-end of the web but isn't the process a server-sided/back-end thang and therefore part of a different model than the traditional three-layer model which I see as aimed primarily at the front-end of the web. This is <strong>not</strong> to say I think it isn't important we adopt standards across the back-end of web development nor that many (most?) of us wear both hats in the jobs that we do. Rather, what takes place in PHP (or whatever your back-end of choice) stays in PHP. The products of that process may be dependent on the user, particularly with form processing, but this process takes place independently of the user and irrespective of whatever device(s) they use to view and interact with a website. <blockquote>although many people fall into the mindset of just thinking “behavioural = javascript”</blockquote> I have always struggled with the idea of Javascript as behavioural. Are we talking about the behaviour of the user or the content? Javascript, in my opinion, is there to add value and a richer experience to a website but that experience still has to be made available without that layer - just as a site still has to be available with CSS disabled or on a device that doesn't support styling. In this case behaviour has to be functional and therefore becomes an essential means of navigating and interacting with the content - it is not an optional layer draped over the top. It's all enough to make my head spin a bit... Interesting debate and here are some mumbling, rambling thoughts.

I am involved both in building back-ends of a site in PHP - consuming/processing data from a variety of sources (databases, web services, etc) - as well as the front-end product (HTML), ‘presentation’ layer (CSS) and ‘behaviour’ layer (Javascript). The three-tier referred to in web-standards refers to this front-end but I work in an environment that employs a different three-tier system distinguishing between the data itself, business logic (the processing and delivery of data) and presentation (the consumption and presentation of data). As someone involved in placing these data sources online, all my work is - in the broader scheme of things - considered to be presentational.
Your fourth ‘process’ layer provides a useful interface between the back-end and front-end of the web but isn’t the process a server-sided/back-end thang and therefore part of a different model than the traditional three-layer model which I see as aimed primarily at the front-end of the web. This is not to say I think it isn’t important we adopt standards across the back-end of web development nor that many (most?) of us wear both hats in the jobs that we do. Rather, what takes place in PHP (or whatever your back-end of choice) stays in PHP. The products of that process may be dependent on the user, particularly with form processing, but this process takes place independently of the user and irrespective of whatever device(s) they use to view and interact with a website.

although many people fall into the mindset of just thinking “behavioural = javascript”

I have always struggled with the idea of Javascript as behavioural. Are we talking about the behaviour of the user or the content? Javascript, in my opinion, is there to add value and a richer experience to a website but that experience still has to be made available without that layer - just as a site still has to be available with CSS disabled or on a device that doesn’t support styling. In this case behaviour has to be functional and therefore becomes an essential means of navigating and interacting with the content - it is not an optional layer draped over the top.

It’s all enough to make my head spin a bit…

]]>