Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Not sure if the title really fits with the question, but figured it was the closest to give an overview of my question..

I'm working on a web application that (fairly heavily) employs the use of browser-specific CSS functions such as -moz-transform) and I'm curious as to what approach those with more experience developing these types of applications use. For context, I'm referringly solely to front end development (my backend pipeline's pretty solid :)).

The way I see it, there are two methods of development:

  • Get new functionality working in all browsers, only introducing new code once all applicable browsers have all been tested.
  • Get your functionality complete in one browser. Once your application is complete, start testing on other browsers and introduce fixes where needed.

Generally, I've been following the latter. I feel as though it allows me to concentrate on the core functionality and get more completed faster than if I was essentially halting functional development every time something new was completed to deal with browser nuances.

So, what practices do you follow when it comes to client-side development? I don't work professionally as a web developer, so best practices in web development are a little tougher to come by, other than my own trial and error (and scouring w3c recommendations). However, always a good thing to learn from those smarter than you :).

share|improve this question
    
transform works in all browsers with a little bit of (horribly kludgy) extra code (useragentman.com/blog/2010/03/09/…). That said, you should always make sure all the features work WITHOUT the specific effect while you're developing it, just in case. –  Trezoid May 11 '11 at 0:59
    
@trezoid: Transform was just an example. Of course, I'd be implementing some form of graceful degradation to ensure that non-functioning features are handled :) –  Demian Brecht May 11 '11 at 2:42
    
I strongly suggest building it all in one browser and then test later. If you're skills in web development are good, you should be able to build an app that has minimal breakage between browsers. On the other hand, if you're building something out that you have no clue will work cross browser, you may want to check from time to time, but building something small, then testing it on 4 different browsers is insane. –  The Muffin Man May 11 '11 at 8:26
add comment

2 Answers

up vote 3 down vote accepted

As long as it isn't completely broken in other browsers, it is best to focus on a single browser during development.

The non-standard hacks you need to add for IE tend to conflict with each other or affect other parts of the page, so making small adjustments before the page is complete just leads to having to repeat the work when something changes.

However, you should make sure that your css at least sort of works in all browsers - debugging something that doesn't render at all is way too complicated.

share|improve this answer
add comment

It depends a lot on what your userbase is. Are they mainly using a single browser or can you actively push them into the direction to use a specific browser? Then I'd completely agree to the statement made before me: "As long as it isn't completely broken in other browsers, it is best to focus on a single browser during development.". Of course that browser should be the one the users already using ;-)

If you do however have little or no control about the browser the users are using, then I'd try to stay on the least common denominator. Try to avoid introducing any browser optimization at all. That way you don't really have to do a lot of cross-browser testing. If you introduce browser specific features, I'd first implement them fully in the browser of choice, while still making sure you don't break anything for other browsers. Then, when the development is complete transfer the logics (if possible) to other browsers as well.

share|improve this answer
    
I take the lowest common denominator whenever I'm developing something - making sure script (and styles) are done in an unobtrusive manner (enhancement rather than potential roadblock). In this specific case, I want to push the browser capabilities (using scaled video rendering, etc), so I can't (and don't want to) shy away from browser-specific code. Of course, for a site that generates revenue, I would maybe take a different approach :) –  Demian Brecht May 11 '11 at 19:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.