Hi, On Wednesday 09 December 2009, meik michalke wrote: > Am Mittwoch, 9. Dezember 2009 13:14:35 schrieb Thomas Friedrichsmeier: > > Pick one (or two) of your plugins, and convert it according to the steps > > detailed in the wiki (ask, if you need help). > > done :-) no problems yet, and i would like to add that the resulting code > looks much clearer.
glad you like it. Originally, one reason for picking PHP as the scripting language was that it supports templating with "<? and ?>". But in fact, by now, I believe it probably did more harm than good for the plugins (where we typically have many small fragments of output). A comment on the "Control statement without braces"-message from the conversion script: This is not necessarily bad style (as the message claims). Blocks such as if (a) echo ("something"); if (b) echo ("something else"); else echo ("yet something else"); are quite ok, IMO. I.e. if there is only one statement after the "if", and it's on the same line, and nothing else is on that line, braces are not required. However, for some plugins, after conversion we ended up with constructs like if (a) echo ("option a"); echo ("common thing"); if (b) echo ("option b"); and that really *is* confusing to read. That said, adding braces never does any harm. Another small hint: To append to the end of an array in JS, you can also write: array_variable.push (new_element); Regards Thomas
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev
_______________________________________________ RKWard-devel mailing list RKWard-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rkward-devel