<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Example on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/example/</link>
    <description>Recent content in Example on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Mon, 26 Mar 2012 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/example/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hibernate Search Faceting: Discrete and Range Faceting by Example</title>
      <link>https://www.hascode.com/hibernate-search-faceting-discrete-and-range-faceting-by-example/</link>
      <pubDate>Mon, 26 Mar 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/hibernate-search-faceting-discrete-and-range-faceting-by-example/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In today’s tutorial we’re exploring the world of faceted searches like the one we’re used to see when we’re searching for an item on Amazon.com or other websites. We’re using Hibernate Search here that offers an API to perform discrete as well as range faceted searches on our persisted data.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_dependencies_needed&#34;&gt;Maven Dependencies Needed&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For simplicity’s sake am I going to use an HSQL database for persistence, in addition the dependencies for &lt;em&gt;hibernate-entitymanager&lt;/em&gt; and &lt;em&gt;hibernate-search&lt;/em&gt; (of course) should be added to your &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a sample Java EE 6 Blog Application with JPA, EJB, CDI, JSF and Primefaces on GlassFish</title>
      <link>https://www.hascode.com/creating-a-sample-java-ee-6-blog-application-with-jpa-ejb-cdi-jsf-and-primefaces-on-glassfish/</link>
      <pubDate>Tue, 08 Feb 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-sample-java-ee-6-blog-application-with-jpa-ejb-cdi-jsf-and-primefaces-on-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java EE 6 is out and it indeed offers an interesting stack of technologies. So in today’s tutorial we are going to build a small sample web application that builds on this stack using Enterprise JavaBeans, Java Persistence API, Bean Validation, CDI and finally Java Server Faces and PrimeFaces.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The application we’re going to develop is a simple blog app that allows us to create new articles, list them and – finally delete them. We’re also covering some additional topics like JSF navigation, i18n, Ajax-enabled components and the deployment on the GlassFish application server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Enterprise Java Bean EJB 3.1 Testing using Maven and embedded Glassfish</title>
      <link>https://www.hascode.com/enterprise-java-bean-ejb-3.1-testing-using-maven-and-embedded-glassfish/</link>
      <pubDate>Sat, 01 Jan 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/enterprise-java-bean-ejb-3.1-testing-using-maven-and-embedded-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Are you playing around with the shiny new 3.1 EJB API?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven for your Java projects?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Need an easy way to write and execute tests for your EJBs that depends on an Java Application Server?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;No problem using Maven Archetypes, the Maven EJB Plugin and the GlassFish embedded Application Container..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;EJB_3.1_Embedded_Application_Server_Components.png&#34; alt=&#34;EJB 3.1 Embedded Application Server Components&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For the following tutorial we’re going to need an installation of &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; and of course – the &lt;a href=&#34;http://www.oracle.com/technetwork/java/index.html&#34;&gt;Java Development Kit&lt;/a&gt;!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Bean Validation with JSR-303 and Hibernate Validator</title>
      <link>https://www.hascode.com/bean-validation-with-jsr-303-and-hibernate-validator/</link>
      <pubDate>Tue, 14 Dec 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/bean-validation-with-jsr-303-and-hibernate-validator/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You want to add some validation logic to your Java beans? You want to achieve this with some shiny extendable annotations? Then give the Java Bean Validation standard aka &lt;a href=&#34;http://jcp.org/en/jsr/summary?id=303&#34;&gt;JSR-303&lt;/a&gt; a try..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to use the reference implementation for bean validation, &lt;a href=&#34;http://www.hibernate.org/subprojects/validator.html&#34;&gt;Hibernate Validator&lt;/a&gt; in this tutorial but there are also links to other alternatives like &lt;a href=&#34;http://oval.sourceforge.net/&#34;&gt;Oval&lt;/a&gt; or &lt;a href=&#34;http://incubator.apache.org/bval/cwiki/index.html&#34;&gt;Apache Bean Validation&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So let’s begin and validate some stuff ..&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;JDK &amp;gt;=6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven &amp;gt;=2&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An IDE or text editor of choice&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using PrimeFaces to pimp up existing Java Server Faces / JSF 2 Applications</title>
      <link>https://www.hascode.com/using-primefaces-to-pimp-up-existing-java-server-faces-/-jsf-2-applications/</link>
      <pubDate>Sun, 14 Nov 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-primefaces-to-pimp-up-existing-java-server-faces-/-jsf-2-applications/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we’re going to modify an existing Java Server Faces / JSF 2 web application by adding rich UI components to the existing layout.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our tool of choice here is the PrimeFaces framework. It offers a wide range of interesting, customizable and (several) Ajax-enabled components that blend very well with JSF1+2 and also a solid documentation that allows a quick integration into existing projects.&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup&#34;&gt;Project setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For this tutorial we’re going to reuse the web application from my JSF2 Tutorial “&lt;a href=&#34;../java-server-facesjsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/&#34;&gt;Java Server Faces/JSF 2 Tutorial – Step 1: Project setup, Maven and the first Facelet&lt;/a&gt;” – the source code is available at &lt;a href=&#34;https://github.com/hascode/hascode-tutorials/src/tip/jsf2-tutorial-part1/&#34;&gt;GitHub.org&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Object-relational Mapping using Java Persistence API JPA 2</title>
      <link>https://www.hascode.com/object-relational-mapping-using-java-persistence-api-jpa-2/</link>
      <pubDate>Mon, 11 Oct 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-relational-mapping-using-java-persistence-api-jpa-2/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the world of object-relational Mapping and how it is done using the Java Persistence API by creating some basic examples, mapping some relations and querying objects using JPQL or the Criteria API..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Java 6 JDK&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maven &amp;gt;= 2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you’d like to take a look behind the scenes e.g. how entities are mapped in your database you could install a RDBMS of your choice .. or just use Derby/JavaDB that is bundled with the JDK 6&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing around with the Android Animation Framework</title>
      <link>https://www.hascode.com/playing-around-with-the-android-animation-framework/</link>
      <pubDate>Mon, 27 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-around-with-the-android-animation-framework/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Animations add some spice to our Android applications and the offered animation framework makes it easy to create custom animations and tweens.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets dance around and create some animations ;) ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_about&#34;&gt;About&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There are two ways to create animations – via XML declaration or in a Java class. We’re going to focus on XML declaration – if you’re interested in java based declaration – take a look at the Android &lt;a href=&#34;http://developer.android.com/reference/android/view/animation/Animation.html&#34;&gt;JavaDocs&lt;/a&gt; and the subclasses of &lt;em&gt;android.view.animation.Animation&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a SOAP Service using JAX-WS Annotations</title>
      <link>https://www.hascode.com/creating-a-soap-service-using-jax-ws-annotations/</link>
      <pubDate>Thu, 23 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-soap-service-using-jax-ws-annotations/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It is possible to create SOAP webservices with only a few lines of code using the JAX-WS annotations. In a productivity environment you might prefer using &lt;em&gt;contract-first&lt;/em&gt; instead of &lt;em&gt;code-first&lt;/em&gt; to create your webservice but for now we’re going to use the fast method and that means &lt;em&gt;code-first&lt;/em&gt; and annotations olé!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_the_soap_service&#34;&gt;Creating the SOAP Service&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a class &lt;em&gt;SampleService&lt;/em&gt; with two public methods&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Annotate this class with &lt;em&gt;@WebService&lt;/em&gt; (&lt;em&gt;javax.jws.WebService) –&lt;/em&gt; now all public methods of this class are exported for our SOAP service&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To change the name of an exported method, annotate the method with &lt;em&gt;@WebMethod(operationName = “theDesiredName”)&lt;/em&gt; (&lt;em&gt;javax.jws.WebMethod&lt;/em&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Finally the service class could look like this&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.tutorial.soap;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService public class SampleService {
 @WebMethod(operationName = &amp;#34;getInfo&amp;#34;) public String getInformation() {
 return &amp;#34;hasCode.com&amp;#34;;
 }

 public String doubleString(String inString) {
 return inString + inString;
 }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create an Android App using Google’s App Inventor</title>
      <link>https://www.hascode.com/how-to-create-an-android-app-using-googles-app-inventor/</link>
      <pubDate>Wed, 04 Aug 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-an-android-app-using-googles-app-inventor/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at Google’s App Inventor feature that offers programming-novices a nice possibility to enter the fabulous world of Android App programming without deeper knowledge of the API or complex SDK installations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets build some stuff ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://java.oracle.com&#34;&gt;Java 6 JDK&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://appinventor.googlelabs.com/learn/setup/index.html&#34;&gt;App Inventors Extras Software&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A Google App Inventor Beta Account – request one &lt;a href=&#34;https://services.google.com/fb/forms/appinventorinterest/&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_what_we_are_going_to_build&#34;&gt;What we are going to build&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;We are building a simple GUI with a Textbox and a button&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A click on the button starts an event that queries the acceleration sensor for coordinates&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the sensor is active and enabled then the coordinates are displayed in the text box&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a simple OSGi Web Application using Maven</title>
      <link>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</link>
      <pubDate>Sun, 25 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we will take a look at the development of a simple OSGi Web Application and what tools can save us some time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Maven Bundle Plugin makes our life much easier here as does the OSGi Bundle Repository that offers some nice bundles – in our case the servlet API and an embedded Jetty web server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets develop some bundles ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You are going to need a &lt;a href=&#34;http://java.sun.com/javase/downloads/index.jsp&#34;&gt;JDK&lt;/a&gt; (&amp;gt;=5), &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven2&lt;/a&gt;, the &lt;a href=&#34;http://felix.apache.org&#34;&gt;Apache Felix OSGi implementation&lt;/a&gt; and and text editor/http://eclipse.org/[IDE] of your choice.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a Template Bundle Plugin in Confluence</title>
      <link>https://www.hascode.com/how-to-create-a-template-bundle-plugin-in-confluence/</link>
      <pubDate>Mon, 12 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-template-bundle-plugin-in-confluence/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Since Confluence 3.2. there is a new plugin module type that allows you to deploy templates in a bundle via the plugin API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition it is possible to assign these templates to specific spaces and preview available templates in the Confluence administration area.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So let’s build some sample templates..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_template_bundle_plugin&#34;&gt;Creating a Template Bundle Plugin&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Creating a template bundle is easy – just create a class implementing &lt;em&gt;TemplatePackage&lt;/em&gt; – there are two methods: one returns a list of bundled &lt;em&gt;PageTemplate&lt;/em&gt; Objects the other the name for the template bundle.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A look at Google’s Protocol Buffers</title>
      <link>https://www.hascode.com/a-look-at-googles-protocol-buffers/</link>
      <pubDate>Tue, 06 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/a-look-at-googles-protocol-buffers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Protocol Buffers are a serialization format developed by Google- you might ask if another IDL is really needed here – is Google barking at the wrong tree?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;But protocol buffers offer some advantages over data serialization via XML or JSON – Google says they (compared to XML)..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;are 3 to 10 times smaller&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;are 20 to 100 times faster&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide generated data access classes for programmatic use&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide backward compatibility&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Server Faces/JSF 2 Tutorial – Step 1: Project setup, Maven and the first Facelet</title>
      <link>https://www.hascode.com/java-server-faces/jsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/</link>
      <pubDate>Sat, 05 Jun 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-server-faces/jsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this short tutorial we are going to build a Java Server Faces Web-Application using JSF2.0, Facelets, Maven and Hibernate as ORM Mapper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The goals for this first step are: Setting up the project structure using Maven, defining a frame template/decorator and a registration facelet, creating a managed bean and mapping it’s values to the facelet, adding some basic validation, displaying validation errors and finally adding a navigation structure.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In step2 of this tutorial we are going to add persistence using Hibernate, add some security, create a custom UI component and add some AJAX.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Sensor Fun: Location Based Services and GPS for Android</title>
      <link>https://www.hascode.com/sensor-fun-location-based-services-and-gps-for-android/</link>
      <pubDate>Sun, 30 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/sensor-fun-location-based-services-and-gps-for-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Android SDK offers a nice API to receive information about available providers for location based services and get the current location and coordinates.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this short tutorial we’re going to build a small activity that displays a list of available location providers and shows the current position using GPS services.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_example_application&#34;&gt;Example Application&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a new Android Project using ADT and your IDE with a package named &lt;em&gt;com.hascode.android.location_app&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the permissions needed to the &lt;em&gt;AndroidManifest.xml&lt;/em&gt; – it should look like this&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
&amp;lt;manifest xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
	package=&amp;#34;com.hascode.android.location_app&amp;#34; android:versionCode=&amp;#34;1&amp;#34;
	android:versionName=&amp;#34;1.0&amp;#34;&amp;gt;
	&amp;lt;application android:icon=&amp;#34;@drawable/icon&amp;#34; android:label=&amp;#34;@string/app_name&amp;#34;&amp;gt;
		&amp;lt;activity android:name=&amp;#34;.LocationActivity&amp;#34; android:label=&amp;#34;@string/app_name&amp;#34;&amp;gt;
			&amp;lt;intent-filter&amp;gt;
				&amp;lt;action android:name=&amp;#34;android.intent.action.MAIN&amp;#34; /&amp;gt;
				&amp;lt;category android:name=&amp;#34;android.intent.category.LAUNCHER&amp;#34; /&amp;gt;
			&amp;lt;/intent-filter&amp;gt;
		&amp;lt;/activity&amp;gt;

	&amp;lt;/application&amp;gt;
	&amp;lt;uses-sdk android:minSdkVersion=&amp;#34;7&amp;#34; /&amp;gt;

	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_COARSE_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_FINE_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_LOCATION_EXTRA_COMMANDS&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
	&amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_MOCK_LOCATION&amp;#34;&amp;gt;&amp;lt;/uses-permission&amp;gt;
&amp;lt;/manifest&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Extending the Confluence Search Index</title>
      <link>https://www.hascode.com/extending-the-confluence-search-index/</link>
      <pubDate>Sun, 23 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/extending-the-confluence-search-index/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Developing plugins for the Confluence Wiki a developer sometimes needs to save additional metadata to a page object using Bandana or the ContentPropertyManager. Wouldn’t it be nice if this metadata was available in the built-in Lucene index?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That is were the Confluence Extractor Module comes into play..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_overview&#34;&gt;Overview&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;An extractor allows the developer to add new fields to the lucene search index. Creating a new extractor is quite simple – just implement the interface &lt;em&gt;com.atlassian.bonnie.search.Extractor&lt;/em&gt; or &lt;em&gt;bucket.search.lucene.extractor.BaseAttachmentContentExtractor&lt;/em&gt; if you want to build a new file extractor.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a simple Gesture App with Android</title>
      <link>https://www.hascode.com/creating-a-simple-gesture-app-with-android/</link>
      <pubDate>Fri, 14 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-simple-gesture-app-with-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The integration of gestures into your android app adds some nice functionality and is made very easy using Google’s GestureBuilder application and the integrated GestureLibrary and Gesture Overlay API – so let’s build a sample app.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you need some basic information regarding gestures on android first – take a look at &lt;a href=&#34;../android-gestures/&#34;&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_gesture_library&#34;&gt;Creating a gesture library&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First you need to define the gestures that should be captured in the application later. For this reason there’s the &lt;em&gt;GestureBuilder&lt;/em&gt; delivered with the Android SDK. You can find the app in the samples directory of your android sdk – e.g. &lt;em&gt;&amp;lt;installation-directory&amp;gt;/android-sdk-linux_86/platforms/android-2.1/samples/GestureBuilder&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippets: Getting License Information from the Confluence API</title>
      <link>https://www.hascode.com/snippets-getting-license-information-from-the-confluence-api/</link>
      <pubDate>Thu, 06 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippets-getting-license-information-from-the-confluence-api/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes one needs to look up license details of a running Confluence system .. perhaps for creating a commercial plugin or to display recommendations dependant from the license used. For this reason there are a few possibilities for receiving some license information from the Confluence API or the velocity context.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;quoteblock&#34;&gt;
&lt;blockquote&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Note: This article is outdated since the Atlassian Marketplace was launched and a shiny new licensing API was added. Until this article is updated I strongly recommend to take a closer look at the detailed information that Atlassian is providing in the &lt;a href=&#34;https://developer.atlassian.com/display/UPM/How+to+Add+Licensing+Support+to+Your+Add-on&#34;&gt;Developer Documentation&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>First steps on Android: Creating a simple Todo App</title>
      <link>https://www.hascode.com/first-steps-on-android-creating-a-simple-todo-app/</link>
      <pubDate>Mon, 26 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/first-steps-on-android-creating-a-simple-todo-app/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we are going to build a simple todo app that is able to store simple todos in a database. The user is able to add new todos or delete old ones by clicking on a todo. For this tutorial we won’t use maven to keep it simple – if maven integration is desired – take a look at &lt;a href=&#34;https://www.hascode.com/../how-to-integrate-android-development-tools-and-maven/&#34;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a new android project using the &lt;a href=&#34;http://developer.android.com/sdk/index.html&#34;&gt;Android SDK&lt;/a&gt; and your IDE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create some packages &lt;em&gt;com.hascode.android.activity&lt;/em&gt; and &lt;em&gt;com.hascode.android.persistence&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the layout in &lt;em&gt;res/layout/main.xml&lt;/em&gt; – the main elements: a listview for the todos-list, a textbox and a button to enter new data.&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
    &amp;lt;RelativeLayout
        android:id=&amp;#34;@+id/widget31&amp;#34;
        android:layout_width=&amp;#34;fill_parent&amp;#34;
        android:layout_height=&amp;#34;fill_parent&amp;#34;
        xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
    &amp;gt;
        &amp;lt;TableRow
            android:id=&amp;#34;@+id/row&amp;#34;
            android:layout_width=&amp;#34;fill_parent&amp;#34;
            android:layout_height=&amp;#34;wrap_content&amp;#34;
            android:orientation=&amp;#34;horizontal&amp;#34;
            android:layout_below=&amp;#34;@+id/tasklist&amp;#34;
            android:layout_alignParentLeft=&amp;#34;true&amp;#34;
        &amp;gt;
            &amp;lt;EditText
                android:id=&amp;#34;@+id/etNewTask&amp;#34;
                android:layout_width=&amp;#34;200px&amp;#34;
                android:layout_height=&amp;#34;wrap_content&amp;#34;
                android:text=&amp;#34;&amp;#34;
                android:textSize=&amp;#34;18sp&amp;#34;
            &amp;gt;
            &amp;lt;/EditText&amp;gt;
            &amp;lt;Button
                android:id=&amp;#34;@+id/btNewTask&amp;#34;
                android:layout_width=&amp;#34;wrap_content&amp;#34;
                android:layout_height=&amp;#34;wrap_content&amp;#34;
                android:text=&amp;#34;@+string/add_button_name&amp;#34;
            &amp;gt;
            &amp;lt;/Button&amp;gt;
        &amp;lt;/TableRow&amp;gt;
        &amp;lt;ListView
            android:id=&amp;#34;@+id/tasklist&amp;#34;
            android:layout_width=&amp;#34;fill_parent&amp;#34;
            android:layout_height=&amp;#34;wrap_content&amp;#34;
            android:layout_alignParentTop=&amp;#34;true&amp;#34;
            android:layout_alignParentLeft=&amp;#34;true&amp;#34;
        &amp;gt;
        &amp;lt;/ListView&amp;gt;
&amp;lt;/RelativeLayout&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
