Does anybody have a set of coding standards in print or in electronic format that we could start formalizing into the "OpenEMR Coding Standards."
From the telephone conference we had decided to avoid third party modules/software unless there is some compelling purpose, avoid Smarty Templates, try to put everything into the database to allow single point of access control.
I could use some really more basic stuff, such as, what coding style is actually preferred. Emphasis on PHP5 ready code.
I could also use a list of the older code modules so that we can start updating these to PHP5 style code. This will help start the migration to PHP5.
Can we get rid of the frames and use CSS instead. This would allow the use of the non-frame compatible browsers (such as the lightning fast Dillo).
Re coding standards - I don’t get excited over things like indenting styles any more. The important thing is not to write crap. For an example of crap, try doing a “view source” from your browser of the main upper frame of a player summary view… you’ll see brand new <html>, <body> tags etc. right in the middle of the code, missing </table> tag, etc. – I just noticed this yesterday. It seems to be a case where someone cut corners because it was too hard to “do it right” with the Postnuke/Smarty framework.
PHP5 is not really much different from PHP4. The main difference is a better internal implementation of objects and classes, so that OOP is actually a reasonable thing to do in PHP now. I would encourage the use of classes as new features are implemented. However let’s also retain backward compatibility with PHP4 for at least the next year or so.
I don’t think CSS is necessarily a substitute for frames, and I’m not sure it’s realistic to try to support browsers that can’t handle frames. But I’d need to research that some more.
A big question in my mind is, how would infrastructure changes (i.e. refactoring code) be funded? I like to eat and so I tend not to do much work that isn’t billable, and it’s hard to convince a client that they should pay for such things.
I think having the coding style will make the overall code more cohesive and maintanble going into the future. I realize indenting styles are cosmetic but they do improve maintenance in the future.
I personally like the stricter xhtml standard. Sloppy html will only be a liability in the future and allows browsers to "interpret" what they should be doing. Sloppy html tends to decrease cross browser compatibility.
Funding? well, I was really making a work list for myself. I am not as worried about the PHP4 style as the older stuff that is more like PHP3 as alluded to by Fred Trotter. And I no we will have fewer cross OS compatibility issues if we move towards PHP5.
True funding will depend on soliciting donations and some grant writing. Open Source Medical Software is working towards grant application at this time. It wouldn’t hurt my feelings if we could get a couple of preinstalled live CDs that we could sell for a modest fee.
Such as an Ubuntu live CD and a Windows XAMPP CD. Bundling of software would be a big boon too less skilled operators and get more people using OpenEMR.
I propose CSS not because it is beautiful but it is smaller, loads faster and would run on browsers like Dillo. This allows for less expensive hardware to run the browser.