Page 1 of 1

Coding-guidelines

Posted: Thu Jun 15, 2006 4:28 pm
by Piratos
You know http://area51.phpbb.com/docs/coding-guidelines.html from phpbb ?

Isn't it time to make a guideline for the cms ?

Re: Coding-guidelines

Posted: Thu Jun 15, 2006 5:09 pm
by Elijah Lofgren
Piratos wrote:
You know http://area51.phpbb.com/docs/coding-guidelines.html from phpbb ?

Isn't it time to make a guideline for the cms ?
I think having coding guidelines would be very useful. Those ones from phpbb look pretty good, we could base ours of those.

Re: Coding-guidelines

Posted: Thu Jun 15, 2006 5:20 pm
by Ted
I agree.  I think this is a good idea and these seem pretty complete and most of the guidelines are how I basically think now.  I'm all for it, though I don't think we'll have all of the code prettied up for 1.0.  It's just a heck of a lot of time to clean it all up consistently in one shot.

Re: Coding-guidelines

Posted: Fri Jun 16, 2006 1:43 am
by calguy1000
I'll be the devils advocate here, and oppose.

I think it's more important at this time, considering our developer base, and the fact that many of them aren't career programmers that we focus on the bigger issues.  For example, we should instruct people how to deal with SQL injection issues, how to prevent remote code injections, how to optimize databases and their queries (Piratos you seem to have quite a bit of experience on this topic, perhaps you could start a thread or a wiki page with some tips on effecient database design, and queries), optimize for memory, etc.

As well, we can give tips, instructions and guidelines on handling forms, redirects,  tips on writing modules, working with the new event stuff, and a thousand other topics.

Thirdly, there is front end and back end style guides, how modules should be developed (tabs, user editable database templates, help in the modules, etc, etc) that could be discussed and standardized to better all of the products.

As professional developers we're accustomed to reading somebody elses code, and it takes us little time to re-format it into something readable and more easily understandable for us.  Agreed, it's an annoyance, but a minor one.

A bigger issue is the safety, performance, and usability for frontend users.  We need to work on guidelines for these, and then encourage people to use it, because we all use other peoples modules and plugins,  and the safety of our websites relies on each and every one of them.  I would like to have reasonable confidence in any module or tag, whenever I decide to use it.

As well, coding styles are a highly personal matter, and each programmer has their own style (and even this style changes over time), to something that they (as the person mostly responsible for maintaining the code), is accustomed to and understands.  Imposing coding style guides on people in an office environment is already a highly contencious issue.  Doing it in an open-source and collaberative environment would be nearly impossible.

what do you think.

Re: Coding-guidelines

Posted: Fri Jun 16, 2006 4:58 am
by cyberman
calguy1000 wrote: ... and oppose.

I think it's more important at this time, considering our developer base,

we can give tips, instructions and guidelines on handling forms, redirects,  tips on writing modules, working with the new event stuff, and a thousand other topics.

...

Thirdly, there is front end and back end style guides, how modules should be developed
Can't see some real oppose  ;D - if I'm right Piratos meaned what you said ...

But I think a special wiki part you told about  is very important for programmer newbies (like me  ;D).