<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code &#8211; Blackbams Blog</title>
	<atom:link href="https://blog.blackbam.at/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.blackbam.at</link>
	<description>development - digital arts - internet</description>
	<lastBuildDate>Thu, 10 Sep 2020 08:59:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>From STUPID to SOLID Code! &#8211; recommended article on best practice in software development</title>
		<link>https://blog.blackbam.at/2020/09/10/from-stupid-to-solid-code-recommended-article-on-best-practice-in-software-development/</link>
					<comments>https://blog.blackbam.at/2020/09/10/from-stupid-to-solid-code-recommended-article-on-best-practice-in-software-development/#respond</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Thu, 10 Sep 2020 08:59:21 +0000</pubDate>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[SOLID]]></category>
		<category><![CDATA[STUPID]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://blog.blackbam.at/?p=2419</guid>

					<description><![CDATA[Today I want to share an article which is 7 years old but still 100% accurate. It shows the common mistakes in software development and the best practices about how to avoid those mistakes. Short summary &#8211; do not do STUPID code: Singleton Tight Coupling Untestability Premature Optimization Indescriptive Naming Duplication Do SOLID code: Single [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Today I want to share an article which is 7 years old but still 100% accurate. It shows the common mistakes in software development and the best practices about how to avoid those mistakes.</p>
<p>Short summary &#8211; do not do <strong>STUPID</strong> code:</p>
<ul>
<li><strong>S</strong>ingleton</li>
<li><strong>T</strong>ight Coupling</li>
<li><strong>U</strong>ntestability</li>
<li><strong>P</strong>remature Optimization</li>
<li><strong>I</strong>ndescriptive Naming</li>
<li><strong>D</strong>uplication</li>
</ul>
<p>Do <strong>SOLID</strong> code:</p>
<ul>
<li><strong>S</strong>ingle Responsibility Principle</li>
<li><strong>O</strong>pen/Closed Principle</li>
<li><strong>L</strong>iskov Substitution Principle</li>
<li><strong>I</strong>nterface Segregation Principle</li>
<li><strong>D</strong>ependency Inversion Principle</li>
</ul>
<p>Read the full article here: <a href="https://williamdurand.fr/2013/07/30/from-stupid-to-solid-code/">https://williamdurand.fr/2013/07/30/from-stupid-to-solid-code/</a></p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2F2020%2F09%2F10%2Ffrom-stupid-to-solid-code-recommended-article-on-best-practice-in-software-development%2F&#038;title=From%20STUPID%20to%20SOLID%20Code%21%20%E2%80%93%20recommended%20article%20on%20best%20practice%20in%20software%20development" data-a2a-url="https://blog.blackbam.at/2020/09/10/from-stupid-to-solid-code-recommended-article-on-best-practice-in-software-development/" data-a2a-title="From STUPID to SOLID Code! – recommended article on best practice in software development"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/2020/09/10/from-stupid-to-solid-code-recommended-article-on-best-practice-in-software-development/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Basic Ajax Skeleton Code</title>
		<link>https://blog.blackbam.at/2012/02/07/basic-ajax-skeleton-code/</link>
					<comments>https://blog.blackbam.at/2012/02/07/basic-ajax-skeleton-code/#respond</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Tue, 07 Feb 2012 08:26:01 +0000</pubDate>
				<category><![CDATA[JavaScript / Ajax]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[skeleton]]></category>
		<guid isPermaLink="false">https://blog.blackbam.at/?p=1848</guid>

					<description><![CDATA[Nothing new, nothing special... just the working code of a basic Ajax skeleton, as this has to be copied and pasted that often. This example shows an application similar to Google suggest, which searches related values, whenever a key is pressed.]]></description>
										<content:encoded><![CDATA[<p>Nothing new, nothing special&#8230; just the working code of a basic Ajax skeleton, as this has to be copied and pasted that often. This example shows an application similar to Google suggest, which searches related values, whenever a key is pressed.</p>
<p>Note: Since jQuery is that popular today, it is possibly better to use this (see <a href="http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery#Rate_me:_Using_Ajax" title="JQuery Ajax Tutorial">jQuery Ajax Tutorial</a>).</p>
<div class="code_title">index.html &#8211; function call and result representation</div>
<pre lang="html4strict">
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax test</title>
<script type="text/javascript" src="ajax.js"></script>
</head>

<body>
<input type="text" onkeyup="AjaxRequest(this.value);" /><br/>
<p id="result"></p>
</body>
</html>
</pre>
<p></p>
<div class="code_title">ajax.js &#8211; request, response and data processing</div>
<pre lang="javascript">
var XMLHTTP = null;

function AjaxRequest(compString) {

// XMLHTTP-Request Objekt erzeugen, dabei auf Browserkonformität achten
	if(window.XMLHttpRequest) {
		XMLHTTP = new XMLHttpRequest();
	} else if(window.ActiveXObject) {
		try {
			XMLHTTP = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(ex) {
			try {
				XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(ex) {
			}
		}
	}
	
	XMLHTTP.open("GET","test.php?compString="+compString);
	XMLHTTP.onreadystatechange = MyRequestExecute;
	XMLHTTP.send(null);
}

// wird jedes mal aufgerufen, wenn der XMLHTTP-Request eine neue Stufe erreicht, bei 4 ist die Antwort des Servers eingetroffen
function MyRequestExecute() {
	// responseText als Javascript-String, responseXML als Javascript XML-DOM-Element, status Statuscode, statusText des. Beschreibung
	if(XMLHTTP.readyState == 4) {
		document.getElementById("result").innerHTML = XMLHTTP.responseText;
	}
}
</pre>
<p></p>
<p>The server side</p>
<p></p>
<div class="code_title">test.php</div>
<pre lang="php">
<?php
require_once('config.inc.php');

// Datenbankverbindung
try {
	$db = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASSWORD);
	
	//mysql-Abfrage
	$sql = "SELECT * FROM tags WHERE username = '".$_GET['compString']."'"; 
	
	$horst = $db->query($sql);
	
} catch (Exception $e) {
    echo 'Verbindungsaufbau fehlgeschlagen: ',  $e->getMessage(), "\n";
}

echo $_GET['compString']."< pre >".$horst."</  pre >";
?>
</pre>
<div class="code_title">config.inc.php</div>
<pre lang="php">
<?php
// Definition der Konstanten
define('DB_USER','****');
define('DB_PASSWORD','****');
define('DB_HOST','****');
define('DB_NAME','****');
?>
</pre>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2F2012%2F02%2F07%2Fbasic-ajax-skeleton-code%2F&#038;title=Basic%20Ajax%20Skeleton%20Code" data-a2a-url="https://blog.blackbam.at/2012/02/07/basic-ajax-skeleton-code/" data-a2a-title="Basic Ajax Skeleton Code"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/2012/02/07/basic-ajax-skeleton-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Secure Sessions with PHP</title>
		<link>https://blog.blackbam.at/2010/01/26/session-sicherheit-in-php/</link>
					<comments>https://blog.blackbam.at/2010/01/26/session-sicherheit-in-php/#comments</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Tue, 26 Jan 2010 17:25:17 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[Proxies]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[SESSID]]></category>
		<category><![CDATA[Session]]></category>
		<category><![CDATA[Session-ID]]></category>
		<category><![CDATA[Sessions]]></category>
		<category><![CDATA[Sicherheit]]></category>
		<category><![CDATA[Skript]]></category>
		<category><![CDATA[Snippet]]></category>
		<guid isPermaLink="false">http://www.blackbam.at/blog/?p=468</guid>

					<description><![CDATA[Sorry, this entry is only available in Deutsch.]]></description>
										<content:encoded><![CDATA[<p class="qtranxs-available-languages-message qtranxs-available-languages-message-en">Sorry, this entry is only available in <a href="https://blog.blackbam.at/de/tag/code/feed/" class="qtranxs-available-language-link qtranxs-available-language-link-de" title="Deutsch">Deutsch</a>.</p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2F2010%2F01%2F26%2Fsession-sicherheit-in-php%2F&#038;title=Secure%20Sessions%20with%20PHP" data-a2a-url="https://blog.blackbam.at/2010/01/26/session-sicherheit-in-php/" data-a2a-title="Secure Sessions with PHP"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/2010/01/26/session-sicherheit-in-php/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
