<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://www.stress-free.co.nz"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>stressfree - programming</title>
 <link>https://www.stress-free.co.nz/tech/programming</link>
 <description></description>
 <language>en</language>
<item>
 <title>Monitor TCP transactions with TCPMon</title>
 <link>https://www.stress-free.co.nz/monitor_tcp_transactions_with_tcpmon</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;If you have done any work with web services (especially SOAP) you will appreciate the value of a good TCP monitoring tool. &lt;a href=&quot;http://www.wireshark.org/&quot;&gt;Wireshark&lt;/a&gt; is arguably the best network monitoring tool available, but it is complicated and for monitoring plain old HTTP transactions is akin to hitting the proverbial nut with a sledgehammer. Fortunately &lt;a href=&quot;http://ws.apache.org/commons/tcpmon/&quot;&gt;Apache have TCPMon&lt;/a&gt;, a light-weight, Java-based TCP monitoring utility that lets you quickly see what TCP transactions are taking place between your computer and a server (be it local or remote).&lt;/p&gt;
&lt;p&gt;TCPMon does not need to be installed, just download the latest version and execute the relevant startup script (.bat for Windows, .sh for OSX/Linux). There are very few options, but to monitor TCP traffic between your client and a server set the listen port to the local port you will be sending requests to and the target hostname/port to where you want the requests sent:&lt;/p&gt;
&lt;div class=&quot;centeredimage&quot;&gt;&lt;img src=&quot;/sites/default/files/u63/tcpmon.jpg&quot; alt=&quot;&quot; width=&quot;400&quot; height=&quot;320&quot; /&gt;&lt;/div&gt;
&lt;p&gt;For example if you wanted to track TCP traffic between my browser and google.co.nz enter &lt;strong&gt;www.google.co.nz&lt;/strong&gt; as the target hostname and &lt;strong&gt;port 80&lt;/strong&gt; as the target port. Then point your client (i.e. browser) to http://localhost:8888 (where &lt;strong&gt;8888&lt;/strong&gt; is the listening port). TCPMon will take your inbound TCP request, forward it on to http://www.google.com:80 and record what gets returned. Whilst all this takes place you can sit back and inspect the TCP transactions. Okay completely useless to normal people, but for anyone that has had to debug a SOAP request quite invaluable.&lt;/p&gt;
&lt;div class=&quot;centeredimage&quot;&gt;&lt;img src=&quot;/sites/default/files/u63/tcpmon2.jpg&quot; alt=&quot;&quot; width=&quot;400&quot; height=&quot;412&quot; /&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;!--break--&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/web_services&quot;&gt;web services&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/programming&quot;&gt;programming&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 03 Sep 2008 09:43:42 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">521 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Comparing Web Development with Java and .Net</title>
 <link>https://www.stress-free.co.nz/comparing_web_development_with_java_and_net</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;I was recently asked to comment on what the pros and cons were of Java compared to ColdFusion and ASP.Net when it comes to Web development. I guess the first thing to get straight with this question is what exactly constitutes &#039;Java&#039; in a Web development sense. &lt;/p&gt;&lt;h2&gt;The basics of the two technologies &lt;/h2&gt;&lt;p&gt;The diagram below outlines the elements that comprise of Java and .Net Web development. &lt;/p&gt;&lt;div class=&quot;centeredimage&quot;&gt;&lt;a href=&quot;/sites/default/files/u63/diagram-java-net_sm.png&quot;&gt;&lt;img src=&quot;/sites/default/files/u63/diagram-java-net_sm.png&quot; alt=&quot;&quot; width=&quot;400&quot; height=&quot;266&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Both technologies are very similar as in essence Microsoft based .Net on many of Sun&#039;s original Java concepts and borrowed a lot of Java syntax when designing C#. Both utilise managed containers in which code is compiled and executed within. These containers are referred to as the JavaVM or CLR runtime in Java and .Net respectively. Both managed containers have the ability to execute code written in a number of languages, for example it is not uncommon to have a .Net application written in both VB.Net and C#. Whilst not as common the Java runtime is also beginning to support multiple languages such as  &lt;a href=&quot;http://www.jython.org/&quot;&gt;Python&lt;/a&gt; and &lt;a href=&quot;http://jruby.codehaus.org/&quot;&gt;Ruby&lt;/a&gt;. Increased emphasis has come on this ability after the meteoric rise to fame of the &lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;Ruby on Rails&lt;/a&gt; Web development framework.&lt;/p&gt;&lt;p&gt;&lt;!--break--&gt;Looking at the diagram above you will notice that ColdFusion falls within the domain of Java. Whilst the language itself does not look very similar to Java this is just aesthetic, under the hood ColdFusion code is compiled into Java by the ColdFusion interpreter and then executed in the same manner as standard Java code. So any debate between whether to use ColdFusion or Java Server Pages (JSP) really boils down to what the developer is familiar with. &lt;/p&gt;&lt;h2&gt;Industry Support&lt;/h2&gt;&lt;p&gt;Java and .Net share extensive industry support and broad user bases. As &lt;a href=&quot;http://radar.oreilly.com/archives/2006/08/programming_language_trends_1.html&quot;&gt;shown by the O&#039;Reilly analysis&lt;/a&gt; of reference book sales no single programming language has a clear lead when it comes to popularity.&lt;/p&gt;&lt;div class=&quot;centeredimage&quot;&gt;&lt;a href=&quot;http://radar.oreilly.com/archives/2006/08/programming_language_trends_1.html&quot;&gt;&lt;img src=&quot;/sites/default/files/u63/orielly_programming_trends.png&quot; alt=&quot;&quot; width=&quot;400&quot; height=&quot;256&quot; /&gt;&lt;br /&gt;Programming reference book sales (image from O&#039;Reilly)&lt;/a&gt;&lt;/div&gt;&lt;p&gt;.Net&#039;s greatest advantage is that being a Microsoft technology it is integrated within the Windows Server family of products and installed on the majority of corporate desktops. Microsoft also has a strong history of excellent developer tools which enables the relatively rapid development of .Net applications via the &lt;a href=&quot;http://msdn.microsoft.com/vstudio&quot;&gt;Visual Studio suite&lt;/a&gt;. Whilst Microsoft&#039;s .Net framework is proprietary code that only runs on Windows, the &lt;a href=&quot;http://www.mono-project.com/&quot;&gt;Mono project&lt;/a&gt; (sponsored by Novell) is successfully implementing the API&#039;s and CLR runtime standards in open source code capable of being deployed on a range of platforms such as Linux and OSX. However it must be noted at this stage Mono does not cover 100% of the .Net API&#039;s or support the .Net 2.0 standard, limiting its applicability as a production level .Net platform.  &lt;/p&gt;&lt;p&gt;Java development whilst lead by Sun is also extensively supported by industry heavyweights such as IBM and Google and a range of smaller but no less important entities, the most famous of which being the &lt;a href=&quot;http://www.apache.org/&quot;&gt;Apache Software Foundation&lt;/a&gt;. Recently Sun announced they would be &lt;a href=&quot;http://www.sun.com/2006-1113/feature/&quot;&gt;open sourcing core Java technologies&lt;/a&gt; under the GPL. A significant benefit of this move is that it will allow Java to be tightly integrated into Linux distributions, easing deployment burdens for IT administrators. Unlike the one size fits all approach favored by .Net, Java is broken into a range of different frameworks which can be combined together to generate a unique set of functionality. This design also enables third parties to develop languages like ColdFusion that allow developers to utilise the power of many J2EE technologies without the added complexity. &lt;/p&gt;&lt;h2&gt;And the winner is...&lt;/h2&gt;&lt;p&gt;There is no clear winner when it comes to comparing Java and .Net simply because they are both so powerful and similar in design. Here is a short list of positives they both share:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;An excellent suite of development tools&lt;/li&gt;&lt;li&gt;Relatively fast once compiled&lt;/li&gt;&lt;li&gt;Large developer bases&lt;/li&gt;&lt;li&gt;Comprehensive reference materials &lt;/li&gt;&lt;li&gt;Widespread industry backing&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Compared to .Net, Java has the following benefits:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Open source platform&lt;/li&gt;&lt;li&gt;A distributed development community&lt;/li&gt;&lt;li&gt;More deployment and architecture flexibility as it is platform neutral&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;On the other hand .Net has the following going for it:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Microsoft backed and integrated into Windows&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Concise platform controlled by Microsoft&lt;/li&gt;&lt;li&gt;Easier for existing Windows developers to adopt (i.e. C++ and Visual Basic coders)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;When it comes to the speed at which one can create applications it really comes down to the skill individual developer (after all, bad craftsmen blame their tools). But even with this in mind compared to more agile Web centric programming frameworks like Ruby on Rails and PHP, both Java and .Net are painfully slow to develop for.&lt;/p&gt;&lt;p&gt;So if you are after a concrete recommendation then here is my situation dependent advice that I have gained from programming experience:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;If you want a platform neutral, highly scalable and robust framework choose Java.&lt;/li&gt;&lt;li&gt;If you will only ever run Microsoft products and have a set of Windows centric programmers on hand then .Net is the easiest route. &lt;/li&gt;&lt;li&gt; If it is coding speed and flexibility you are after then checkout Ruby on Rails.&lt;/li&gt;&lt;li&gt;If you want something that is simple to deploy, relatively agile and easy to learn then PHP is the way to go.   &lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/java&quot;&gt;java&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/programming&quot;&gt;programming&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/asp_net&quot;&gt;asp.net&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Mon, 22 Jan 2007 04:23:35 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">384 at https://www.stress-free.co.nz</guid>
</item>
</channel>
</rss>
