User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 373,934 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,138 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Opinions? javascript/php/etc and programming standards

Join Date: Mar 2007
Posts: 17
Reputation: justinm is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
justinm justinm is offline Offline
Newbie Poster

Re: Opinions? javascript/php/etc and programming standards

  #18  
Mar 28th, 2007
Yes that is true, it is easier to read and pickup on other coders style if they are clean and have good consistent naming convention, and at least some consistency throughout the project. My biggest annoyance so far, is the not-so-strict use of classes where they should be used, and the use of classes when they aren't needed. I find it easier to use classes not just for reuse, but also accessibility within a project, and easy enough to duplicate to other projects with minimal modification.

HTML indentation comes down to individuals preferences. I try to keep everything indented but it just becomes messy. For myself and reading code quickly and efficiently, I find that having structured and properly indented code is critical, as you can quickly scan sections to find where a problem, or modification/improvement can be achieved. I find it very difficult to scan long sections that are backed up against the wall with no flow or indentation, and all over the shop.
It may be time consuming, but I find that with properly structured code it is very easy for others to understand what you are trying to do.

But personally, I prefer the OOP approach, and I try at all times to program in the OOP methodology, and abstain from classical programming that uses inline functions, bad naming, and just including a horde of functions within a page that just are not needed at all, where classes have an advantage, and not only that, they are anonymous for data formatting.

At work, I have already cut rendering time 3 quarters down from its original on a specific page within a specific project, by using classes and low amount of includes (some of these files are includes within includes within includes, it took me an hour just to find one bloody function that didn't even do anything!). Lesson learnt - use classes.
Last edited by justinm : Mar 28th, 2007 at 6:23 am.
Reply With Quote  
All times are GMT -4. The time now is 6:19 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC