
Re: Not sure if Pie is heading in the right direction?
I'd like to address your points one-by-one:
balupton wrote:
1. To use CSS3Pie currently I must include the behaviour on all rules which contain properties which I would like CSS3Pie to handle.
At least one other behavior hack I've used in the past (
whatever:hover) is implemented by adding the behavior style to the body element and letting it work out from there which elements to affect.
This approach makes it much easier to use; you only need one reference to it, and all affected styles magically work. However, the same approach for Pie is probably not feasible for a number of reasons, primarily performance - doing it this way, it would have to scan every element in the DOM for all the styles it works with, and run for each of them immediately. Whatever:hover has the advantage that hovered styles don't need to be displayed immediately on page load, so it isn't an issue if the script takes time to parse the whole DOM.
Additionally, Pie adds a number of event triggers to affected DOM elements, to support moving and resizing. Whatever:hover doesn't need to do nearly so much work in this regard, which again from a performance point of view makes it more suitable than Pie for placing at the top of the stylesheet.
Quote:
a. This would seem to be a huge headache with maintenance as when CSS3Pie supports now properties, or I refactor my CSS I have to ensure all the behaviours are in the right places.
If you're using most of the PIE supported styles, you'll already have a number of duplicate styles everywhere due to browser support (border-radius, -moz-border-radius, etc). In that context, I don't see any issue with placing a PIE style as well.
Quote:
b. It seems troublesome for the browser if my website utilises a ton of CSS3 properties, it has to load CSS3Pie for each rule. I understand that the response to the request can be cached, but it would still have to parse that file again or at least have some performance impact... no?
Once the script is loaded, it is loaded. As for running it multiple times, even if we only referenced the behavior once in the CSS, it would still need to run the code for every affected DOM element. There's no way around that, and yes: if you've got a lot of elements with rounded borders etc then yes, you may have a performance hit. That said, I'm developing a site with a *lot* of PIE, and we're not noticing any performance issues.
Quote:
2. It still keeps the burdon of IE support on the developer, as it only provides support for some CSS3 properties.
What??? You want it to give you the whole CSS3 spec??? Tell me you're not serious?
None of the browsers do that, least of all IE. (if you don't believe me, have a look at the browser compatibility tables at
Quirksmode.org.
The simple fact is that Pie provides a *hack* for IE to give it *some* additional functionality. As long as you're developing for IE, you're going to have to live with the burden of incomplete support for CSS and other specs. There are various hacks and tools around to make life easier, but as things stand there is indeed a burden, and there is no way around it. Sorry about that. That's just the way it is.
What Pie *does* do is provide a working method for supporting some of the more commonly requested visual aspects of CSS3 in IE. In that respect it is a success. If your users want rounded corners on their boxes (and everyone does these days), you can either (a) go old-school and cobble together a solution using graphics in the corners, (b) use CSS but don't bother supporting it in IE, or (c) use CSS, and add Pie for IE. It's not an ideal solution, but it's better than options (a) or (b).
For what its worth, there are a few alternatives to Pie (at least for border-radius, not sure about shadows or gradients). The solutions fall into two camps: Use Javascript for rounded boxes instead of CSS; or use behaviors. I've spent a lot of time analysing them all (I've even written my own), and I can tell you now that PIE is
by far the most complete, easiest to use, least buggy and best implemented solution out there.
Quote:
These issues make me feel that a better solution would be something which can be included which tries it best to ensure IE behaves like other browsers for as much as it can - a true all round "solution" (well workaround). For instance even including CSS3Pie still won't stop the developer from having to spend countless hours still upgrading their website. It would be ideal if we could just include a file, which forces IE to behave like the other browsers.
One such alternative to this idea is Google Chrome Frame, however it would be nice is if the user doesn't have Chrome Frame then we can load in this magical file to force support. Now to me, that is a better idea.
What are your thoughts? Am I missing something?
You are serious, aren't you? Hehe.
Pie is a javascript file which runs inside the browser. Frame is an installable application which completely replaces the whole browser engine. Common internet security rules make them very different things to use. You can't just "magically" load Frame, because the user would need to accept the download and accept the installation of the application. A lot of users (ie in businesses, where IE is still used the most) don't have the permissions to either download or install new applications. Even a lot of home users would refuse it if they didn't know what it was for.
That's a lot of hassle just for rounded corners.
Compare that with Pie, which just works. No need to ask the user to download or install anything; just add it to your CSS.
Of course, if you know your users already have Google Frame installed, then yes, you could use the meta tag to activate it. But frankly, most people who care enough to install Frame will already have been using an alternative browser anyway.