Best Programming Practices For Web Developers
An anonymous reader writes "Web pages have become a major functional component of the daily lives of millions of people. Web developers are in a position to make that part of everyone's lives better. Why not try using traditional computer programming and best practices of software engineering?"
Best programming practice is to do everything server side and not hijack the CPU of the site visitor; not depend on client-side active compatibility (for instance, just tried to pay for an EBay auction today, wouldn't work, don't use Explorer...) if you do server side processing, you can make it work for *everyone*. That alone is enough reason to go for it. Then there's Digg; Digg's pages are such a load on the visitor's CPU that I have to click "script not responding, continue?" three times on a page with 800 or so comments with Firefox and a dual-core 2 GHz CPU just to get the page to completely render. Sure, some of this is junk programming, not junk technology, but even so, if the server was doing the work of formatting (like it traditionally has here on slashdot), then it'd just be a matter of my browser reading HTML, instead of trying to run other people's scripts locally. I'd give up the web 2.0 "candy" in a second just to have a reliable web page.
Sadly, I know people will typically go for glitz over functionality, so the only thing that will kill web 2.0 is web 3.0, and I have little doubt it'll be even worse. :(
As for leaning towards good programming practices, my suggestion is to start by taking PHP off your server, learn Python (or Perl if you're feeling feisty) and write something that at least has a chance of being reasonably structured. Keeping in mind I'm a huge fan of Python.
I've fallen off your lawn, and I can't get up.
I'm not a contractor - but I like his style.
I'm a web developer with a successful SAAS product in the market. It's a cool flashy app that's kept us at the front of technology. Yesterday I could have either built a new ajax graph widget for the front page - so we can win another client - or fixed the log in code so it stopped calling the database twice per log in and save me having to order another server.
Guess which I did? :)
There are more types of apps and development practices in heaven and earth, Pike65, than are dreamt of in your advice.
I guess that's what really grates on me.
You tell a client that they need to pay for a new server and they're fine with that.
You tell them that they can pay you 30 developer-hours to fix some issues so they won't need the new server in the first place and they act like you're trying to rob them.
"If being a geek means being passionate about something, then I pity those who aren't geeks." - Pike65
Well, I have an entire website that is devoted to answering this question: Free Java Lectures is about that. Specifically, I have a lecture called "Web App Best Practices."
h1 { font-family: Helvetica, sans-serif; font-size 250% }
h2 { font-family: Helvetica, sans-serif; font-size 200% }
h3 { font-family: Helvetica, sans-serif; font-size 150% }
h4 { font-family: Helvetica, sans-serif; font-size 100% }
should be replaced with
h1, h2, h3, h4 { font-family: Helvetica, sans-serif; }
h1 { font-size 250% }
h2 { font-size 200% }
h3 { font-size 150% }
h4 { font-size 100% }
Then they go on to say...
...while the second isn't much shorter...the second one is actually LONGER and more characters and why do you even need that top line...umm are we not using a font tag in our body?
body, td{ font-family: Helvetica, sans-serif; }
this topic makes sence for PHP, java, javascript, ASP, etc... but HTML is not a programming language it has no logic... no loops.. it's just data storage really...
the one thing I will admit (as a web designer who still makes everything in notepad) is the way web design software makes HTML does drive me nuts... but thats just 'cause I started making websites when the size of your file mattered back in the days of 28.8 k/33.6 k
</rant>
----------
Trying to fix or change something only guarantees and perpetuates it's existence