Coding-guidelines

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Piratos

Coding-guidelines

Post 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 ?
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Coding-guidelines

Post 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.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Coding-guidelines

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Coding-guidelines

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
cyberman

Re: Coding-guidelines

Post 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).
Post Reply

Return to “Developers Discussion”