Study says Android to be the mobile development platform of choice in 12 months

According to a study by Ovum, Android is expected to be the mobile development platform of choice… in 12 months. That’s not a long time.

As an Android user, it’s pretty obvious there’s an increasing amount of development for the platform just by the volume of apps making their way to the Android Market. 3 years ago it was slim pickings in the store, but now the Android Market is starting to have the same issue as the iOS App Store… how do do you find what you’re looking for?

Non-technical technical architect

Not sure where I heard this, but thought it was funny (paraphrasing slightly here):

Non-technical technical architect: someone involved in or responsible for the technical architecture of a system who has a rough idea of the concerns of architecture at a high level, but has no previous experience in actually building systems.

You don’t have to have had hands on experience in development language x or technology y in order to understand the architectural concerns of a system, but to have no prior development experience at all is somewhat of a disadvantage to understanding what actually works or doesn’t work, don’t you think?

Spring STS, Eclipse WTP, and building web apps with Maven

I get Maven. I get Eclipse & WTP. I want to use Maven for my dependency management, and I want to use Eclipse for it’s built in server suppport, for publishing, stopping and starting servers etc.

Several months back I took a look at M2Eclipse and it seemed it didn’t coexist well with WTP’s approach to web app directory structures. I’ve just taken another look and I got it working, but it took a few false starts and trial and error to find what works for me. In trying various things I’d either end up with a WTP style project which Maven wouldn’t build, or a Maven like directory structure which Eclipse wouldn’t build or deploy.

I’m pretty sure there’s many ways to do this, and I’m also sure Spring Tool Suite should be able to deploy a web project out of the box to your tc server without too much trouble, but it took a while to find what works.

One approach that does work but is probably not the best, is to add the tomcat-maven-plugin plugin to your pom.xml, define your Tomcat manager app userid and password in your maven settings.xml, and then deploy using the tomcat:deploy goal – this does work, but I’m pretty sure this is not the way you’re supposed to do things:

<build>
  <plugins>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>tomcat-maven-plugin</artifactId>
      <configuration>
      <url>http://localhost:8080/manager/html</url>
      <server>tomcat</server>
      <path>/TestWebApp</path>
      </configuration>
    </plugin>
  </plugins>
</build>

Add to settings.xml, in the servers section:

<server>
  <id>tomcat</id>
  <username>manager</username>
  <password>yourpassword</password>
</server>

The way I think it’s supposed to work with the M2Eclipse plugin and STS, is you start with a web app project created via the M2Eclipse plugins archetype support, which sets up the project config exactly to work with WTP and deploy seamlessly to tc or other WTP supported servers:

File … New… Other… Maven… Maven Project… New

Set project location then Next. From the archetype list, select ‘maven-archetype-webapp’ ‘. Fill in the maven details, then Finish. That’s it.

When you select Run As… Run on Server, it will build automatically using your pom.xml and deploy to the server. Awesome. It’s pretty easy when you know how 🙂

One catch I noticed – the maven-archetype-webapp creates a web.xml which is for Servlet 2.3:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

This caused me a couple of hours trying to work out why my JSTL tags and EL were not working when deploying to Tomcat 7. Changing the web.xml to 2.5 fixed my jstl issues. Couple of hours of trial and error and plenty of Googling, ready to roll.

2.5 web.xml:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">