11 Dec 2009, 10:35pm
Etc:
by Cliffano Subagio

leave a comment
  • My Take On People’s Takes On Google’s QR Code Push

    So Google made a big push for QR Code usage in the US by sending window decals containing QR Code links to their top 100,000 business listings (via Favorite Places). This effort was covered by TechCrunch (TC) and Mobile Marketing Watch (MMW) among many other tech blogs / news sites out there. For the most part of the articles, they were only a rehash of Google’s original blog post, while the rest contained some original opinions from the authors, and this, along with some short sighted comments, was the part that bugged me.

    Let’s start with a paragraph from TC article

    Local businesses can also set up coupon offers through their Google directory page, which would turn the QR code into a mobile coupon, and help entice someone standing outside a store to come in: “If you found us on Google, you get 20% off.”

    MMW not only copied exactly the same paragraph, but also added

    This is where the true benefit lies.

    And my take is… Coupon only benefits if you want to attract potential customers not standing outside a store, e.g. if you do a Google search and you find the Google directory page along with a coupon from the said business. On the other hand, if you do want to attract someone nearby your store, surely a large 20% discount or a SALE sign will do a better job than a garble of black and white dots inside a square.

    I think the true benefits of having those QR Codes placed on the door of your restaurant/store are

    1. To convince the potential customers to use your business by exposing them to positive reviews and ratings.
      This is why Google only sent the window decals to their top listings, businesses having negative reviews might not be so keen.
    2. To increase the possibility of those (potential) customers revisiting your business by providing them with the address, map, and contact details.
      This replaces the traditional role of business cards.

    Both points are nothing new, they already exist all along with print media (brochures, business cards) and human interaction (conversation, words of mouth). Brochures and business cards will eventually run out and there’s a limit to the number of people you can reach by talking directly to the person. So you move those content online, in this case as a Google business listing. And what is the easiest way to link you and those online content? QR Code! QR Code is the simplest mechanism to retrieve those content (point and click) and to keep the content with you (as a url bookmark on your mobile phone).

    6 Dec 2009, 4:01pm
    Projects:
    by Cliffano Subagio

    5 comments
  • Sitebricks And SiteMesh On Google App Engine

    For the past couple of weeks, I’ve been trying various web framework stacks to be used with Google App Engine. The ones that I gave a go, and gave a pass for various reasons, were Stapler (the enchilada that powers Hudson), Spring, and RestEasy + htmleasy.

    The search continued and I came across Sitebricks, still in its alpha phase but it looks really promising. Simple and straightforward, nothing too magicky, and I got it working with GAE/J in no time.

    To guide others who might want to give Sitebricks on Google App Engine a try, here’s what I did: (and please note that this is a miminalist guide, enough to get a simple page up and running)

    1. Using Google Plugin for Eclipse, create a new Google Web Application Project with Google App Engine enabled and Google Web Toolkit disabled.
    2. Since Sitebricks didn’t have any official release yet, I had to build the jar from the sitebricks-0.7 tag using
      mvn install -Dmaven.test.skip=true

      . Unfortunately some of the unit tests on the trunk failed so I just skipped them, hey it’s still in alpha.

    3. The above command downloaded all the dependency jars and generated a Sitebricks SNAPSHOT jar at <M2_REPO>/com/google/sitebricks . Copy the following jars to the Eclipse project’s /war/WEB-INF/lib directory and add them to the build path.
      • sitebricks-0.7.jar
      • guice-2.0.jar
      • guice-servlet-2.0.jar
      • google-collections-1.0-rc3.jar
      • aopalliance-1.0.jar
      • mvel2-2.0.14.jar
      • dom4j-1.6.1.jar
      • commons-io-1.4.jar
    4. Create the following files in src/your/package/name.
      GuiceInit.java

      public class GuiceInit extends GuiceServletContextListener {
      
          @Override
          public Injector getInjector() {
              return Guice.createInjector(new SitebricksModule() {
                  @Override
                  protected void configureSitebricks() {
                      scan(FooBar.class.getPackage());
                  }
              });
          }
      }

      FooBar.java

      @At("/barkleyzone")
      public class FooBar {
      
          public String getQuote() {
              return "I have nothing against old people; I want to be one myself one day";
          }
      
          public String getName() {
              return "Charles Barkley";
          }
      }
    5. Create FooBar.html in /war.

      <div>
          ${name} said "${quote}".
      </div>
      
    6. Add GuiceInit servlet context listener and GuiceFilter to /war/WEB-INF/web.xml.

      <filter>
          <filter-name>webFilter</filter-name>
          <filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
      </filter>
      <filter-mapping>
          <filter-name>webFilter</filter-name>
          <url-pattern>/*</url-pattern>
      </filter-mapping>
      <listener>
          <listener-class>your.package.name.GuiceInit</listener-class>
      </listener>
      
    7. Enable sessions by adding this line in /war/WEB-INF/appengine-web.xml .
      <sessions-enabled>true</sessions-enabled>
      
    8. Use Eclipse Run -> Run As -> Web Application to start the application and visit http://localhost:8080/barkleyzone and you should see this message:
      Charles Barkley said "I have nothing against old people; I want to be one myself one day."
    As for a page layout / templating solution, SiteMesh has always been a personal favourite.
    1. Download sitemesh-2.4.2.jar, place it in /war/WEB-INF/lib directory and add it to the build path.
    2. Create /war/templates/main.jsp .
      <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
      <html>
      <head>
      <title>Test</title>
      </head>
      <body>
          <decorator:body/>
      </body>
      </html>
      
    3. Create /war/WEB-INF/decorators.xml .

      <decorators defaultdir="/templates/">
          <decorator name="main" page="main.jsp">
              <pattern>/*</pattern>
          </decorator>
      </decorators>
      
    4. Add SiteMeshFilter to /war/WEB-INF/web.xml .

      <filter>
          <filter-name>sitemesh</filter-name>
          <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
      </filter>
      <filter-mapping>
          <filter-name>sitemesh</filter-name>
          <url-pattern>/*</url-pattern>
      </filter-mapping>
      
    5. Use Eclipse to stop and start the application, view the HTML source of http://localhost:8080/barkleyzone and you should see the HTML layout wrapping the original div element.

     
     

    Recent Posts

    Recent Comments

    • Tharindu: i started blogging long long time back but couldnt continue. last november i stated blogging again with...
    • maria: maybe he didnt believe in god, i dont either and does it really matter?? his message is the same:he talks...
    • Cliffano Subagio: Sure thing. The license for the images is Creative Commons Attribution Share Alike...
    • daniel: nice articles. can I copy your images? :D
    • Cliffano Subagio: Only an idea, won’t be made into real site (unless someone else wants to do it). Something...

    Most Commented Posts

    Linkroll