<?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>devbar.de</title>
	<atom:link href="http://www.devbar.de/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devbar.de</link>
	<description>just code chunks</description>
	<lastBuildDate>Fri, 04 May 2012 06:39:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JavaScript &amp; CSS Outlining: meine aktuelle Lieblingsextension f&#252;r VS 2010</title>
		<link>http://www.devbar.de/index.php/2012/05/javascript-css-outlining-meine-aktuelle-lieblingsextension-fr-vs-2010/</link>
		<comments>http://www.devbar.de/index.php/2012/05/javascript-css-outlining-meine-aktuelle-lieblingsextension-fr-vs-2010/#comments</comments>
		<pubDate>Fri, 04 May 2012 06:38:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[VisualStudio]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2012/05/javascript-css-outlining-meine-aktuelle-lieblingsextension-fr-vs-2010/</guid>
		<description><![CDATA[Wenn ihr auch JavaScript in Visual Studio programmiert und Freunde des #region Tags seid, dann solltet ihr euch diese Extension installieren. Es kostet nur einen Klick .
&#160;
Links

Codeplex

]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2012/05/screen1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 8px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="screen1" border="0" alt="screen1" align="right" src="http://www.devbar.de/wp-content/uploads/2012/05/screen1_thumb.png" width="181" height="116" /></a>Wenn ihr auch JavaScript in Visual Studio programmiert und Freunde des #region Tags seid, dann solltet ihr euch diese Extension installieren. Es kostet nur einen Klick <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/05/wlEmoticon-winkingsmile.png" />.</p>
<p>&#160;</p>
<p><strong>Links</strong></p>
<ul>
<li><a href="http://jsoutlining.codeplex.com/">Codeplex</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/05/javascript-css-outlining-meine-aktuelle-lieblingsextension-fr-vs-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Namespaces/Packages in JavaScript</title>
		<link>http://www.devbar.de/index.php/2012/05/namespacespackages-in-javascript/</link>
		<comments>http://www.devbar.de/index.php/2012/05/namespacespackages-in-javascript/#comments</comments>
		<pubDate>Fri, 04 May 2012 06:29:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Namespaces]]></category>
		<category><![CDATA[Objektorientierung]]></category>
		<category><![CDATA[Packages]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2012/05/namespacespackages-in-javascript/</guid>
		<description><![CDATA[Kommt man aus der wohlgeordneten Welt der objektorientierten Hochsprachen, kommt einem JavaScript hin und wieder anarchistisch vor. Wenn man beispielsweise danach sucht Namespaces (C/C#) oder Packages (Java) nutzen zu wollen, scheint es dabei eine ganze Palette an Lösungsansätzen zu geben. Meinen Lieblingsansatz gebe ich hier mal zum Besten.
  
// Hauptknoten in devbar.js erzeugen
var devbar [...]]]></description>
			<content:encoded><![CDATA[<p>Kommt man aus der wohlgeordneten Welt der objektorientierten Hochsprachen, kommt einem JavaScript hin und wieder anarchistisch vor. Wenn man beispielsweise danach sucht Namespaces (C/C#) oder Packages (Java) nutzen zu wollen, scheint es dabei eine ganze Palette an Lösungsansätzen zu geben. Meinen Lieblingsansatz gebe ich hier mal zum Besten.</p>
<p>  <span id="more-811"></span>
<pre class="brush: js;">// Hauptknoten in devbar.js erzeugen
var devbar = new Object();</pre>
<p>Sehr simple: Man erzeugt seinen Hauptknoten einfach als Objekt.</p>
<pre class="brush: js;">// Verschiedene Input/Output-Operationen
(function(){

    // Unterknoten io
    devbar.io = new Object();

    // Klasse File
    devbar.io.File = function(filename){
    }

    // Hier ein paar Methoden
    devbar.io.File.prototype = {
        saveFile: function(){...},
        readFile: function(){...}
    }

    // Hier ein paar *statische* Methoden
    devbar.io.File.deleteFile = function(filename){
        ...
    }

    devbar.io.File.createFile = function(filename){
        ...
    }

}());</pre>
<p>Weitere Konten lassen sich also ganz einfach erzeugen. Statische Methoden sind ebenfalls möglich.</p>
<p>Zuletzt ein kleines Anwendungsbeispiel:</p>
<pre class="brush: xml;">&lt;script src=&quot;devbar/devbar.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;devbar/io.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre>
<pre class="brush: js;">// Klasse erstellen
var file = new devbar.io.File(&quot;test.txt&quot;);

// Datei lesen
var text = file.readFile();
alert(text);

// Statische Methode ohne Instanz
devbar.io.File.deleteFile(&quot;test.txt&quot;);</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/05/namespacespackages-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smart Notifier f&#252;r Blackberry</title>
		<link>http://www.devbar.de/index.php/2012/03/smart-notifier-fr-blackberry/</link>
		<comments>http://www.devbar.de/index.php/2012/03/smart-notifier-fr-blackberry/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 15:43:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Anruf]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[Blackbbery]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Smart Notifier]]></category>
		<category><![CDATA[SMS]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2012/03/smart-notifier-fr-blackberry/</guid>
		<description><![CDATA[Kennt ihr das? Ihr habt malwieder euer BlackBerry verlegt und wartet eigentlich auf eine wichtige SMS oder einen Anruf? Oder das Ding liegt malwieder im Auto wo es unbemerkt vor sich hin bimmelt. Für alle die das genauso ärgerlich finden wie ich, gibt es Smart Notifier.
  
Wie funktioniert ’s?
Das BlackBerry muss so eingerichtet sein, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2012/03/Screenshot_wetfloor.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 12px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screenshot_wetfloor" border="0" alt="Screenshot_wetfloor" align="left" src="http://www.devbar.de/wp-content/uploads/2012/03/Screenshot_wetfloor_thumb.png" width="141" height="296" /></a>Kennt ihr das? Ihr habt malwieder euer BlackBerry verlegt und wartet eigentlich auf eine wichtige SMS oder einen Anruf? Oder das Ding liegt malwieder im Auto wo es unbemerkt vor sich hin bimmelt. Für alle die das genauso ärgerlich finden wie ich, gibt es <a href="http://smartnotifier.devbar.de/">Smart Notifier</a>.</p>
<p>  <span id="more-788"></span><br />
<h3>Wie funktioniert ’s?</h3>
<p>Das BlackBerry muss so eingerichtet sein, dass automatisch eine WLAN-Verbindung mit eurem Heimnetzwerk hergestellt wird. Wenn eine Verbindung aufgebaut ist verbindet sich die App mit einem Server der z.B. auf eurem Arbeitsplatzrechner installiert sein kann. Im Systeminfo-Bereich von Windows wird ein kleines Symbol angezeigt, das u.a. den Akkuladestand meldet. Bei Doppelklick öffnet sich die Liste von Anrufen und SMS die Smart Notifier mitbekommen hat.</p>
<h3>&#160;</h3>
<h3>&#160;</h3>
<h3>&#160;</h3>
<h3>&#160;</h3>
<h3>&#160;</h3>
<h3>Features</h3>
<ul>
<li>Wenn eine SMS auf eurem Blackberry eingeht, könnt ihr diese auf eurem PC lesen ohne nach dem Telefon zu kramen. </li>
<li><a href="http://www.devbar.de/wp-content/uploads/2012/03/trayso_256.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="trayso_256" border="0" alt="trayso_256" align="right" src="http://www.devbar.de/wp-content/uploads/2012/03/trayso_256_thumb.png" width="93" height="93" /></a>Wenn ein Anruf eingeht kann die App automatisch die Windows-Lautstärke herunterregeln, damit ihr das Klingeln hört. </li>
<li>Wenn ein bestimmtes Batterielevel erreicht ist, gibt es eine Meldung auf eurem Rechner und ihr könnte euer Telefon direkt ans Ladegerät packen. </li>
<li>Eigene Sounds bei SMS oder Anruf </li>
</ul>
<p>Ihr könnt die App natürlich erstmal&#160; 30 Tage testen. (Unverbindlich und mit Rückgaberecht <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/03/wlEmoticon-winkingsmile1.png" />)</p>
<p>Viel Spaß!</p>
<p><a href="http://smartnotifier.devbar.de/">Smart Notifier Website</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/03/smart-notifier-fr-blackberry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking App for Playbook using RESTful Powerbuilder Web Service</title>
		<link>http://www.devbar.de/index.php/2012/03/tracking-app-for-playbook-using-restful-powerbuilder-web-service/</link>
		<comments>http://www.devbar.de/index.php/2012/03/tracking-app-for-playbook-using-restful-powerbuilder-web-service/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 20:35:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Playbook]]></category>
		<category><![CDATA[RESTful]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=758</guid>
		<description><![CDATA[
Let me tell you a story about a German US immigrant called Jason driving taxi in New York (this is the repeating excuse for some bad English pitfalls I’ll run into). He was unhappy about his CEO because he gets always calls like “Where you are?”, “How many guests do you drive?” and “Where is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2012/03/gb_thumb.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="gb_thumb" border="0" alt="gb_thumb" align="left" src="http://www.devbar.de/wp-content/uploads/2012/03/gb_thumb_thumb.png" width="16" height="11" /></a></p>
<p>Let me tell you a story about a German US immigrant called Jason driving taxi in New York (this is the repeating excuse for some bad English pitfalls I’ll run into). He was unhappy about his CEO because he gets always calls like “Where you are?”, “How many guests do you drive?” and “Where is daily route document?”. </p>
<p>He read <a href="http://pbdj.sys-con.com/node/1897337">Yakov’s article about PowerBuilder and RESTful Web Services</a> and wanted to learn more about RESTful Web Services in Powerbuilder. He asked himself : “Is it possible to create it instead just consuming it?”. </p>
<p>Yes it is! Let me show you how deep the rabbit hole goes <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/03/wlEmoticon-winkingsmile.png" />.</p>
<p>  <span id="more-758"></span><br />
<h4>What means RESTful?</h4>
<p><a href="http://rcm-de.amazon.de/e/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=devbarde-21&amp;o=3&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=0596529260"><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 0px 8px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="514NtpATBhL._SL110_" border="0" alt="514NtpATBhL._SL110_" align="right" src="http://www.devbar.de/wp-content/uploads/2012/03/514NtpATBhL._SL110_.jpg" width="84" height="110" /></a>To get a feeling what’s the idea of RESTful Web Services I would recommend you two sources. The term “RESTful” is like “object oriented” and means “using REST” (Representational State Transfer). Maybe the “ful” to the REST is just invited to make it easier to Google.&#160; If you want to get a quick overview, visit the <a href="http://msdn.microsoft.com/en-us/library/dd203052.aspx">this MSDN document</a>. It’s specialized to .NET developers and this should include PowerBuilder developers too. </p>
<p>If you want to dive into the topic I would suggest <a href="http://rcm-de.amazon.de/e/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=devbarde-21&amp;o=3&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=0596529260">“RESTful Web Services”</a> by Leonard Richardson and Sam Ruby. It has a lot of theoretical stuff into but it’s nice to read and it will offer you what’s the advantages of REST compared to SOAP or RPC.</p>
<h4></h4>
<h4>What PowerBuilder can do?</h4>
<p>If you ask, what PowerBuilder Classic can do, then the answer is: nothing. I didn’t find a way to get a RESTful Web Service in PB without thinking about some strange converter and wrapper stuff. Nobody wants to see something like this.</p>
<p>The door we use was opened when Sybase offers WCF Services in PowerBuilder .NET. The WCF Service brings us all the cool stuff from .NET including the way to configure or endpoint in that way we want.</p>
<p>So let’s code and implement the first WCF Service.</p>
<h4>The CEO-Server</h4>
<p>It sounds like we have to implement data-catching server for Jason’s boss. He wants to see where the cabs are. (are cabs only New York taxis? Someone could post it in the comments)</p>
<p>So let’s think about some methods:</p>
<pre class="brush: plain;">n_taxi // that's the name of the service

n_taxi.of_setPosition(
    as_cab,            // Name of cab
    al_guest_count,    // count of guests
    adc_longitude,     // longitude
    adc_latitude,      // latitude
    al_accuracy,       // accuracy
    adc_speed,         // important! This is New York city!
    al_catchmillis )   // the timestamp

n_taxi.of_getPosition(
    as_id )            // maybe we want to get a position

n_taxi.of_renderPdf(
    as_cab )           // it renders a PDF of a report
                       // Jason's CEO can print and archive</pre>
<p>That’s nice. This is all Jason’s CEO need to get happy. To save all this data a database would be nice. I prefer MS SQL. Here is the script to create table for positions.</p>
<pre class="brush: sql;">CREATE TABLE position (
    id INTEGER PRIMARY KEY IDENTITY,
    cab NVARCHAR(50),
    guest_count INTEGER,
    longitude DECIMAL(9,6),
    latitude DECIMAL(9,6),
    accuracy INTEGER,
    speed DECIMAL(4,1));</pre>
<p>To let someone see this database (without being admin) I configure the new user <strong>taxi</strong> with pass <strong>dontdrinkanddrive. </strong>Keep in mind the user needs read and write permission to the database.</p>
<h4>Creating WCF Service in PowerBuilder</h4>
<p>Creating a WCF Service in PowerBuilder .NET is easy. You can select <em>File-&gt;New</em> in your Workspace. There you can navigate to <em>Target-&gt;WCF Service</em>. Follow the wizard and the job is done. </p>
<p>The initial protocol WCF is configured for is SOAP. SOAP? Are you serious? This bloated inflexible monster? I am just kidding <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/03/wlEmoticon-winkingsmile.png" /></p>
<p>But if we want to use a clean JSON response or request the first we have to do is to change the &lt;service_name&gt;.config like this.</p>
<pre class="brush: xml;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;configuration&gt;
  &lt;system.serviceModel&gt;
    &lt;services&gt;
      &lt;service name=&quot;Sybase.PowerBuilder.WCFNVO.n_taxi&quot; behaviorConfiguration=&quot;ServiceNameBehavior&quot;&gt;
        &lt;!-- old stuff! &lt;endpoint address=&quot;&quot; binding=&quot;basicHttpBinding&quot; contract=&quot;Sybase.PowerBuilder.WCFNVO.n_taxi&quot; /&gt;--&gt;
        &lt;!-- old stuff! &lt;endpoint address=&quot;mex&quot; binding=&quot;mexHttpBinding&quot; contract=&quot;IMetadataExchange&quot; /&gt;--&gt;

        &lt;!-- new stuff --&gt;
        &lt;endpoint address=&quot;&quot; behaviorConfiguration=&quot;NewBehavior&quot; binding=&quot;webHttpBinding&quot; bindingConfiguration=&quot;&quot; contract=&quot;Sybase.PowerBuilder.WCFNVO.n_taxi&quot; /&gt;
      &lt;/service&gt;
    &lt;/services&gt;
    &lt;!--For debugging purposes set the includeExceptionDetailInFaults attribute to true--&gt;
    &lt;!-- old stuff!
    &lt;behaviors&gt;
      &lt;serviceBehaviors&gt;
        &lt;behavior name=&quot;ServiceNameBehavior&quot;&gt;
          &lt;serviceMetadata httpGetEnabled=&quot;True&quot; /&gt;
          &lt;serviceDebug includeExceptionDetailInFaults=&quot;False&quot; /&gt;
        &lt;/behavior&gt;
      &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;--&gt;

    &lt;!-- new stuff --&gt;
    &lt;behaviors&gt;
      &lt;endpointBehaviors&gt;
        &lt;behavior name=&quot;NewBehavior&quot;&gt;
          &lt;webHttp /&gt;
        &lt;/behavior&gt;
      &lt;/endpointBehaviors&gt;
      &lt;serviceBehaviors&gt;
        &lt;behavior name=&quot;ServiceNameBehavior&quot;&gt;
          &lt;serviceMetadata httpGetEnabled=&quot;true&quot; /&gt;
          &lt;serviceDebug includeExceptionDetailInFaults=&quot;false&quot; /&gt;
        &lt;/behavior&gt;
      &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;
  &lt;/system.serviceModel&gt;
&lt;/configuration&gt;</pre>
<p>After editing you can implement your service. You don’t have to do it by your own. The completed project is ready to <a href="https://github.com/devbar/PB-Taxi-WCF-Service">download in GitHub</a>.</p>
<h4>Is it RESTful now?</h4>
<p>No. It’s not really/completely/full RESTful to have a method of_setPosition and of_getPosition and different URLs to invoke them. So it is necessary to configure some more stuff in PB after coding is done.</p>
<p>Let’s have a look in the Project Painter. </p>
<p><a href="http://www.devbar.de/wp-content/uploads/2012/03/Taxi-PowerBuilder-1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Taxi - PowerBuilder " border="0" alt="Taxi - PowerBuilder " src="http://www.devbar.de/wp-content/uploads/2012/03/Taxi-PowerBuilder-_thumb1.png" width="240" height="132" /></a></p>
<p>In PB 12.5 .NET it is possible to define Operation Attributes to every public function. This is the chance to let this service behave like a RESTful Web Service.</p>
<p>Please setup your method in area <strong>WebInvoke</strong>.</p>
<p><strong>of_getPosition</strong></p>
<p><table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200">BodyStyle</td>
<td valign="top" width="200">WebMessageBodyStyle.Wrapped</td>
</tr>
<tr>
<td valign="top" width="200">Method</td>
<td valign="top" width="200">GET</td>
</tr>
<tr>
<td valign="top" width="200">ResponseFormat</td>
<td valign="top" width="200">WebMessageFormat.Json</td>
</tr>
<tr>
<td valign="top" width="200">UriTemplate</td>
<td valign="top" width="200">position/{as_id}</td>
</tr>
</tbody>
</table>
<p><strong>of_renderPdf</strong></p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200">BodyStyle</td>
<td valign="top" width="200">WebMessageBodyStyle.Wrapped</td>
</tr>
<tr>
<td valign="top" width="200">Method</td>
<td valign="top" width="200">GET</td>
</tr>
<tr>
<td valign="top" width="200">ResponseFormat</td>
<td valign="top" width="200">WebMessageFormat.Json</td>
</tr>
<tr>
<td valign="top" width="200">UriTemplate</td>
<td valign="top" width="200">position/render/pdf/{as_cab}</td>
</tr>
</tbody>
</table>
<p><strong>of_setPosition</strong> </p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200">BodyStyle</td>
<td valign="top" width="200">WebMessageBodyStyle.Wrapped</td>
</tr>
<tr>
<td valign="top" width="200">Method</td>
<td valign="top" width="200">POST</td>
</tr>
<tr>
<td valign="top" width="200">ResponseFormat</td>
<td valign="top" width="200">WebMessageFormat.Json</td>
</tr>
<tr>
<td valign="top" width="200">UriTemplate</td>
<td valign="top" width="200">position</td>
</tr>
</tbody>
</table>
<p>The Service is now accessible under <a href="http://myserver/position">http://myserver/position</a> to insert data and <a href="http://myserver/position/">http://myserver/position/</a>&lt;id&gt; to get some data. A request to <a href="http://myserver/position/render/pdf/">http://myserver/position/render/pdf/</a>&lt;cab&gt; will response with a URL to download a PDF of a report.</p>
<p>That’s all the magic. Keep in mind to set the Service Attribute <strong>RequirementMode</strong> to <strong>AspNetCompatibilityRequirementsMode.Allowed</strong>.</p>
<p>Id didn’t post some PowerBuilder code here. <a href="https://github.com/devbar/PB-Taxi-WCF-Service">Visit GitHub</a> to browser and download the project.</p>
<h4>The CEO App</h4>
<p>James is dozing in his cab when his CEO is calling: “Good job, this peace of software! But what’s the f****** trick to get this f****** report where your lazy ass was this morning at 8 o’clock?”. James babbles: “It’s easy let me code it for you.”.</p>
<p><a href="http://www.devbar.de/wp-content/uploads/2012/03/Taxi-Windows-Internet-Explorer_2012-03-07_22-39-511.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Taxi - Windows Internet Explorer_2012-03-07_22-39-51" border="0" alt="Taxi - Windows Internet Explorer_2012-03-07_22-39-51" src="http://www.devbar.de/wp-content/uploads/2012/03/Taxi-Windows-Internet-Explorer_2012-03-07_22-39-51_thumb1.png" width="240" height="129" /></a></p>
<p><a href="http://www.devbar.de/wp-content/uploads/2012/03/http192.168.30.2482taxiceoTAX_6671.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="http192.168.30.2482taxiceoTAX_667" border="0" alt="http192.168.30.2482taxiceoTAX_667" align="left" src="http://www.devbar.de/wp-content/uploads/2012/03/http192.168.30.2482taxiceoTAX_667_thumb1.png" width="244" height="133" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<pre class="brush: xml;">&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Taxi&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;jquery.mobile-1.0.css&quot; /&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.7.1.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
        $(document).ready(function(){
            $('#searchButton').click(function(){
                $.getJSON('http://homeserver:82/_taxi/n_taxi.svc/position/render/pdf/' + $('#taxi').val(),function(data){
                    $.each(data,function(key,val){
                        location.href = val;
                    });
                });
            });
        });
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input type=&quot;text&quot; id=&quot;taxi&quot; value=&quot;TAX 667&quot;&gt;
&lt;button type=&quot;submit&quot; data-theme=&quot;a&quot; id=&quot;searchButton&quot;&gt;Report&lt;/button&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>&#160;</p>
<p>This really simple Web App can be used to let James’ boss enter a cab and get the report of positions.</p>
<p><em>If you want to implement this site it’s necessary to host it under the same top level domain then the service. Many browser don’t allow cross-site-requests for security reasons.</em></p>
<h4>The Tracking App</h4>
<p>If you followed my blog you know that there is one tablet I prefer for app development at the moment. It’s RIM’s Blackberry Playbook. The easiest way to code application for Playbook is to use HTML5 an JavaScript. So in one Script I get my Tracking App to let James’ CEO know where his lazy … I mean … where he was.</p>
<p><a href="http://www.devbar.de/wp-content/uploads/2012/03/Ripple_2012-03-07_22-35-521.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Ripple_2012-03-07_22-35-52" border="0" alt="Ripple_2012-03-07_22-35-52" src="http://www.devbar.de/wp-content/uploads/2012/03/Ripple_2012-03-07_22-35-52_thumb1.png" width="240" height="160" /></a></p>
<p>&#160;</p>
<pre class="brush: xml;">&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Taxi&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;jquery.mobile-1.0.css&quot; /&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.7.1.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;jquery.mobile-1.0.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
        var running;

        function postPosition(){
            var taxi = $('#taxi').val();
            var guestCount = $('#guestCount').val();
            var longitude = $('#longitude').val();
            var latitude = $('#latitude').val();
            var accuracy = $('#accuracy').val();
            var speed = $('#speed').val();
            var millis = $('#millis').val();

            $.ajax({
                type: &quot;POST&quot;,
                url: &quot;http://homeserver:82/_taxi/n_taxi.svc/position&quot;,
                contentType: &quot;application/json&quot;,
                data: '{ &quot;as_cab&quot;: &quot;' + taxi + '&quot;, ' +
                        '&quot;al_guest_count&quot;: ' + guestCount + ', ' +
                        '&quot;adc_longitude&quot;: ' + longitude + ', ' +
                        '&quot;adc_latitude&quot;: ' + latitude + ', ' +
                        '&quot;al_accuracy&quot;: ' + accuracy + ', ' +
                        '&quot;adc_speed&quot;: ' + speed + ', ' +
                        '&quot;al_catchmillis&quot;: ' + millis + '}'
            });
        }

        $(document).ready(function(){
            $('#startTracking').click(function(){
                running = window.setInterval(function(){
                    navigator.geolocation.getCurrentPosition(function(position){
                        $('#longitude').val(position.coords.longitude);
                        $('#latitude').val(position.coords.latitude);
                        $('#speed').val(position.coords.speed);
                        $('#accuracy').val(position.coords.accuracy);
                        $('#millis').val(new Date().getTime());

                        postPosition();
                    });
                },10000);

                $('#statusTracking').html(&quot;Tracking started!&quot;);
            });

            $('#stopTracking').click(function(){
                window.clearInterval(running);
                $('#statusTracking').html(&quot;Tracking stopped!&quot;);
            });
        });
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div data-role=&quot;fieldcontain&quot;&gt;
    &lt;label for=&quot;taxi&quot;&gt;Taxi:&lt;/label&gt;
    &lt;input type=&quot;text&quot; id=&quot;taxi&quot; value=&quot;TAX 667&quot;&gt;

    &lt;label for=&quot;guestCount&quot;&gt;Guest Count:&lt;/label&gt;
    &lt;input type=&quot;text&quot; id=&quot;guestCount&quot; value=&quot;4&quot;&gt;

    &lt;label for=&quot;longitude&quot;&gt;Longitude:&lt;/label&gt;
    &lt;input type=&quot;text&quot; id=&quot;longitude&quot; value=&quot;1.567&quot;&gt;

    &lt;label for=&quot;latitude&quot;&gt;Latitude:&lt;/label&gt;
    &lt;input type=&quot;text&quot; id=&quot;latitude&quot; value=&quot;2.345&quot;&gt;

    &lt;label for=&quot;accuracy&quot;&gt;Accuracy:&lt;/label&gt;
    &lt;input type=&quot;text&quot; id=&quot;accuracy&quot; value=&quot;5&quot;&gt;

    &lt;label for=&quot;speed&quot;&gt;Speed:&lt;/label&gt;
    &lt;input type=&quot;text&quot; id=&quot;speed&quot; value=&quot;60&quot;&gt;

    &lt;label for=&quot;millis&quot;&gt;Millis:&lt;/label&gt;
    &lt;input type=&quot;text&quot; id=&quot;millis&quot; value=&quot;100&quot;&gt;
&lt;/div&gt;

&lt;fieldset class=&quot;ui-grid-b&quot;&gt;
    &lt;div class=&quot;ui-block-a&quot;&gt;
        &lt;button data-theme=&quot;a&quot; id=&quot;startTracking&quot;&gt;Start&lt;/button&gt;
    &lt;/div&gt;
    &lt;div class=&quot;ui-block-b&quot;&gt;
        &lt;button data-theme=&quot;a&quot; id=&quot;stopTracking&quot;&gt;Stop&lt;/button&gt;
    &lt;/div&gt;
&lt;/fieldset&gt;

&lt;div id=&quot;statusTracking&quot; &gt;
    Tracking stopped!
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;

<font face="Arial"></font></pre>
<h4>&#160;</h4>
<p><em>Not everyone have a Playbook (but everyone should <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/03/wlEmoticon-winkingsmile.png" /> ). So the easiest way to test this app is to use the Ripple Emulator. You can download the stand-alone application </em><a href="https://bdsc.webapps.blackberry.com/html5/download/ripple"><em>here</em></a><em> or a Chrome plugin </em><a href="http://ripple.tinyhippos.com/"><em>here</em></a><em>.</em></p>
<p><em>You should host this app on same server like ceo app. It’s also possible to package it to run client-side but not in emulator.</em></p>
<h4>Conclusion</h4>
<p>James is happy. James’ boss is happy. The PowerBuilder developer is happy? Not at all. </p>
<p>I am tired about discussing the quality of PowerBuilder 12.5 .NET. It’s bad and not like an professional high prized development tool.</p>
<p>There are two extremely different technologies in this project. On the one hand there is the big bloated PowerBuilder with all the DataWindow stuff the heavy IDE a lot of Painters to help you get you job is done.</p>
<p>On the other hand there is HTML5, JavaScript, JQuery and an Editor. Not very comfortable but light and fast.</p>
<p>On the one hand we have PowerScript with hard and old ideas, not very elegant and in many ways outdated.</p>
<p>On the other hand we have JavaScript with a high flexible but sometimes hard to understand and a potential to produce unreadable code.</p>
<p>And the all over question for PowerBuilder developers in these days: Why I can’t use .NET or Java for this job?</p>
<p>Happy coding! And we’ll see how long PowerBuilder will live, Yakov <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/03/wlEmoticon-winkingsmile.png" /></p>
<p><strong>Links</strong></p>
<ul>
<li><font color="#333333"><a href="https://github.com/devbar/PB-Taxi-WCF-Service">GitHub</a></font></li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd203052.aspx">MSDN</a></li>
<li><a href="http://rcm-de.amazon.de/e/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=devbarde-21&amp;o=3&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=0596529260">O’Reilly: RESTful Web Services</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/03/tracking-app-for-playbook-using-restful-powerbuilder-web-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gastbeitrag: Solr, beanstalkd oder mongo beim Booten mit launchd starten</title>
		<link>http://www.devbar.de/index.php/2012/02/gastbeitrag-solr-beanstalkd-oder-mongo-beim-booten-mit-launchd-starten/</link>
		<comments>http://www.devbar.de/index.php/2012/02/gastbeitrag-solr-beanstalkd-oder-mongo-beim-booten-mit-launchd-starten/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 08:59:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=750</guid>
		<description><![CDATA[Obwohl ich mein Macbook so gut wie nie herunterfahre, muss ich es manchmal, wegen eines Softwareupdates oder einfach weil der Akku leer ist, doch neu starten. Obwohl ein Neustart schnell geht, hat es mich schon immer gestört, dass ich alle Services manuell starten muss. Als ich heute Morgen wieder einmal einen Neustart machen musste, habe [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.springest.de"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="logo-springest" border="0" alt="logo-springest" align="right" src="http://www.devbar.de/wp-content/uploads/2012/02/logo-springest.jpg" width="127" height="72" /></a>Obwohl ich mein Macbook so gut wie nie herunterfahre, muss ich es manchmal, wegen eines Softwareupdates oder einfach weil der Akku leer ist, doch neu starten. Obwohl ein Neustart schnell geht, hat es mich schon immer gestört, dass ich alle Services manuell starten muss. Als ich heute Morgen wieder einmal einen Neustart machen musste, habe ich das <a href="http://www.springest.de/personliche-entwicklung/getting-things-done">Problem jetzt endgültig behoben</a>, indem ich solr, Beanstalkd und MongoDB zu meinen <a href="http://www.springest.de/it/linux">launchd LaunchDaemons</a> hinzugefügt habe.</p>
<p>  <span id="more-750"></span>
<p><b>Was ist launchd</b></p>
<p><a href="http://launchd.macosforge.org/">launchd</a> ist ein vereinheitlichtes Open-Source Service Management Framework zum Starten, Anhalten und Managen von Daemons, Anwendungen, Prozessen und Skripten.</p>
<p>Im Prinzip ersetzt es Dinge wie init.d, cron, System Starter und bietet eine Möglichkeit Services zu kontrollieren, die bei einem bestimmten Event gestartet werden (z.B. Hochfahren des Computers oder das Anschließen einer externen Festplatte).</p>
<p>Was ich also machen musste, war für jeden Service, den ich beim Booten brauche, einen Job zu erstellen und diese Jobs dann auf die Watchlist von launchd zu setzen.</p>
<p><b>Jobs in launchd</b></p>
<p>Ein Job ist eine einfache .plist Datei, die aus einer in XML verpackten Beschreibung der jeweiligen Aufgabe besteht. Meine Beanstalkd Plist-Datei sieht zum Beispiel so aus:</p>
<pre class="brush: xml;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot;
  &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
  &lt;key&gt;Label&lt;/key&gt;
  &lt;string&gt;org.beanstalkd.bean&lt;/string&gt;
  &lt;key&gt;ProgramArguments&lt;/key&gt;
  &lt;array&gt;
    &lt;string&gt;/usr/local/bin/beanstalkd&lt;/string&gt;
  &lt;/array&gt;
  &lt;key&gt;RunAtLoad&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;KeepAlive&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;WorkingDirectory&lt;/key&gt;
  &lt;string&gt;/usr/local/Cellar/beanstalk&lt;/string&gt;
  &lt;key&gt;StandardErrorPath&lt;/key&gt;
  &lt;string&gt;/var/log/beanstalkd.log&lt;/string&gt;
  &lt;key&gt;StandardOutPath&lt;/key&gt;
  &lt;string&gt;/var/log/beanstalkd.log&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;
view raw
org.beanstalkd.bean.plist
This Gist brought to you by GitHub.</pre>
<p>Die Datei ist sehr minimalistisch. Der wichtigste Teil ist die ProgramArguments Node, in der beschrieben wird, welcher Befehl ausgeführt werden muss. Jeder Teil des Befehls wird zu einer<font face="Courier New"> &lt;string&gt;</font> Node zugefügt, das bedeutet, wenn man einen Befehl wie <font face="Courier New">ls -al /Users/foo/Sites</font> ausführen will, wird er so formatiert:</p>
<pre class="brush: xml;">&lt;array&gt;
    &lt;string&gt;ls&lt;/string&gt;
    &lt;string&gt;-al&lt;/string&gt;
    &lt;string&gt;/Users/foo/Sites&lt;/string&gt;
&lt;/array&gt;</pre>
<p>Die restlichen Argumente erklären sich soweit von selbst und in <a href="http://en.wikipedia.org/wiki/Launchd#Property_list">der vollständigen property list</a> findet ihr weitere mögliche Parameter.</p>
<p><b>Einen Job zur Watchlist hinzufügen</b></p>
<p>Speichert eure plist-Dateien unter/Library/LaunchDaemons/ und sie werden automatisch beim nächsten Neustart eures Macs gestartet. Wenn ihr sie direkt ohne einen Neustart laden möchtet, dann ladet sie über das Terminal:</p>
<pre class="brush: plain;">$ sudo launchctl load /Library/LaunchDaemons/name.of.your.job.plist</pre>
<p><b>Meine launch-Jobs</b></p>
<p>Neben dem Job für Beanstalkd habe ich Jobs für solr und MongoDB eingerichtet. Wie ihr seht, verwende ich <a href="http://mxcl.github.com/homebrew/">Homebrew</a>, um MongoDB und Beanstalk zu installieren und meine solr Installation liegt in /usr/local/solr. Wenn euer System mit einem anderen Setup läuft, müsst ihr diese Pfade auf eurem System anpassen.</p>
<pre class="brush: xml;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot;
  &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
  &lt;key&gt;Label&lt;/key&gt;
  &lt;string&gt;org.mongodb.mongod&lt;/string&gt;
  &lt;key&gt;ProgramArguments&lt;/key&gt;
  &lt;array&gt;
    &lt;string&gt;/usr/local/bin/mongod&lt;/string&gt;
    &lt;string&gt;run&lt;/string&gt;
    &lt;string&gt;--config&lt;/string&gt;
    &lt;string&gt;/usr/local/Cellar/mongodb/1.8.3-x86_64/mongod.conf&lt;/string&gt;
  &lt;/array&gt;
  &lt;key&gt;RunAtLoad&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;KeepAlive&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;WorkingDirectory&lt;/key&gt;
  &lt;string&gt;/usr/local/Cellar/mongodb&lt;/string&gt;
  &lt;key&gt;StandardErrorPath&lt;/key&gt;
  &lt;string&gt;/var/log/mongo.log&lt;/string&gt;
  &lt;key&gt;StandardOutPath&lt;/key&gt;
  &lt;string&gt;/var/log/mongo.log&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;
view raw
org.mongodb.mongod.plist
This Gist brought to you by GitHub.</pre>
<pre class="brush: xml;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot;
  &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
  &lt;key&gt;Label&lt;/key&gt;
  &lt;string&gt;org.apache.lucene&lt;/string&gt;
  &lt;key&gt;ProgramArguments&lt;/key&gt;
  &lt;array&gt;
    &lt;string&gt;java&lt;/string&gt;
    &lt;string&gt;-jar&lt;/string&gt;
    &lt;string&gt;/usr/local/solr/start.jar&lt;/string&gt;
  &lt;/array&gt;
  &lt;key&gt;RunAtLoad&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;KeepAlive&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;WorkingDirectory&lt;/key&gt;
  &lt;string&gt;/usr/local/solr&lt;/string&gt;
  &lt;key&gt;StandardErrorPath&lt;/key&gt;
  &lt;string&gt;/var/log/solr.log&lt;/string&gt;
  &lt;key&gt;StandardOutPath&lt;/key&gt;
  &lt;string&gt;/var/log/solr.log&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;
view raw
org.apache.lucene.plist
This Gist brought to you by GitHub.</pre>
<p>Und das war es auch schon! Wenn ihr euer System jetzt neu startet, werden alle Services automatisch als Daemons geladen und ihr müsst sie nicht manuell starten.</p>
<p><em>Ninja Lamberty</em></p>
<p><em>Business Developer</em></p>
<p><a href="http://www.springest.de"><em>Springest.de</em></a><em></em></p>
<p><em>Rokin 75</em></p>
<p><em>1012KL Amsterdam</em></p>
<p><em>Niederlande</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/02/gastbeitrag-solr-beanstalkd-oder-mongo-beim-booten-mit-launchd-starten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript: Oder wie ich lernte die Bombe zu lieben</title>
		<link>http://www.devbar.de/index.php/2012/01/javascript-oder-wie-ich-lernte-die-bombe-zu-lieben/</link>
		<comments>http://www.devbar.de/index.php/2012/01/javascript-oder-wie-ich-lernte-die-bombe-zu-lieben/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 19:38:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Mobile Apps]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2012/01/javascript-oder-wie-ich-lernte-die-bombe-zu-lieben/</guid>
		<description><![CDATA[Für mich ist JavaScript ein Phänomen, dass ich nur mit Staunen beobachten kann. Jahrzehnte habe ich gedacht, dass gute Programmiersprachen nach einem sauberen objektorientierten Konzept arbeiten. Ich dachte Programmiersprachen müssen typsicher sein! Ich dachte JavaScript ist gar keine Programmiersprache sondern bestenfalls Browserbeiwerk für verspielte Webentwickler.
Jetzt hab’ ich mir allerdings in den Kopf gesetzt, dass meine [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2012/01/dfe1042cccb6736edb9ff7996b0ee09a_g.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 7px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="dfe1042cccb6736edb9ff7996b0ee09a_g" border="0" alt="dfe1042cccb6736edb9ff7996b0ee09a_g" align="right" src="http://www.devbar.de/wp-content/uploads/2012/01/dfe1042cccb6736edb9ff7996b0ee09a_g_thumb.jpg" width="113" height="164" /></a>Für mich ist JavaScript ein Phänomen, dass ich nur mit Staunen beobachten kann. Jahrzehnte habe ich gedacht, dass gute Programmiersprachen nach einem sauberen objektorientierten Konzept arbeiten. Ich dachte Programmiersprachen müssen typsicher sein! Ich dachte JavaScript ist gar keine Programmiersprache sondern bestenfalls Browserbeiwerk für verspielte Webentwickler.
<p align="left">Jetzt hab’ ich mir allerdings in den Kopf gesetzt, dass meine neuen Apps alle in JavaScript &amp; HTML5 programmiert sein müssen. Vor allem reizt mich die einfache Portierbarkeit zwischen verschiedenen Tablet-Betriebssystemen.</p>
<p align="left">Wie man objektorientiert JavaScript programmiert und bekannte Entwurfsmuster einsetzen kann <strong>ohne den Verstand zu verlieren</strong> hat mir dieses Buch gezeigt <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smiley" src="http://www.devbar.de/wp-content/uploads/2012/01/wlEmoticon-smile.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/01/javascript-oder-wie-ich-lernte-die-bombe-zu-lieben/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Icons f&#252;r meine Apps</title>
		<link>http://www.devbar.de/index.php/2012/01/icons-fr-meine-apps/</link>
		<comments>http://www.devbar.de/index.php/2012/01/icons-fr-meine-apps/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 18:49:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Icons]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=735</guid>
		<description><![CDATA[Wer seiner Anwendung mit hübschen Icons und Grafiken den letzten Schliff verleihen will, wird im Internet mit Sicherheit fündig. Der Haken ist, dass Icon-Pakete oft teuer sind oder nur unter bestimmten Auflagen genutzt werden können. Manchmal ist die Verwendung auch gar nicht weiter geregelt und man spielt mit dem Feuer.
Das Projekt www.iconfinder.com versucht den Dschungel [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2012/01/iconfinder_logo.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iconfinder_logo" border="0" alt="iconfinder_logo" align="right" src="http://www.devbar.de/wp-content/uploads/2012/01/iconfinder_logo_thumb.png" width="240" height="104" /></a>Wer seiner Anwendung mit hübschen Icons und Grafiken den letzten Schliff verleihen will, wird im Internet mit Sicherheit fündig. Der Haken ist, dass Icon-Pakete oft teuer sind oder nur unter bestimmten Auflagen genutzt werden können. Manchmal ist die Verwendung auch gar nicht weiter geregelt und man spielt mit dem Feuer.</p>
<p>Das Projekt <a href="http://www.iconfinder.com">www.iconfinder.com</a> versucht den Dschungel zu lichten. Hier lassen sich gezielt die richtigen Grafiken suchen und die Ergebnisse nach kostenlosen/kostenpflichtigen Angeboten filtern.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/01/icons-fr-meine-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drag &amp; Drop from Windows Explorer to PowerBuilder application</title>
		<link>http://www.devbar.de/index.php/2012/01/drag-drop-from-windows-explorer-to-powerbuilder-application/</link>
		<comments>http://www.devbar.de/index.php/2012/01/drag-drop-from-windows-explorer-to-powerbuilder-application/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 13:16:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powerbuilder]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2012/01/drag-drop-from-windows-explorer-to-powerbuilder-application/</guid>
		<description><![CDATA[
It isn’t a big thing but user-friendly to let your user drop some files in your PowerBuilder application. Maybe to import, merge, strip, archive, …. you name it 
  
1. Insert the external functions to your window object.
function ulong DragQueryFileW( ulong hDrop, ulong iFile, ref string LPTSTR, ulong cb ) library 'shell32.dll'
subroutine DragAcceptFiles(ulong h, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2011/08/gb.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 6px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="gb" border="0" alt="gb" align="left" src="http://www.devbar.de/wp-content/uploads/2011/08/gb_thumb.png" width="16" height="11" /></a></p>
<p>It isn’t a big thing but user-friendly to let your user drop some files in your PowerBuilder application. Maybe to import, merge, strip, archive, …. you name it <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/01/wlEmoticon-winkingsmile1.png" /></p>
<p>  <span id="more-731"></span>
<p>1. Insert the external functions to your window object.</p>
<pre class="brush: plain;">function ulong DragQueryFileW( ulong hDrop, ulong iFile, ref string LPTSTR, ulong cb ) library 'shell32.dll'
subroutine DragAcceptFiles(ulong h, boolean b ) library 'shell32.dll' </pre>
<p>2. Insert a custom event with ID “pbm_dropfiles” to you window object and insert some code like this.</p>
<pre class="brush: plain;">string     ls_filename
ulong     ll_fileCount
ulong     ll_index
long        ll_row

ll_fileCount = DragQueryFileW(Message.WordParm,-1,ls_filename,0)
ls_filename = space(255)
for ll_index = 1 to ll_fileCount
    DragQueryFileW(Message.WordParm,ll_index - 1,ls_filename,255)
    ll_row = dw_files.insertRow ( 0 )
    dw_files.setItem ( ll_row, &quot;filename&quot;, ls_filename);
next </pre>
<p>&#160;</p>
<p>3. Make sure you enabled and disabled Drop behavior in open and close event of the window object.</p>
<pre class="brush: plain;">DragAcceptFiles(handle(this),true) //open</pre>
<pre class="brush: plain;">DragAcceptFiles(handle(this),false) //close</pre>
<p>That’s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/01/drag-drop-from-windows-explorer-to-powerbuilder-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerBuilder in Obsidian Theme</title>
		<link>http://www.devbar.de/index.php/2012/01/powerbuilder-in-obsidian-theme/</link>
		<comments>http://www.devbar.de/index.php/2012/01/powerbuilder-in-obsidian-theme/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 15:14:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[4fun]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2012/01/powerbuilder-in-obsidian-theme/</guid>
		<description><![CDATA[
If you like it 
  
Insert following lines in your pb.ini to get this look.
[PB]
...
EditorColor0=31777504 20197673
EditorColor1=65280 20197673
EditorColor2=65280 20197673
EditorColor3=31777504 20197673
EditorColor4=31777504 20197673
EditorColor5=31777504 20197673
EditorColor6=31777504 20197673
EditorColor7=32768 1073741824
EditorColor8=31777504 20197673
EditorColor9=255 20197673
EditorColor10=31777504 20197673
EditorColor11=255 20197673
EditorColor12=8421504 20197673
EditorColor13=255 20197673
EditorColor14=16776960 20197673
...

[colors]
color1=15000288
color2=16777215
color3=3420457
color4=16777215
color5=16777215
color6=16777215
color7=16777215
color8=16777215
color9=16777215
color10=16777215
color11=16777215
color12=16777215
color13=16777215
color14=16777215
color15=16777215
color16=16777215
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2012/01/pb.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="pb" border="0" alt="pb" src="http://www.devbar.de/wp-content/uploads/2012/01/pb_thumb.png" width="445" height="392" /></a></p>
<p>If you like it <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Zwinkerndes Smiley" src="http://www.devbar.de/wp-content/uploads/2012/01/wlEmoticon-winkingsmile.png" /></p>
<p>  <span id="more-729"></span>
<p>Insert following lines in your pb.ini to get this look.</p>
<pre class="brush: plain;">[PB]
...
EditorColor0=31777504 20197673
EditorColor1=65280 20197673
EditorColor2=65280 20197673
EditorColor3=31777504 20197673
EditorColor4=31777504 20197673
EditorColor5=31777504 20197673
EditorColor6=31777504 20197673
EditorColor7=32768 1073741824
EditorColor8=31777504 20197673
EditorColor9=255 20197673
EditorColor10=31777504 20197673
EditorColor11=255 20197673
EditorColor12=8421504 20197673
EditorColor13=255 20197673
EditorColor14=16776960 20197673
...

[colors]
color1=15000288
color2=16777215
color3=3420457
color4=16777215
color5=16777215
color6=16777215
color7=16777215
color8=16777215
color9=16777215
color10=16777215
color11=16777215
color12=16777215
color13=16777215
color14=16777215
color15=16777215
color16=16777215</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2012/01/powerbuilder-in-obsidian-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PB .NET Add-In: Generating Structures and NonVisualObjects from Datawindow</title>
		<link>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/</link>
		<comments>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 19:19:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[Add-In]]></category>
		<category><![CDATA[Datawindow]]></category>
		<category><![CDATA[Dw2Struct]]></category>
		<category><![CDATA[Nonvisual]]></category>
		<category><![CDATA[Structure]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/</guid>
		<description><![CDATA[Don’t try to adjust your screen if you can’t read anymore what’s written in my blog. Yes it’s true! This is the first experimental English post here. This is for the English speaking Powerbuilder community I want to achieve.
So back to topic: What is this post about? Inspired by a small discussion in the Powerbuilder [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2011/08/gb.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 6px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="gb" border="0" alt="gb" align="left" src="http://www.devbar.de/wp-content/uploads/2011/08/gb_thumb.png" width="16" height="11" /></a>Don’t try to adjust your screen if you can’t read anymore what’s written in my blog. Yes it’s true! This is the first experimental English post here. This is for the English speaking Powerbuilder community I want to achieve.</p>
<p>So back to topic: What is this post about? Inspired by a small discussion in the Powerbuilder 12.5 beta newsgroup I created a small plugin to easily create some Structures and NonVisualObjects from a Datawindow.</p>
<p>  <span id="more-721"></span>
<p><a href="http://www.devbar.de/wp-content/uploads/2011/08/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 16px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://www.devbar.de/wp-content/uploads/2011/08/image_thumb.png" width="183" height="158" /></a>This is very useful if you want to transfer data from or to a Datawindow by dot notation. If you have a lot of fields it can be a very painful job to create the Nonvisual and enter the variables in the correct order. Because of this Bruce Armstrong created a small tool called “Dw2Struct” that can do this for you in PB Classic. What I do is to extend the tool for NonVisuals and build a add-in around it.</p>
<p>So take a look at the code and the binaries. The Installation is easy. Just put it in a directory where Powerbuilder 12.5 .NET looks for add-ins. You can see what paths are observed by going to Extras-&gt;Options-&gt;Add-In. If you are not sure where to copy it, enter the path where you unpack the downloaded files. After restart the IDEs shows you two new entries in context menu of Datawindow. That’s it. </p>
<p>Have fun!</p>
<p><strong>Links:</strong></p>
<ul>
<li>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:e2e5e9cb-a8ba-4a47-9ccc-140ede6de99c" class="wlWriterEditableSmartContent">
<div><a href="http://www.devbar.de/wp-content/uploads/2011/08/PB-Addin-Dw2Struct.zip" target="_self">PB-Addin-Dw2Struct.zip</a></div>
</div>
</li>
<li><a href="https://github.com/devbar/PB-Addin-Dw2Struct">GitHub</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

