Kwebble : Blog

  • Testing your RESTful Web-Services with REST-assured and Jersey-Test-Framework

    Gepubliceerd op 6 september 2011 in Links, Programming.

    A tutorial about testing REST-ful services. Tests for both tools can be written in JUnit, which means these tests can be part of your normal automated unit tests.

    1. REST-assured, a framework that offers a DSL-like syntax to create well readable tests.
    2. Jersey-Test-Framework which offers a execution environment and is built upon the JAX-RS reference implementation, Jersey.

    In the tutorial you will create a simple SOAP service and then implement integration tests for this service using both frameworks.

    • java
    • jersey
    • junit
    • rest
    • unit testing
  • PopShared.nl toont de meest gedeelde headlines op Twitter

    Gepubliceerd op 2 september 2011 in Links.

    PopShared.nl rangschikt berichten van nieuwssitesop basis van het aantal retweets dat de headlines genereren. Voor elk van de onderwerpen Nieuws, Economie, Marketing, Tech en Mobile worden tot 15 websites gevolgd. De meest gedeelde headlines zijn te bekijken over de periodes van de afgelopen 24 uur, 2 en 7 dagen.

  • JVM Language Summit 2011 Videos

    Gepubliceerd op 1 september 2011 in Links, Programming.

    Videos and presentations from this year’s gathering of architects and designers of languages and tools for the JVM.

    • compiler
    • java
    • jvm
    • presentation
    • programming language
    • video
  • MoreUnit

    Gepubliceerd op 29 juni 2011 in Programming.

    In Eclipse I missed a way to see the relation between a test class and the class under test. Well, the MoreUnit plugin relates the two and offers tools to help you switch between code of the test and the tested class. From the site:

    • MoreUnit decorates classes which have a test case.
    • It marks methods in the editor which are under test.
    • You can jump to a test case/test method in the editor via the menu or a shortcut (Ctrl-J by default).
    • You can run a test case/test method from the class under test via the menu or a shortcut (Ctrl-R by default).
    • Rename classes/methods and MoreUnit will rename the corresponding test code too.
    • Move classes and MoreUnit will move the corresponding test cases.
    • You can generate a test method stub for the method under the cursor in the editor via the menu or a shortcut.

    All useful features to help writing and managing the unit tests of your Java classes. You do write unit tests, do you?

    • eclipse
    • java
    • junit
    • tdd
    • testng
    • unit test
  • To use localStorage in Firefox cookies must be allowed

    Gepubliceerd op 28 juni 2011 in Programming.

    In case a JavaScript generates a security error in Firefox when using localStorage, I found the advice to make sure the about:config property dom.storage.enabled to true.

    But this is not enough! localStorage is only available if cookies are allowed for the domain that serves the web page with the script.

    I find this strange, cookies are completely different things.

    • cookie
    • firefox
    • html5
    • javascript
    • localstorage
    • tip
  • Experiences with Maven 3: Generating reports

    Gepubliceerd op 21 juni 2011 in Programming.

    After installing version 3 of Maven I missed the generation of the documentation site. While the documentation claims no changes to POM files are necessary to use the newer version it doesn’t behave the same.

    Version 3 accepts the same POM files used with version 2, but the site goal no longer generates any output. This is because of a change in the POM structure. The configuration of reports has moved from a separate <reporting> section to the <build> section:

    <build>
      <plugins>
        ...
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.0-beta-3</version>
          <configuration>
            <reportPlugins>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.4</version>
              </plugin>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                  <quiet>true</quiet>
                </configuration>
              </plugin>
            </reportPlugins>
          </configuration>
        </plugin>
        ...
      </plugins>
    </build>
    

    To generate the general project information reports you automatically get with Maven 2, add the maven-project-info-reports-plugin.

    • documentation
    • maven
  • Smaller classes make better code

    Gepubliceerd op 17 juni 2011 in Programming.

    Tip: read In Praise of Small Classes and its follow-up Making Large Classes Small (In 5 Not-So-Easy Steps) about writing better code. Better here means:

    • easier to read and understand, so easier to maintain
    • less complex classes
    • better testable classes
    • a better class and package structure
    • class design
    • improvement
    • object orientation
    • oo
    • source code
    • tip
  • Filter .svn folders in Eclipse Navigator

    Gepubliceerd op 16 november 2010 in Programming.

    To hide the .svn folders from the Eclipse Navigator there’s no UI setting, you need to create a plugin. So here it is, a little plugin to hide .svn folders:

    <?xml version="1.0" encoding="UTF-8"?>
    <?eclipse version="3.0"?>
    <plugin id="com.kwebble.ide.navigator.filter" name="Filter .svn folders" version="1.0">
    	<extension point="org.eclipse.ui.ide.resourceFilters">
    		<filter pattern=".svn" selected="true"/>
    	</extension>
    </plugin>
    

    Put this in a com.kwebble.ide.navigator.filter folder under the Eclipse plugins folder.

    To filter files with different names adjust the pattern accordingly.

    • eclipse
    • plugin
    • svn
  • A trim() method for the JavaScript String class

    Gepubliceerd op 25 juni 2010 in Programming.

    Just rediscovered that IE still doesn’t include the trim() method on the String class. Here’s a snippet of code, based on an answer on StackOverflow, to make sure there’s a trim method available:

    if (typeof String.prototype.trim !== 'function') {
        String.prototype.trim = function() {
            return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
        }
    }
    

    On the positive side I also found out about the debugger included in IE 8. Just like Firebug, available via F12!

    • javascript
  • Is u iets opgevallen?

    Gepubliceerd op 11 mei 2010 in Media.

    Nu gebruikt in De Wereld Draait Door, oorspronkelijk in een bioscoopjournaal van 1978 over de beeldplaat:

    bron: Open Beelden

    • beeldplaat
    • dwdd
    • video
  • « Oudere artikelen
  • Nieuwere artikelen »
  • Rubrieken

    • Artikelen
    • Foto's
    • Links
    • Media
    • Overheid
    • Programming
  • Recente Berichten

    • Stanford Web Applications course lectures
    • The importance of knowing Unicode
    • “If you are not paying for it, you’re not the customer; you’re the product being sold.”
    • Inzage in je gegevens bij Facebook
    • Tuning Oracle UCM 11 & Site Studio performance
  • Abonneren

    • Atom feed Artikelen
    • Atom feed Reacties
  • Archief

© Rob Schlüter - Contact