<?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>build broken &#187; Refaktorisierung</title>
	<atom:link href="http://blog.aztec-project.org/tag/refaktorisierung/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.aztec-project.org</link>
	<description>but we can fix it! Sometimes :)</description>
	<lastBuildDate>Fri, 11 Jun 2010 12:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Refaktorisierung &#8211; mal anders erklärt</title>
		<link>http://blog.aztec-project.org/2010/01/18/refaktorizierung-mal-anders-erklaert/</link>
		<comments>http://blog.aztec-project.org/2010/01/18/refaktorizierung-mal-anders-erklaert/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 21:09:06 +0000</pubDate>
		<dc:creator>Christina Hirth</dc:creator>
				<category><![CDATA[Clean Code Developing]]></category>
		<category><![CDATA[Buchempfehlung]]></category>
		<category><![CDATA[Clean Code]]></category>
		<category><![CDATA[Refaktorisierung]]></category>

		<guid isPermaLink="false">http://blog.aztec-project.org/?p=844</guid>
		<description><![CDATA[Ich lese gerade das Buch Agile Principles, Patterns and Practices in C# from Robert C. Martin und Micah Martin. Dabei bin ich auf eine so tolle Metapher gestoßen, dass ich sie hier unbedingt niederschreiben wollte (die Übersetzung ist frei von mir): Refaktorisierung ist, wie die Küche nach dem Abendessen aufzuräumen. Das erste Mal, wenn du [...]]]></description>
			<content:encoded><![CDATA[<p>Ich lese gerade das Buch <a href="http://www.amazon.de/Agile-Principles-Patterns-Practices-C/dp/0131857258" target="_blank">Agile Principles, Patterns and Practices in C#</a> from Robert C. Martin und Micah Martin. Dabei bin ich auf eine so tolle Metapher gestoßen, dass ich sie hier unbedingt niederschreiben wollte (die Übersetzung ist frei von mir):</p>
<blockquote><p>Refaktorisierung ist, wie die Küche nach dem Abendessen aufzuräumen. Das erste Mal, wenn du das überspringst, bist mit der Kochen schneller fertig. Aber das Fehlen von sauberem Geschirr und sauberem Arbeitsplatz führt dazu, dass die Vorbereitung diesmal länger dauert. Am liebsten würdest du das Aufräumen wieder überspringen. Tatsache ist, dass du <b>heute</b> ohne das lästige Geschirrspülen wieder schneller fertig wärst. Aber der Schmutz wächst und wächst. Jedes Mal dauert es länger, das richtige Küchengerät zu finden, die vertrockneten Schmutzschichten vom Geschirr ab zu kratzen, und so weiter und so fort. Das Vorbereiten des Abendessens dauert ewig&#8230;<br />
Das Überspringen der Abwasch macht das Kochen eigentlich nicht wirklich schneller.</p>
<p>Das Ziel von Refaktorisierung ist die Bereinigung des Codes, jeden Tag, jede Stunde, jede Minute. Wir wollen nicht den Code versauen. Wir wollen nicht ständig gezwungen zu sein, schmutzigen Bits und Bytes sauber zu schrubben. Wir wollen jeder Zeit in der Lage zu sein, unser System mühelos zu erweitern und zu verändern. Der wichtigste Faktor, der uns das möglich macht, ist die Sauberkeit des Codes. </p></blockquote>
<p>Das Buch habe zwar noch nicht ganz durch, aber was ich bis jetzt gelesen habe, kann ich nur unterschreiben. Es beinhaltet die Prinzipien, wie man in einem agilen Team sauberen Code plant und Mustern und Beispiele, wie man ihn schreibt. Und wie ihr ja sieht, ist es in eine ganz tolle Art geschrieben <img src='http://blog.aztec-project.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://dotnet-kicks.de/kick/?url=http%3a%2f%2fblog.aztec-project.org%2f2010%2f01%2f18%2frefaktorizierung-mal-anders-erklaert%2f" target="_blank"><img src="http://dotnet-kicks.de/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.aztec-project.org%2f2010%2f01%2f18%2frefaktorizierung-mal-anders-erklaert%2f" alt="kick it on dotnet-kicks.de" border="0"></a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.aztec-project.org%2F2010%2F01%2F18%2Frefaktorizierung-mal-anders-erklaert%2F&amp;title=Refaktorisierung%20%26%238211%3B%20mal%20anders%20erkl%C3%A4rt"><img src="http://blog.aztec-project.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.aztec-project.org/2010/01/18/refaktorizierung-mal-anders-erklaert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET-Webservice mit ASP-Classic ansprechen</title>
		<link>http://blog.aztec-project.org/2009/06/19/net-webservice-mit-asp-classic-ansprechen/</link>
		<comments>http://blog.aztec-project.org/2009/06/19/net-webservice-mit-asp-classic-ansprechen/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 10:55:28 +0000</pubDate>
		<dc:creator>Christina Hirth</dc:creator>
				<category><![CDATA[Webservice]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP-Classic]]></category>
		<category><![CDATA[Refaktorisierung]]></category>

		<guid isPermaLink="false">http://blog.aztec-project.org/?p=216</guid>
		<description><![CDATA[Seit einiger Zeit sind wir dabei, unser Portal zu refaktorisieren. Das entfernte Ziel ist, alles in .NET um zu bauen. Das betrifft zur Zeit über tausend Seiten aber wir möchten noch in diesem Leben fertig sein ;) 

Dazu kommt noch, dass wir - selbstverständlich - agiles Softwarentwicklung betreiben, was eine ständige und rhythmische Iteration vorsieht, keine Mega-Projekte mit ungewissem Ende. Also haben wir die verschiedenen Bereiche identifiziert und diese werden einer nach dem anderen neu gebaut.
Die neuen DLL-s in .NET werden mit Hilfe von verschiedenen Webservices angesprochen. <a href="http://blog.aztec-project.org/?p=216">weiter lesen ...</a>]]></description>
			<content:encoded><![CDATA[<p>Seit einiger Zeit sind wir dabei, unser Portal zu refaktorisieren. Das entfernte Ziel ist, alles in .NET um zu bauen. Das betrifft zur Zeit über tausend Seiten aber wir möchten noch in diesem Leben fertig sein <img src='http://blog.aztec-project.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Dazu kommt noch, dass wir &#8211; selbstverständlich &#8211; agiles Softwarentwicklung betreiben, was eine ständige und rhythmische Iteration vorsieht, keine Mega-Projekte mit ungewissem Ende. Also haben wir die verschiedenen Bereiche identifiziert und diese werden einer nach dem anderen neu gebaut.<br />
Die neuen DLL-s in .NET werden mit Hilfe von verschiedenen Webservices angesprochen. Das führt allerdings unweigerlich dazu, 2 Technologien &#8211; ASP-Classic und .NET(C#) &#8211; miteinander <span style="text-decoration: underline;">sicher</span> kommunizieren zu lassen. Das funktioniert so:</p>
<p>Dieser hier könnte der besagte .NET Webservice sein:</p>
<pre>
<div style="font-size: 10pt; background: white; color: black; font-family: Courier New;">
<span style="color: #2b91af;">    1</span> POST <a href="http://www.webAdresse.de/Webservice.asmx">http://www.webAdresse.de/Webservice.asmx</a> HTTP/1.1
<span style="color: #2b91af;">    2</span> Host: webServer
<span style="color: #2b91af;">    3</span> Content-Type: text/xml; charset=utf-8
<span style="color: #2b91af;">    4</span> Content-Length: length
<span style="color: #2b91af;">    5</span> SOAPAction: "http://tempuri.org/AendernEtwas"
<span style="color: #2b91af;">    6</span>
<span style="color: #2b91af;">    7</span> <span style="color: blue;">&lt;?</span><span style="color: #a31515;">xml</span> <span style="color: red;">version</span><span style="color: blue;">="1.0"</span> <span style="color: red;">encoding</span><span style="color: blue;">="utf-8"?&gt;</span>
<span style="color: #2b91af;">    8</span> <span style="color: blue;">&lt;</span><span style="color: #a31515;">soap</span><span style="color: blue;">:</span><span style="color: #a31515;">Envelope</span> <span style="color: #a31515;">xmlns</span><span style="color: blue;">:</span><span style="color: red;">xsi</span><span style="color: blue;">=http://www.w3.org/2001/XMLSchema-instance</span>
<span style="color: #2b91af;">    9</span>  <span style="color: #a31515;">xmlns</span><span style="color: blue;">:</span><span style="color: red;">xsd</span><span style="color: blue;">="http://www.w3.org/2001/XMLSchema"</span> <span style="color: #a31515;">xmlns</span><span style="color: blue;">:</span><span style="color: red;">soap</span><span style="color: blue;">="http://schemas.xmlsoap.org/soap/envelope/"&gt;</span>
<span style="color: #2b91af;">   10</span>   <span style="color: blue;">&lt;</span><span style="color: #a31515;">soap</span><span style="color: blue;">:</span><span style="color: #a31515;">Body</span><span style="color: blue;">&gt;</span>
<span style="color: #2b91af;">   11</span>     <span style="color: blue;">&lt;</span><span style="color: #a31515;">AendernEtwas</span> <span style="color: red;">xmlns</span><span style="color: blue;">="http://tempuri.org/"&gt;</span>
<span style="color: #2b91af;">   12</span>       <span style="color: blue;">&lt;</span><span style="color: #a31515;">id</span><span style="color: blue;">&gt;</span>int<span style="color: blue;">&lt;/</span><span style="color: #a31515;">id</span><span style="color: blue;">&gt;</span>
<span style="color: #2b91af;">   13</span>       <span style="color: blue;">&lt;</span><span style="color: #a31515;">person</span><span style="color: blue;">&gt;</span>
<span style="color: #2b91af;">   14</span>         <span style="color: blue;">&lt;</span><span style="color: #a31515;">nachname</span><span style="color: blue;">&gt;</span>string<span style="color: blue;">&lt;/</span><span style="color: #a31515;">nachname</span><span style="color: blue;">&gt;</span>
<span style="color: #2b91af;">   15</span>         <span style="color: blue;">&lt;</span><span style="color: #a31515;">vorname</span><span style="color: blue;">&gt;</span>string<span style="color: blue;">&lt;/</span><span style="color: #a31515;">vorname</span><span style="color: blue;">&gt;</span>
<span style="color: #2b91af;">   16</span>       <span style="color: blue;">&lt;/</span><span style="color: #a31515;">person</span><span style="color: blue;">&gt;</span>
<span style="color: #2b91af;">   17</span>     <span style="color: blue;">&lt;/</span><span style="color: #a31515;">AendernEtwas</span><span style="color: blue;">&gt;</span>
<span style="color: #2b91af;">   18</span>   <span style="color: blue;">&lt;/</span><span style="color: #a31515;">soap</span><span style="color: blue;">:</span><span style="color: #a31515;">Body</span><span style="color: blue;">&gt;</span>
<span style="color: #2b91af;">   19</span> <span style="color: blue;">&lt;/</span><span style="color: #a31515;">soap</span><span style="color: blue;">:</span><span style="color: #a31515;">Envelope</span><span style="color: blue;">&gt;</span></div>
</pre>
<p>Um ihn aufzurufen, brauchen wir in ASP folgendes:</p>
<pre style="font-size: 10pt; background: white; color: black; font-family: Courier New;"><span style="color: #2b91af;">    1</span> <span style="color: green;">'Webserviceaufruf mit Angaben von Methodennamen und Parameter-XML</span>
<span style="color: #2b91af;">    2</span> <span style="color: blue;">Function</span> webserviceCall(<span style="color: blue;">ByVal</span> methode, <span style="color: blue;">ByVal</span> xmlParameters)
<span style="color: #2b91af;">    3</span>     <span style="color: blue;">Dim</span> objRequest, strRet
<span style="color: #2b91af;">    4</span>     <span style="color: blue;">Set</span> objRequest = Server.createobject(<span style="color: #a31515;">"MSXML2.XMLHTTP"</span>)
<span style="color: #2b91af;">    5</span>     <span style="color: blue;">With</span> objRequest
<span style="color: #2b91af;">    6</span>     .open <span style="color: #a31515;">"POST"</span>, <span style="color: #a31515;">"http://www.webadresse.de/Webservices.asmx"</span>, <span style="color: blue;">False</span>
<span style="color: #2b91af;">    7</span>     .setRequestHeader <span style="color: #a31515;">"Content-Type"</span>, <span style="color: #a31515;">"text/xml; charset=utf-8"</span>
<span style="color: #2b91af;">    8</span>     .setRequestHeader <span style="color: #a31515;">"SOAPAction11"</span>, <span style="color: #a31515;"><span style="color: #000000;">methode</span></span>
<span style="color: #2b91af;">    9</span>     .send xmlParameters
<span style="color: #2b91af;">   10</span>     <span style="color: blue;">End</span> <span style="color: blue;">With</span>
<span style="color: #2b91af;">   11</span>     strRet = objRequest.responseText
<span style="color: #2b91af;">   12</span>     <span style="color: blue;">if</span> <span style="color: blue;">CInt</span>(objRequest.status) &lt;&gt; 200 <span style="color: blue;">then</span>
<span style="color: #2b91af;">   13</span>         <span style="color: green;">'Fehlerbehandlung, wenn Aufruf fehlgeschlagen
</span><span style="color: #2b91af;">   14</span>     <span style="color: blue;">end</span> <span style="color: blue;">if</span>
<span style="color: #2b91af;">   15</span>     <span style="color: blue;">Set</span> objRequest = <span style="color: blue;">Nothing</span>
<span style="color: #2b91af;">   16</span>     webserviceCall = strRet
<span style="color: #2b91af;">   17</span> <span style="color: blue;">end</span> <span style="color: blue;">function</span></pre>
<p><!--EndFragment--><span style="color: #000000;">Die Parameter werden so übergeben:</span></p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = <span style="color: #a31515;">&quot;&lt;?xml version=&quot;&quot;1.0&quot;&quot; encoding=&quot;&quot;utf-8&quot;&quot;?&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&lt;soap:Envelope xmlns:xsi=&quot;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&quot; xmlns:xsd=&quot;&quot;http://www.w3.org/2001/XMLSchema&quot;&quot; xmlns:soap=&quot;&quot;http://www.w3.org/2003/05/soap-envelope&quot;&quot;&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &lt;soap:Body&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;AendernEtwas xmlns=&quot;&quot;http://www.webadresse.de&quot;&quot;&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;id&gt;</span>  &amp; id &amp; <span style="color: #a31515;">&lt;/id&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;person&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;nachname&gt;&lt;![CDATA[&quot;</span> &amp; nachname &amp; <span style="color: #a31515;">&quot;]]&gt;&lt;/nachname&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;vorname&gt;&lt;![CDATA[&quot;</span> &amp; vorname &amp; <span style="color: #a31515;">&quot;]]&gt;&lt;/nachname&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/person&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/AendernEtwas&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&nbsp;&nbsp;&nbsp; &lt;/soap:Body&gt;&quot;</span> &amp; VbCrLf</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; strParameters = strParameters &amp; <span style="color: #a31515;">&quot;&lt;/soap:Envelope&gt;&quot;</span></p>
</div>
<p>Und das wäre dann alles, jetzt muss die Funktion nur noch aufgerufen werden:<br />
<span style="left: 10px;font-size: 10pt; background: white; color: black; font-family: Courier New;"><br />
responseText = webserviceCall(<span style="color: #a31515;">&quot;AendernEtwas&quot;</span>, strParameters)</span></p>
<p>Das Ergebnis kann man danach mit Microsoft.XMLDOM ausgelesen werden.</p>
<p>Noch ein paar Bemerkungen:<br />
- .NET ist im Gegensatz zu ASP-Classic case sensitive und eine stark typisierte Sprache, also obacht auf</p>
<ol>
<li>die korrekte Schreibweise der Parameternamen in XML und auf</li>
<li>die Datentypen: <span style="color: #0000ff;">strings </span>müssen mit <span style="color: #000000;"><strong>CDATA </strong></span>umklammert, <span style="color: #0000ff;">Enums</span> mit dem Namen angesprochen und Datumswerte in ISO 8601-Datumsformat (<span style="color: #0000ff;">YYYY-MM-DDThh:min:sec.millisecond</span>) angegeben werden.</li>
</ol>
<p><!--EndFragment--><a href="http://blog.aztec-project.org/?p=216"></a></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztec-project.org/2009/06/19/net-webservice-mit-asp-classic-ansprechen/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

