views:

198

answers:

5

I am trying to come up with a clear standard to present to my web team so that the frontend HTML/CSS developers and the backend developers can get on the same page. Currently, we all have our own coding styles, and we tend to end up creating more work for each other when we have to dive into each others' code.

What sort of CSS/HTML and backend coding standards do you or your team adhere to so that the code is easily and predictably readable between frontend HTML/CSS development and back-end server development? What processes do you use in hand-offs to ensure everyone knows what is what?

A: 

This is probably a little bit off-topic for what you're looking for, but I keep my code-behind procedural only and keep all declarative/initilaization code in my Aspx file. It might be a good idea to clarify where that goes and under what circumstances. Reference to this thread.

JoshJordan
A: 

The actual code formatting is not important, what is important is that everyone agrees with it.

Ólafur Waage
+1  A: 

That really is a loaded question. The biggest issue you are probably facing is that asp.net has a terrible separation of concerns regarding backend and markup. Another thing that I would not be suprised to hear is that your html developers cringe when they see server control generated code. ASP.NET really does have some interesting output. This suggestion then may offer you no help, but this is what our company has done, and we were in the same boat as you.

We switched to an MVC framework. Your best choices in .net are of course the new ASP.NET MVC and Monorail. MVC web frameworks allow a loose coupling between server logic and markup, which allows you to create less standards because you'll have much less crosstalk in roles. Your html developers will simply receive the data the page requires and then will be able to frame their markup around it, making it entirely possible that they not need to write any server code, and your server side developers will not need to create markup.

Usually the biggest reason for diving into others code is to do something you need to do but can't as well. If you simplify your connection to be simple classes passed to the markup generation, this crosstalk should be reduced. We as a company realized a much higher productivity level by switching to MVC.

Jeremy B.
+2  A: 

Do you have a css framework chosen out or developed? It's hard to create a system of standards a priori. I would work with your developers to choose a common CSS/Layout framework (such as, Blueprint, 960 Grid System, or your own custom framework).

CSS is often developed after the HTML is written, however having a set of reusable CSS already in place informs every party involved of the kind of stuff that has to be in place. There are a million ways to implement layout using CSS/HTML, and a predetermined method of implementation chosen from the start is great; you know what kind of cross browser challenges will exist (or even eliminated!), instead of having to hash those out every time.

Additionally, the other cool consequence of a css framework is that you can then have graphic design people use the grid system utilized by the framework and speed development even more.

So choose the common css framework/vocabulary and then move from there to get something working that you'll all love.

jacobangel
Funny thing is that 960 Grid System is actually 960 Column System... :)
Luke
their words, not mine :)
jacobangel
A: 

In terms of just the front end coding, generally I ask our designer to create a full html/css mockup of the page that I take a apply a lot of repeater controls for databinding. This way, our designer maintains his standards for code output, and I'm responsible for code quality/standards for the codebehind and below.

Joel.Cogley