Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 761c4f285d3afa353219933c4b5717e0 > files > 12

gnumed-doc-1.2.9-1.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
	<title> DevelopmentGuidelines &lt; Gnumed &lt; Foswiki</title>
		  
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="robots" content="noindex" /> <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="WebRss.html" />
	<link rel="icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" />
	<link rel="alternate" href="http://wiki.gnumed.de/bin/edit/Gnumed/DevelopmentGuidelines?t=1362919413" type="application/x-wiki" title="edit DevelopmentGuidelines" />
	<meta name="description" content="DevelopmentGuidelines" />
	 <!--[if IE]></base><![endif]-->
	
	<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/base.css');
</style>
<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/default.css');
</style>
<!--[if IE]><style type="text/css" media="screen">
pre {
	overflow-x:auto;
	padding-bottom:expression(this.scrollWidth > this.offsetWidth ? 16 : 0);
}
</style>
<![endif]-->

<meta name="foswiki.PUBURL" content="http://wiki.gnumed.de/pub" /> <!-- PUBURL -->
<meta name="foswiki.PUBURLPATH" content="/pub" /> <!-- PUBURLPATH -->
<meta name="foswiki.SCRIPTSUFFIX" content="" /> <!-- SCRIPTSUFFIX -->
<meta name="foswiki.SCRIPTURL" content="http://wiki.gnumed.de/bin" /> <!-- SCRIPTURL -->
<meta name="foswiki.SCRIPTURLPATH" content="/bin" /> <!-- SCRIPTURLPATH -->
<meta name="foswiki.SERVERTIME" content="10%20Mar%202013%20-%2013:43" /> <!-- SERVERTIME -->
<meta name="foswiki.SKIN" content="twikinet%2c%20pattern" /> <!-- SKIN -->
<meta name="foswiki.SYSTEMWEB" content="System" /> <!-- SYSTEMWEB -->
<meta name="foswiki.TOPIC" content="DevelopmentGuidelines" /> <!-- TOPIC -->
<meta name="foswiki.USERNAME" content="KarstenHilbert" /> <!-- USERNAME -->
<meta name="foswiki.USERSWEB" content="Main" /> <!-- USERSWEB -->
<meta name="foswiki.WEB" content="Gnumed" /> <!-- WEB -->
<meta name="foswiki.WIKINAME" content="KarstenHilbert" /> <!-- WIKINAME -->
<meta name="foswiki.WIKIUSERNAME" content="Main.KarstenHilbert" /> <!-- WIKIUSERNAME -->
<meta name="foswiki.NAMEFILTER" content="%5b%5cs%5c*%3f~%5e%5c%24%40%25%60%22'%26%3b%7c%3c%3e%5c%5b%5c%5d%23%5cx00-%5cx1f%5d" /> <!-- NAMEFILTER --><!--JQUERYPLUGIN::FOSWIKI::META-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/jquery-1.4.3.js'></script><!--JQUERYPLUGIN-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/livequery/jquery.livequery.js'></script><!--JQUERYPLUGIN::LIVEQUERY-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js'></script><!--JQUERYPLUGIN::FOSWIKI-->
<script type='text/javascript' src='../rsrc/System/JSTreeContrib/jquery.jstree.js'></script><!--JQUERYPLUGIN::JSTREE-->
</head>
<body class=""><div class="foswikiPage">
<a name="PageTop"></a> 
<p></p>
<p></p>
<h1><a name="Development_Guidelines"></a>  Development Guidelines </h1>
<p></p>
<h2><a name="Coding_and_Module_45design_guidelines"></a>  Coding and Module-design guidelines </h2>
<p></p>
<h4><a name="string_handling_47encoding"></a>  string handling/encoding </h4>
<p></p> <ul>
<li> there is no such thing as <em>plain text</em>
</li> <li> always use Unicode internally
</li> <li> appropriately encode()/decode() at IO boundaries <ul>
<li> DB connection (gmPG2.py consumes/produces unicode)
</li> <li> files (use codecs.open(..., encoding=...)
</li> <li> user input (wxPython consumes/produces u'' unicode strings)
</li></ul> 
</li> <li> what is on offer by psycopg2 isn't perfect, but is the recommended way of quoting when outside-of-query parameter passing isn't available and in this way affords some protection against SQL injection attacks (see <a href="http://www.codinghorror.com/blog/archives/000275.html" target="_top">here</a> and <a href="http://stackoverflow.com/questions/681583/sql-injection-on-insert" target="_top">here too</a>): do <strong>not</strong> create queries by string concatenation but rather always use %s + query arguments (gmPG2.py offers convenience on that)
</li></ul> 
<p></p>
<h4><a name="i18n"></a>  i18n </h4>
<p></p> <ul>
<li> wrap all UI strings in _()
</li> <li> always use <em>%(tag)s</em> instead of <em>%s</em> only for replacement <ul>
<li> that way, the order of replacements can be changed in the target language
</li></ul> 
</li> <li> for timestamp formatting use gmDateTime.py::pydt_strftime()
</li> <li> mistakes to avoid are explained at the <a href="http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes" target="_top">KDE project</a> 
</li></ul> 
<p></p>
<h4><a name="backend_access"></a>  backend access </h4>
<p></p> <ul>
<li> always use the middleware
</li> <li> do not put SQL directly in the frontend code - except for match providers
</li> <li> due to limitations in PostgreSQL's inheritance implementation, never ever <strong>write</strong> to clin_root_item or risk data corruption <ul>
<li> we have put in rules disallowing write access to this parent table, to prevent this and if we should have an unprotected parent table elsewhere in the schema, let us know
</li></ul> 
</li></ul> 
<p></p>
<h4><a name="more"></a>  more </h4>
<p></p> <ul>
<li> do <strong>NOT</strong> mix tabs and spaces when indenting (tabs preferred, pure space acceptable)
</li></ul> 
<p></p> <ul>
<li> try providing <em>docstrings</em> (see <a href="http://www.python.org/doc/current/tut/node6.html#SECTION006760000000000000000" target="_top">Python tutorial reference</a>), preferably in EpyDoc style
</li> <li> comment your code
</li> <li> use <a href="NamingConventions.html">NamingConventions</a>
</li></ul> 
<p></p> <ul>
<li> each GUI panel should be a black box, communicating with other panels via messages
</li></ul> 
<p></p> <ul>
<li> using exceptions: suggested to follow <ul>
<li> <a href="http://www.javaworld.com/javaworld/jw-07-1998/jw-07-techniques_p.html" target="_top">guidelines</a>
</li> <li> <a href="http://www.nedbatchelder.com/text/exceptions-vs-status.html" target="_top">http://www.nedbatchelder.com/text/exceptions-vs-status.html</a> and links from there
</li> <li> in Python there is no checked vs unchecked exceptions plus
</li> <li> <strong>not</strong> using the string interface, but only the class interface, on exceptions
</li> <li> related email thread <a href="http://lists.gnu.org/archive/html/gnumed-devel/2005-12/msg00296.html" target="_top">here</a>
</li></ul> 
</li></ul> 
<p></p> <ul>
<li> wxwindows guidelines at <a href="http://wxguide.sourceforge.net/guidelines/content.html" target="_top">http://wxguide.sourceforge.net/guidelines/content.html</a>
</li></ul> 
<p></p>
<h2><a name="Key_area_coordinators"></a>  Key area coordinators </h2>
<p></p>
<table class="foswikiTable" rules="none" border="1">
	<thead>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=0;table=3;up=0#sorted_table" title="Sort by this column">area</a> </th>
			<th class="foswikiTableCol1 foswikiLastCol"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=1;table=3;up=0#sorted_table" title="Sort by this column">coordinators</a> </th>
		</tr>
	</thead>
	<tbody>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> database schema </td>
			<td class="foswikiTableCol1 foswikiLastCol"> <a href="../Main/KarstenHilbert.html">KarstenHilbert</a> </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol"> schema bootstrapping </td>
			<td class="foswikiTableCol1 foswikiLastCol"> <a href="../Main/KarstenHilbert.html">KarstenHilbert</a> </td>
		</tr>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> i18n issues </td>
			<td class="foswikiTableCol1 foswikiLastCol"> <a href="../Main/KarstenHilbert.html">KarstenHilbert</a> </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol"> middleware/business objects </td>
			<td class="foswikiTableCol1 foswikiLastCol"> <a href="../Main/KarstenHilbert.html">KarstenHilbert</a>, <a href="../Main/CarlosMoro.html">CarlosMoro</a> </td>
		</tr>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> GUI conceptual design </td>
			<td class="foswikiTableCol1 foswikiLastCol"> Richard Terry </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol"> packaging (Debian) </td>
			<td class="foswikiTableCol1 foswikiLastCol"> Andreas Tille </td>
		</tr>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> packaging (Gentoo) </td>
			<td class="foswikiTableCol1 foswikiLastCol"> <a href="../Main/DavidGrant.html">DavidGrant</a> </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol"> Wiki </td>
			<td class="foswikiTableCol1 foswikiLastCol"> Jim Busser </td>
		</tr>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> <a href="http://www.gnumed.org" target="_top">website</a> </td>
			<td class="foswikiTableCol1 foswikiLastCol"> Tony Lembke </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> release management </td>
			<td class="foswikiTableCol1 foswikiLastCol foswikiLast"> <a href="../Main/SebastianHilbert.html">SebastianHilbert</a> </td>
		</tr>
	</tbody></table>
<p></p> <ul>
<li> demographics &amp; contacts: contact Ian, Richard
</li> <li> see <a href="RoadMap.html">RoadMap</a> for a listing of required / desired / planned functions
</li> <li> a historical post on this is at: http://mail.gnu.org/archive/html/gnumed-devel/2003-11/msg00119.html
</li> <li> <a href="DevelopmentProcess.html">DevelopmentProcess</a> gives an overview of just how people's ideas and needs should come together into the project
</li></ul> 
<p></p>
<p></p>
<hr />
<p></p>
<h2><a name="rarely_needed_guidelines"></a>  rarely needed guidelines </h2>
<p></p>
<h2><a name="VCS_Guidelines"></a>  VCS Guidelines </h2>
<p></p> <ul>
<li> Code, test, retest, make sure you did not introduce new bugs, if unsure contact the author of that code or admininistator.
</li> <li> For anything significant, if you do not receive sufficient feedback within a reasonable timeframe inquire again. Do not assume saying nothing means approval.
</li> <li> Please, preferably put a README explaining how to run your code into the test directory as soon as you think your code can be tried out by others e.g. if it doesn't run within the otherwise unmodified gnumed framework or is otherwise self-explanatory. Please <strong>communicate</strong> with us. Your code may be excellent, and it would be a shame if we wouldn't use it because we don't know about it or how to use it.
</li> <li> take a close look at what code is already in VCS, use existing code whenever possible, enhance existing code whenever necessary
</li> <li> comment your code (meaning comment everything, even if it might seem stupid to you! ); uncommented code (new files etc. ) will not make it into the main trunk. Some info on commenting limitations of Epydoc <a href="http://lists.gnu.org/archive/html/gnumed-devel/2004-06/msg00211.html" target="_top">here</a>
</li> <li> submit early and often PROVIDED the code runs, and announce changes to the list
</li></ul> 
<p></p> <ul>
<li> If you code like crazy in test-area and add new functions to files you are not responsible for (you did not append it initially or have not take over the duty of maintaining the file) do not commit substantial changes without contacting the guy that is responsible for the file.
</li> <li> original gnumed-devel <a href="http://mail.gnu.org/archive/html/gnumed-devel/2003-11/threads.html#00126" target="_top">thread</a>
</li></ul> 
<p></p>
<h2><a name="Artwork_Handling"></a>  Artwork Handling </h2> <ul>
<li> a topic has been initiated at <a href="ArtworkHandling.html">Artwork Handling</a>
</li></ul> 
<p></p>
<h2><a name="Packaging_information"></a>  Packaging information </h2> <ul>
<li> a topic has been initiated at <a href="BinaryPackages.html">BinaryPackages</a>
</li></ul> 
<p></p>
<h2><a name="Performance_design"></a>  Performance design </h2> <ul>
<li> a topic has been initiated at <a href="PerformanceDesign.html">PerformanceDesign</a>
</li></ul> 
<p></p>
-- <a href="../Main/JamesBusser.html">JamesBusser</a> - 24 Sep 2004
<a name="TopicEnd"></a>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</body></html>