Skip to content

EJBs in the three tier system

This is primarily written as a basic primer for those CMP students on the same course as me that are struggling and or frustrated with Enterprise JavaBeans. I won’t give any course work specific info, but hopefully this may help at least a bit.

Firstly I should probably mention I have worked in a real software development environment coding EJBs and I’m also using the technology in my third year project, so there is a real practical use for it in the big bad world.

So, what the heck is all this EJB stuff?
Well Enterprise JavaBeans allow you, amongst other things, to get data from a database and manipulate it. Using EJBs adds an extra tier to your system architecture, which essentially cuts down on the amount of SQL and database connectivity code you have to write (see here for more info about web application architecture). You’ve got three main types of beans:

  • Entity beans – these represent tables in the database. They’re just a class with a few annotations which tell the EJB container to map between the table columns and the fields in the class.
  • Example:
    public class EntityName implements Serializable {
    private Integer id; //column 1
    private String name; //column 2
    private List<AnotherEntity> otherEntities = new ArrayList<AnotherEntity>(); //a one to many relationship
    public EntityName () { }
    @GeneratedValue(strategy=GenerationType.IDENTITY) //container generates id
    @Column(name=”id”) //here we tell the container the name of the column this field maps to
    public Integer getId() {
    return id;
    public void setId(Integer id) { = id;
    public String getName() {
    return name;
    public void setName(String name) { = name;
    public List<AnotherEntity> getOtherEntities() {
    return otherEntities;
    public void setOtherEntities(List<AnotherEntities> entities) {
    this.otherEntities = entities;

  • Session Beans – this is where you stick all your actual code which does stuff with the entities.
  • Example:
  • @Stateless
  • public class DoStuffSessionBean implements DoStuffInterface {
  • @PersistenceContext(unitName=”PERSISTENCE_CONTEXT”) //defines where mapping to database
  • private EntityManager entityManager; //entity manager allows you to insert, update and delete tables in the database
  • @Override
  • public AnotherEntity findAnotherEntityById(Integer id) {
  • try {
  • return entityManager.find(Location.class, id);
  • } catch(NoResultException e) {
  • return null;
  • }
  • }
    … (thats a pretty boring session bean, see entityManager.merge, entityManager.persist and entityManager.remove for more things you can do
  • Message Driven Beans, these are nothing to do with the database but are very useful for delivering messages for event driven processes, not really covered in the module we are carrying out though

Great, but how do I set it all up in the first place?
That’s half the battle with this sort of stuff. I use Eclipse IDE, you can create a new enterprise application which gives a nice structure to your project, NetBeans will also do this for you though. Its worth noting our lab machines have no facilities for developing EJB components as NetBeans doesn’t link to any EJB compatible server (e.g. JBOSS or Glassfish, it does have TomCat but this is only a servlet container so can’t do it), and the version of Eclipse is not Enterprise Edition.
So its down to using your own machines for development and then deploying on JBOSS when you’re done, or fiddle with the lab machines a bit… Eclipse runs out of a directory (of course you would ask a member of staff first before doing this in case we are not supposed to do this…)

OK what’s the point in doing it this way?
Aside from the benefits already mentioned, EJBs are very scalable due to session beans. Instead of opening and closing database connections specifically, the EJB container manages all this for you and selects a bean out of a pool of them which are ready and waiting to process the method you want to perform. Basically when you have thousands of users of a system, all heavily hitting the database it enables your web application to still respond quickly.

How does it fit in with the rest of the application?
Well, you use your session bean to gain access to, create and modify your entity beans. You can access the session bean from a servlet (using a JNDI lookup or dependancy injection – a simple @EJB annotation). There is some setup to do in the way of XML files, but IDEs can get you a long way in that respect.

Anything else?
There are loads of great tutorials but be aware there are a shed load of different ways to implement EJBs, so make sure at the very least its an example for EJB 3.0 you’re looking at. If something isn’t working out from one tutorial, take a look at some others and see what the most commonly used approaches are. 

I hope that very short intro is in some part useful to people. I have very little time to put into something like this, but I know there are going to be people tearing their hair out (to put it mildly) with this particular course work.

Stuff I’ve done and stuff I’ve learnt…

In the last few months I’ve been working intensively on my current main project. It’s easy to lose perspective on certain things when you’re working so closely to a particular project. So in a quick breather while one of my applications is building for the several hundredth time, I thought I would recap a bit.

Amidst finishing my degree I’ve been working on a project for what I estimate to be over 250 hours of development time alone. In this time I’ve come across many obstacles and new technologies. Here is a list of just some of those I’ve been using in recent months:

  • Constraint Logic Programming for practical applications such as resource planning and scheduling
  • Building custom widgetsets in Vaadin
  • RESTful Web Services
  • SOAP Web Services
  • More EJB based Object Relational Mapping
  • Google Calendar and Contacts Data APIs
  • Google Accounts OAuth authentication – which yes I have now got working, more info to follow soon
  • Google GMail API
  • Java Message Service (JMS)

And there is more to come as I move to going live with a product I’m developing from all these bits and pieces. This is not just a case of – ‘yeah I’ve looked at few code examples on the internet’, this is learning through application of these technologies to the extent that they work well with my software. I’ve not only learnt things, but learnt them without any assistance and integrated them together in applications. When I look back on all this, it makes me realise how much value I’ve accumulated as a developer in this time, and it also makes me feel much less like I’m wasting my last few months of studenthood.

Sure its been a utter slog at times with a mountain of information to digest and development to get through, but I think it is worth it in the long run.

When I look at the proportion of people who started our degree course who will actually end up being a software developer it is a little sad because so many had the potential but are unlikely to end up going into software at all. I’m not concerned for myself, those that have stuck it out and put the time in will in the next few years become incredibly valuable to employers. Its just a shame that so few will make the most of the opportunity, and it needs to change.

OAuth for Google Data API – not that easy to implement

Google are fantastic at building APIs, but their authentication mechanisms (while I’m sure are very secure) are not always the easiest thing to implement.

I’m working with the Google Data APIs at the moment for my project, for which an app needs access to google accounts, cue OAuth.

Anyone who doesn’t agree it is difficult to use need look no further than the exceptions you can expect if something goes wrong:

Yay! There’s no short-cut either. One thing to be thankful for is the fact that the ClientLogin authentication mechanism (really only meant for installed apps) can be implemented in two lines of code and provides a great way of testing web apps in the development phase. Unfortunately eventually you’ll have to implement OAuth if you want a properly secure web app for your users.

I will try and post some advice to others that need to implement OAuth once I figure it out. Even Google themselves admit in the documentation it is not the easiest of things to use, which does speak volumes. Supposedly however it helps make your apps authentication extensible if using other providers web services, although I’ve yet to check how many other web service providers use OAuth.

Vaadin web UI framework

Now that web applications require increasingly sophisticated user interfaces, nearly all web app developers have some experience of a user interface framework. Dynamic pages such as JSPs in Java EE and ASPs in .NET don’t allow for these richer user experiences. Delivering a range of features from simple text fields to full blown desktop – style applications is now possible through these ‘AJAX’ web technologies. There are many different approaches taken by these frameworks and platforms and I have blogged previously about some of the open source offerings such as OpenLaszlo, ThinWire and GWT.

Lately I have been using Vaadin which provides an excellent environment for rapid web UI development for Java developers. Vaadin is actually built on top of GWT, the principle advantage of which was that it required no hand-coding of javascript which is notoriously fiddly. GWT works by compiling Java code into javascript. Vaadin takes this concept a step further and renders javascript on the fly, essentially pushing everything the developer writes server side. This eliminates the need for RPC calls to deal with more complex features (not appropriate to be running on the client’s browser) such as object relational mapping with EJBs.

Essentially Vaadin allows Java developers to work solely in Java with whichever APIs and libraries they wish without thinking about what’s happening in the client and what’s happening on the server. In addition Vaadin provides some very slick, open source visual components to use in one’s application which certainly speeds up development time.

This approach is very similar to that taken in the ThinWire AJAX platform, however ThinWire unfortunately hit a lack of community support and current development has slowed right down. In contrast Vaadin, created by a Finnish company (previously called The IT Mill, now simply Vaadin Ltd), has a commercial backing from consultancy and support as well as a vibrant open source community.

For now, I think that suffices as a good introduction to the framework. Now I’ve worked with such visually and programmatically appealing platforms as this, I find it quite surprising there are not more development companies using these kinds of technology particularly if they are develping web apps and hand coding large amounts of javascript. A good starting point is the Vaadin component sampler which can be found here.

Taking Intelligent Architectures to the Cloud Expo

A week and a half ago I represented my software development organisation, Intelligent Architectures, at the combined Cloud, Linux and Open Source Expo. I was mainly promoting a project that has grown out of my final year university work. It was an interesting experience and a good opportunity for me to talk some people about this software.

There were several important things I learned while at the Expo:

  • While I’m not qualified to talk at length about it myself, it is abundantly clear that cloud computing confuses people. All of these people seemed plenty well equipped with the knowledge to understand technical concepts. The problem has to do with the blurred definition of what the cloud really is. I suppose in that sense it’s very fitting that much like the physical entities in the atmosphere that the word cloud represents, the meaning of cloud computing is similarly amorphous.
  • Software development in the UK needs to grow as an industry. Plenty of people talking to me were bemoaning the lack of quality developers and development companies that are based in the UK. Outsourcing happens a lot in the current economic climate, and while some developers abroad are genuinely offering value for money, many offer a false economy. There are many capable software developers young and old in the UK that have all the expertise and experience to deliver the absolute highest quality software. I think our industry needs investment and I also think the manner in which software is typically commissioned, developed and sold may need to change in order for the industry to grow.
  • The project needs a few things:

Knowledge Management Services becomes KMS-dev and KMS-apps

The experience of the Expo has made me realise that just offering consultancy or marketing a particular product to the target market is not necessarily the best way to get noticed.

To demonstrate the project further I now aim to have some more material online by the time the major development is finished. Its clear that some people are interested in the development platform itself, and some are interested in the applications possible to develop using the platform. Unfortunately the two sets of interested parties seem to be in most cases mutually exclusive. Therefore I’m going to split the online information into two distinct sections: KMS-dev where one can learn a bit more about the development platform itself and KMS-apps which will showcase the sample applications and as well as generating interest I hope to launch at least one of the applications as a subscription service.

Another problem I’m hoping to tackle by setting the target of making demo material available online is that articulating the project is not easy, as it doesn’t lend itself to a quick hard-sell. This links in with the second point I made above: Some people really don’t seem comfortable discussing the development of bespoke software to solve particular business problems. In my experience though, discussion of business problems is the only way to make progress and provide someone with something they really need. I could speculate endlessly on the reasons for this reluctance, but there is one important possible reason I can do something about:

People want to digest something in their own time that will provide a concise way of assessing whether a product or service can offer them some value. With this in mind over the next few months I hope to have to have the KMS website live. It will represent a new approach to marketing the development platform and the software derived from it, which I hope may resonate with interested individuals and businesses.

Intelligent Architectures' stand at the expo

The Expo itself was a good experience and it was interesting to see the range of vendors and organisations that attend such an event. It has to be said that this event was the only affordable option for a small organisation to attend in comparison to astronomical charges made by most other computing event organisers, and there wasn’t any real compromise on the quality of the event either.

Presence at the Expo represents another step towards taking what started out as a simple idea and turning it into a desirable product to bring to market.

Exhibiting at Linux and Open Source Expo 2011 in London

In my post last week I wrote:

I hope in the near future to bring exciting news about further developments in my project work

Well next week (2-3rd February) I’ll be exhibiting my software project  as Intelligent Architectures’ founder and chief developer. Find out more information about the expo here. This will provide a much needed opportunity for my project to get some exposure and hopefully develop links with interested businesses.

It was a rather last minute decision so I’m currently in the throes of organising things for the expo, but I am looking forward to the opportunity it provides.

The event is free if you pre-register so please do come along and say hello!

Software projects in the new year

Looking on to this new year, it seems it will be a period of change and uncertainty for me as well as ambition and opportunities.


My university project is developing nicely, to the point I have a prototype demo and am in the early stages of marketing aspects of it as a commercial software product.  From the initial response, it seems there are various options I could choose in terms of turning the project into a commercial venture. While my ambition is to mould the software into a useful product based on a businesses needs and sell it to them, if I’m unlucky in finding enough direct support I will explore other options. I’m keen to bring logic programming to the enterprise application table and for people to realise the potential of this idea.


My foray into the world of mobile application development has proved a mixed bag. It is exciting in terms of innovation opportunities but I don’t believe its commercially viable currently. Mobile apps, much like social-network style web apps, only really make good money in a minority of cases. Being in the right place in the right time and also very lucky is the name of the game. Nevertheless, a profit no matter how small should not be downplayed.

Currently my earnings from my three Android apps are of a scale that is enough to pay my web hosting. While that’s certainly not a lot of money, it is at least an alternative to incorporating advertising into this blog which I have resisted so far due to the intrusion on user experience that web ads cause. If I have satisfied a few people with my fairly simple mobile apps instead, I figure that’s a somewhat more satisfying way to pay for the ability to ramble on and publish it to the world, amongst other more useful material!

Pushing forward

Its easy to get demotivated if people aren’t beating down your door wanting to know about something you’re doing that you think is a great project. However the truth is I have a lot of encouraging things to be thankful for. Not least of all I feel confident I’ll have work of some sort when I graduate, which in at the moment counts for a lot.

Continuing to believe in and develop something has helped me to also develop personally in terms of my skills in expressing and presenting material, and in a loose sense (at the risk of sounding non-technical) improve my soft skills in business project management.

I hope in the near future to bring exciting news about further developments in my project work.

Programming… its really not that scary

It was only until recently that, when taking a step back from what I have been working on, I realised how dramatically my attitude towards programming has changed.

Four years ago I started out on a journey that transformed my anxieties about programming, something that now forms an integral part of my career choice. At that time, programming was something I knew a bit about, computers were something I knew a lot about. But I still had a lot of apprehension about whether I could gain an appreciation and detailed understanding of both.

Through a period of (at times) excellent academic tuition,  invaluable industry experience and sheer hard work, my worries about tackling technical problems slowly eroded, and my confidence in my ability has soared and I’m not ashamed to say it!

Now there’s phrases there like ‘academia’ and ‘hard work’ that people have extremely varied perceptions about. Probably some of what you think about those things is true, but a lot of it probably isn’t. By ‘hard work’ I don’t mean work that is really difficult to do, I mean a large volume of work that requires perseverance. I’m going to go out on a limb here and say… if you’re going to be a programmer, the number one attribute that can assist you is not intelligence, but perseverance. I don’t have an extremely high IQ, I don’t consider myself naturally academic, and I will never solve any of big problems facing humanity. However my academic achievements in terms the degree I am studying for, and practical achievements in terms of good quality software I have developed (and will continue to) can at the very least provide a factual basis for me to say, without fear of arrogance, I can program.

The more you practice, learn and progress the less impervious technical challenges will seem to you. This is incredibly liberating. If you’re anything like me this will mean the following changes will occur:

  • When you see a screen chock-full of code, you start to make sense of it by examining the structure instead of being frightened away at the first sight of it. Even if it’s written in a language you don’t know.
  • You’ll be much more inclined to dive straight in and alter it.
  • You start formatting things so that you can see more code on the screen at once, instead of leaving excessive amounts of white space
  • You’ll know when you need to step back from what you’re doing and make some notes and diagrams to better develop you’re ideas.
  • You’ll know at which point you should ask for help or the opinions of others (and where to go for the assistance depending on the scenario)

So my point really is in the title of this post. Am I selling programming short? I don’t think so because there’s many facets to it and I’m not saying its all easy and plain sailing. But when you’re told programming is not that scary enough times you really start to believe it, and for me that’s one become one of my main beliefs and as a result motivated me to learn so much in so little time.

Student protests – why violence doesn’t help anyone

It seems there is a sub-culture that increasingly rears its head whenever protests, whether they be about student fees, the economy or war, are carried out in London. This sub-culture seems largely anarchistic in its behaviour. Whether this is a sub set of the protesters, a separate group or a mixture of the two is difficult to say. However it is suffice to say it is their intention to  at the very least cause damage to property through violent and aggressive behaviour.

This behaviour in its own right is intrinsically idiotic, but it is also harmful to the protest cause for a number of reasons:

  • The protest group are associated with violence, therefore undermining their power to effect the reform they desire in a peaceful manner
  • The relationship between the police and protest groups becomes increasingly strained. In order to stage a large protest in a city, the protesters must have cooperation from the police and been given the go ahead. Without this cooperation, protests would not only be disruptive but extremely dangerous regardless of how peaceful the protest is to be. The police are only human and can and will be worn down by repeated aggression and offensive behaviour. If they refuse to allow a protest to go ahead or they decide an active protest is putting the public at risk it is game over.
  • Vulnerable people may be protesting such as those who are disabled. Any aggression could be more dangerous to them and they are likely to not protest in the future.
  • The protesters will become alienated to anyone they are trying to reach out to for support for their cause.

All of these points should be fairly obvious, however those responsible are clearly short-sighted in their behaviour.

More specifically lets move on to the area of student fees. I agree very strongly that with living costs rising due to the economic landscape a raise in tuition fees is not good for the education of young people. However if it is the students that are protesting in a violent manner I think they may need to have a real think about what they have got to be angry about compared to how others will be affected by the economy and political decisions such as the spending cuts:

  1. As young people, we have the whole of our lives ahead of us. We are most likely able to physically and mentally cope with the demands of a full time job. With luck we will stay this way for many years to come.
  2. If you’re a student and you’ve already started paying tuition fees, what’s the point in walking out of university as a protest? You’re already paying for it, and at a rate at which future generations may not be so lucky to get. If you’re genuinely protesting for the benefit of future generations, good on you. But how about doing something more productive than walking out of uni or smashing up some stuff? If you believe in the cause then send hundreds of letters and emails out to MPs and councillors. Get in touch with influential businesses that need good graduates, get them on board. Actually do something that is productive!
  3. If you are one of the unlucky ones that would have to pay increased fees and you feel you would be unable to afford to go to university then don’t. If you’re intellectually capable of getting into a decent course at a decent university, you’re intellectually capable of being relatively successful without a degree, particularly if you’re focused on what you want to be successful in. Plenty of graduates dither about after university, some of the more wealthy ones can afford to do unpaid internships or just go without a job for months. Who do you think after a recession an employer is going to go for? Someone who’s proven themselves to be reliable, experienced and skilled, or someone who theoretically very good and ‘has potential’?
  4. Don’t forget the rest of the world. Yes, times can be hard for a lot of people, not just young people considering higher education. Remember that while you may be irritated because your opportunities aren’t as great as they could be, people with a mortgage and children are being made redundant.

Maybe consider some of these points. I’m not advocating dumbing down your political views, just simply expressing them differently and getting on with life. A time may come when you can effect change, particularly if you’ve worked hard in a peaceful manner to bring it about, but until then no amount of aggression is going to be useful. And remember you’re not the only one with a reason to be pissed off… just be thankful you’re not as pissed off as the next person (its a glass half full kind of thing)

LaTeX woes…

So a quick aside that might be interesting to anyone that uses LaTeX to produce their articles / documents.

I do believe it can be a great tool for producing excellently formatted documents and can, in some circumstances, make the whole process more efficient.

However its usage in academic environments is largely reliant on being provided with an appropriate template style/layout. And most generally the whole point of this is to enforce standardisation across documents produced. Well I’ve counted at least 4 different referencing packages being advocated for use depending on the template we have been provided with (which yes, also differ).  This is, to put it bluntly, a waste of time. Downloading and figuring out the quirks of a different referencing package for each individual report you have to write is somewhat time consuming.

I don’t want to ramble on about it too much because it would be hypocritical to claim some students like myself are extremely busy and then waste as much time blogging about it.

I used to think LaTeX applications were a great way of writing reports, and to some extent I still do, I just wish there was more standardisation enforced on the whole thing amongst universities that use it. I also feel I can sympathise with so many others that have mentioned to me how frustrating they find formatting assignment reports using LaTeX can be.

The Android Market is changing…

If you’re an Android developer with apps already on the Market, you’re probably already aware that changes are afoot in the Market. Indeed some changes have already been made to add new image and video resources for apps on the Market. Pretty soon the developer console is going to be ‘read-only’ for several hours while even more changes are being made.

While I’m not holding my breath that this will revolutionise mobile app delivery in general, it is brilliant news for all Android devs out there. There have been some concerns in the developer community about the Android Market and hopefully at least some of these will be resolved with the new changes.

If you’re a developer this means you may just have to adjust to the new upload requirements and dust off your apps already on the Market to update them with the required resources. This is no big deal though, and you never know good apps may well find their target audience more effectively very soon.

Color / Colour

By the way – to any folks from the UK that think I’ve misspelt colour in Color Scheme Magic, it only applies to the name of the app. You may be relieved to know that the app is localised so all instances of the word colour are spelt correctly on your mobile device depending on whether you’re from the UK or the US.

I did consider bringing out a ‘Colour Scheme Magic’ version with the app name also changed but this seemed somewhat excessive! I am still open to the idea if enough people want it though…

Color Scheme Magic – Android colour scheme generator

I’m trying to get a bit more exposure for Color Scheme Magic as I think its a fairly useful app and there’s a lot I could do with it if I found there was a market.

As such I thought I’d blog about it again with a bit more info and a few new screenshots for you.

Color Scheme Magic can help you find matching colours on your mobile device so you can choose appropriate colours for things when you’re out and about. Potential applications include:

  • Graphic / visual design – swift colour matching and prototyping
  • Decorating –  finding matching paint colours for paint and furniture
  • Fashion – choosing clothes to wear to make a matching outfit
  • Web design – creating colour schemes for web sites
  • etc…

The algorithm in the app suggests matching colours for you which should go well. I’d like to also add features in the future to randomize the colour schemes slightly so you can create unique schemes, and add a web based user colour scheme database and user feedback on other’s saved schemes.

Here’s the app running:

Colour Scheme Magic Screenshot

And here’s a sample email that you can send containing your colour scheme by pressing Menu –> Email colour scheme:

Color Scheme Magic Sample Email

Doesn’t that look nice if I may say so myself?

Taking stock…

As the year is progressing rather rapidly towards its inevitable end, I feel now is an appropriate time before the end of year revelry begins to take a look what’s been going on. Needless to say this will be a delightfully personal view…

My life

I’ve had a somewhat varied lifestyle this year, as is the way of student life. Last Christmas seems not so long ago when the weather was crazy, and I was working back in my home town with a continuing and productive work arrangement at a software development company.

In the past year there have been house moves, weddings and graduations of friends and family, making for a hectic but enjoyable social time.

In addition to this I’ve had exams, worked over the summer and am well and truly stuck into my final year of university. I’m also starting out new ventures developing Android apps for mobile devices and promoting a major project I’m working on which I hope will have a successful commercial future.

It goes without saying that at times this year has been stressful. Its also been paradoxically both profitable and costly (in terms of money and time). Still on balance, its all good, as they say.


Looking at the wider view on the world this year: In the UK there’s been big political changes, namely in the form of a new government, a tighter budget and spending cuts. This has already and will continue to impact everyone in this country. The long term effects remain to be seen, and as I’m not an expert I can’t really talk in depth about it. As 2012 draws closer the London Olympics loom like a very lavish party someone agreed to throw when they had one too many. In the cold light of day one is left wondering whether an ostentatious display (which may or may not stimulate the economy) is more worthy of funding than the NHS or the education of future generations…


Smarter mobile devices have exploded onto the market in a big way recently, and there are more offerings in the form of tablet devices to come. This has opened up new possibilities for users and developers alike.

End-user centric apps are the name of the game on both mobile devices and the web in terms of buzz generated. While it brings many new opportunities, the increasing popularity of homebrew software start-ups tends to dilute the market due the average quality of such end-user software becoming diminished (such as on the Android Market). People are also still looking out for the next big thing in terms of social networking.

What worries me about rapid breeding of start-ups and focus on end-user software is whether it really boosts the economy or not. Advertising based revenue can be very profitable, but largely only for the real big shot hosts – Google and Facebook being prime examples. The middle men in terms of content providers and those placing their adverts with schemes like Adwords / Adsense, don’t necessarily get much of the benefit passed on to them. All this hype in areas such as these leaves me wondering whether there will in the near future be a lack of software developers who build software that actually does stuff. I’m talking about applications such as those that make business-to-business transactions possible and automate business processes.

And beyond

Well there’s a slice of stuff that’s been rattling around in my brain for a little while.

Next year for me is crunch time in terms of longer term employment in whatever form I may find it. With any luck soon life will be a bit more settled. All that remains to be said is that this time next year rodders… we’ll be millionaires!

Color Scheme Magic for Android released

I’ve just released a new app on the Android Market – it’s called Color Scheme Magic and helps you find matching colours and colour schemes.

Use the sliders to pick a colour and the app will present you with some suggestions for matching colours. When you’re done you can email the colours to yourself or anyone you like by pressing  ’menu –> email the colour scheme’. The email includes samples of each of the colours as well as the HEX and RGB colour codes so you can recreate the scheme wherever you like.

I thought it would be a useful feature to have when you’re out and about -> you can match a colour you see and find other colours that go with it. There’s loads of scenarios I can think of that it would be useful and also a whole bunch of features I’d quite like to introduce to the app if it is successful.

Viewing XML files from .apk archives

Unfortunately files stored in the .apk archives of android application packages are in binary. This is a problem for those people (I know there’s at least a few out there) that are trying to read the XML files in these app archives. My XML Viewer app can’t convert these back into ordinary text which is why if you try to open an XML file out of an apk with it, it will give an error trying to parse it.

For now a solution is to extract the XML files using an archive utility and then using a tool such as AXMLPrinter2 to convert the files back to ordinary text. You can then read them using XML viewer.

I know this isn’t ideal but at the moment there’s not enough support for this feature to integrate it into the app (it would require a lot of testing).

There is a good reason for all this – you are not really supposed to reverse engineer apk files. Google themselves provide a tool for doing so, but they state quite clearly that this is not for piracy purposes, only for examining apks for which you are licensed to do so. This makes me even less inclined to build such a feature into my app.

I think the best approach of all if you’re looking to examine an XML file from an Android application is to find the source online if it is an open source app, which you can of course do on your Android device and use XML Viewer to view the files. If its not open source then its questionable as to whether you should really be trying to do this in the first place.

Android developers want your feedback!

This is a quick call out there to all Android Market users who download apps: If you cancel your order or uninstall the app for some reason – please if you have the time let us know why via email!

You can do this through email addresses provided in the Android Market app, but also most developers have dedicated email addresses easy to find on their own websites.

Recently I have had a mixture of unhelpful app cancellations with no feedback and also some particularly useful feedback. Most developers are very receptive to constructive criticism and bug reports – it helps us improve our apps which increases our reputation and eventually ultimately our user base.

You can influence the quality of Android apps on the Market by providing useful feedback to developers. We will be very thankful that you do!

The killer app is not a business model

There is an enormous buzz out there at the moment regarding high-tech startups. There is also a particularly large proportion of these startups that focus on developing a ‘killer’ web or mobile application. The notion of the killer app is simple: Make something as successful in terms of user base as Facebook.

There is a real danger here, that people actually believe that such a thing becomes so successful due to an amazing technical ability or foresight into the psyche of a huge target audience. The reality is that chance has a huge part to play in such a venture becoming the next big thing.

The antidote to this kind of misplaced ambition (note I call it misplaced but the ambition itself is an admirable thing), I believe is to ground oneself in the basic principles of business if one hopes to make any money. And that means having a strong business model to follow. This means thinking about finding a reliable way to make money from your ‘product’ or service, before you begin to provide it.

This kind of back-to-basics business thinking is something the world economy could do with more of right now. I personally believe in the simple idea that money works when it is exchanged for a party providing another with a product or service which is as effective as possible proportional to the money spent on it. Unfortunately this only relates to a subset of all the business carried out in the world today: I’m going to shoot myself in the foot here and say – people invest too far in advance with uncertainty as to whether, as they love to say in the business world, the end result will add real value or not.

Put simply: an app needs a good business model to succeed monetarily, as does everything else.

XML Viewer for Android update – version 1.2

I’ve made a few changes to the XML Viewer app to try and and deal more effectively with errors parsing the XML, so once the error is displayed there is the button to process as a snippet of XML. So any XML data without the header or a root element should then display as long as the tags match up. Obviously if the XML is too poorly formed it will still not be able to give the visual representation but you can still view the raw data.

Additionally, and very usefully there is now the feature to paste XML in from the clipboard – simply press the menu button when in XML Viewer and press ‘Paste XML’.

Problem with Google’s ‘Instant’ feature

Real quick one:

So you’re searching for something in Google, typing away and all of a sudden you see a page flash up which is exactly what you want, but you’ve carried on typing. You instinctively try to hit the back button to go back to that search but @#~! you can’t because it takes you all the way back to the last time you properly searched (hit enter).

I quite like the feature but after this happens a few times, it really makes you inclined to turn it off, to say the least.