
« Announcing the Silverlight Developer Center | Main | Fire Eagle: Open location for all »
March 5, 2008
Talking to several partners and architects in other companies, there seems to be a general move from page-based sites to frameworks with modules that can either be under your own control, added by users or provided by third party companies. This is an interesting concept for much more personalized web experiences but it also poses quite a technical challenge for web developers.
The job of a web developer (or front end engineer or interaction architect or web designer or [insert your job title of choice here]) is in a constant state of flux. Best practices that were the cat’s pajamas in the end 90ies are terrible solutions now and solutions that sounded like science fiction then are feasible now.
The environment our code is executed in is still largely unknown but at least the software that renders what we develop becomes more and more sophisticated and reliable. Whilst we can thank the browser vendors to open up more and more to our needs (with IE8 now rendering by default with the new engine as per the latest news – cheers!) we have a different challenge ahead of us, which is once again a change in the market and usage needs of web surfers.
This is nothing new - after all we faced it before:
None of this was really scary to a clever developer as most likely you already used a sort of templating engine or IDE to create static pages for you. The challenge to move from static pages to writing templates for CMS wasn’t that hard then.
The main challenge was and is that clients need to grasp that the benefits of templating also come with a few drawbacks. These are first of all that you can’t design every page differently and you don’t know how much or what text will be used in the final page. If your CMS has hundreds of templates it becomes as hard to maintain as static pages and you wasted a lot of time and money.
To me, acknowledging these drawbacks is great step in becoming more mature developers and content producers: we embrace change as a given rather than just trying to prevent things from breaking. My classic way of doing that was battling the “This link is three words, so we don’t need more space” statement by showing the German or Finnish translation for these three words, subsequently breaking the layout.
There is a new challenge on the horizon that will become more and more important over the next years. I’ve talked to several companies and we all seem to go the same way on that. Here’s what web developers have to face now:
All the companies I talked to are moving away from a page-based concept of web publishing to one that is a canvas with independent modules. These modules could be of your own making – actually most enterprise level CMS work that way already - but will subsequently also mean third party modules and modules the site user can choose to add, remove and customize.
This is a wonderful concept as it allows us to work a lot faster, more user-focused (by offering content that is related to interests and profile) and allows for parallel development of different modules. The problem however is that the current technologies we render content in browsers with are not catered for that.
The main challenges are the following:
Styling and UI consistency is a real issue as the technology for styling documents in user agents – CSS – is by definition not catered for independent modules. The main power of CSS is the cascade – you define a setting once and let the browser apply it to every element that matches a selector. This allows you to create wonderfully small CSS files that are easy to maintain as you can change all the look and feel by changing a few selectors. If your CSS solutions have IDs and classes on every HTML element then you haven’t played the technology to its strengths.
If the modules we’re talking about are built to blend into a consistent look and feel and just need some colour changes or other minor display changes then this is not really a problem. However, if you are afraid that CSS settings inherited from the page CSS and parent elements will render your module unusable you are in trouble.
HTML has no <reset> element that would allow you to override the cascade. For now, the consensus for a lot of companies seems to be to use <iframe> when they need to have a fixed look and feel that is not allowed to inherit from the main document.
This, and other hacks like inline styles or artificially enhanced specificity with several IDs and classes doesn’t seem right and results in massive CSS files that slow down the overall page.
The use of iframes hinders the performance of the page as each needs to be loaded separately. In a perfect environment, you’d want the document to render in one go with as few HTTP requests as possible.
On the security front, iframes are actually a nice-to-have as they’ll “sandbox” the (possibly third party) scripts in the different modules. From an overall application perspective, this is a hindrance though as you’d want to communicate between modules without having to resort to a server-side component.
In any case, there are a lot of new challenges for us to face in the nearer future and I for one think it is a great chance to marry the knowledge of UI-focused web developers with backend engineers to build a new way of defining web applications.
Articles on-topic:
We’re going to watch this challenge closely and are happy to hear your thoughts and solutions.
Chris Heilmann
Posted at March 5, 2008 7:52 AM
Nice overview Chris, thank you.
Posted by: Louis at March 5, 2008 12:21 PM
Hi Chris,
Interesting !
I think Widget and Plugin are easy to Re-use (and use), customizable and mostly dont requires to touch any html markup, i really love this kind of stuff.
i guess, you want to tell something more beyond widget and plugin, but not able to get the stuff. !
-Raxit
"Write your own poem"
Posted by: Raxit at March 5, 2008 12:50 PM
Iframes are going to become a serious issue for web sites trying to maintain a look and feel with imported third party modules. You need to sandbox the js and php, but how can you enforce the site-wide look and feel?
Those third party modules are either going to make the web a more dynamic environment or lead us back to Geocities 1997-era styling.
Posted by: Ted Drake at March 5, 2008 12:50 PM
Maybe for the reset you can just append a class to a reset stylesheet's selectors and use that for your 'individual' elements.
Posted by: Dylan Fogarty-MacDonald at March 5, 2008 2:21 PM
A very timely post. Tomorrow I am meeting the developers I will be working with on a large intranet project which will be powered by a commercial CMS. The main purpose of the meeting is to discuss how I can build our HTML and CSS files to allow several "independent" modules on each page.
One of the biggest problems I have experienced in the past is "chrome" that is inserted into the page to allow in-place editing. I have generally worked around this by using a three-letter prefix on the classnames used to identify the module containers. As you point out though, this leads to bloated CSS files. Luckily this shouldn't be a problem on this project due to the way the CMS is edited.
Another big issue is that of page hierarchy. Without knowing the context where a module will be used, it is almost impossible to use appropriate header levels. I'm looking forward to the "section" element in HTML 5 which may go some way to making this easier in the future. As I understand the specification, a level one header inside a section falls below a header in the parent of that section, whatever level it is.
Other potential conflicts can come about through the use of reset style sheets and with classes which you would like to use with microformats, but have been styled elsewhere with a greater specificity. Both of these things can be worked around, but again lead to bloated CSS files.
I'm still not 100% certain how I will solve some of the problems I'll encounter, but I'm sure it will be an intersting challenge, and one which will be repeated many time in the future.
Posted by: David Owens at March 6, 2008 4:48 AM
@Dylan Fogarty-MacDonald
That definitely won't do the job. I've spent quite some time attempting to use YUI fonts/reset to 'reset' elements that would contain widgets, or anything else that should have it's own look and feel within another website. Even with ridiculous specificity, the containing site's CSS still routinely manages to screw things up.
In my opinion CSS is really in desperate need of something like inherit: reset. This will make independent module development possible but at the same time introduce a HUGE risk of misuse and bad practice, similar to the !important hell.
Until then I'm afraid iframing is the only reliable solution, as ugly as it may be.
Posted by: Marco van Hylckama Vlieg at March 14, 2008 4:29 AM
Comment Policy: We encourage comments and look forward to hearing from you. Please note that Yahoo! may, in our sole discretion, remove comments if they are off topic, inappropriate, or otherwise violate our Terms of Service.
Copyright © 2008 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings