Django + mongodb + jquery ui = nice place to develop web apps

Working in the software industry, the term ‘innovation’ is used on a daily basis. This one word promises so much but how do you foster innovation? This is a huge challenge, one which will most probably not be solved by any one piece of software, but software could be used to facilitate accumulation and voting of ideas.

I searched online for something that would fit but as often happens I could not find anything that met all my requirements. What now? Well, why don’t I write my own software? I wanted it to be available online, so I decided to write a web application.

I have never written a web app before, so my first step was to find out how much I could get for free and not write myself, seems like a logical step. My first port of call was the Google App Engine and GWT and since my  two languages of choice are Java and Python it seemed like a perfect match. For a number of reasons this did not work out, an app written for GAE is not super easily ported to another app server or cloud, also my personal opinion is that GWT is not quite there yet.

After a few more failed attempts with different “out of the box solutions” I decided to give Django a shot and I chose mongodb as the database, for no other reason than I wanted to experiment with different databases. Immediately whilst googling these two technologies I discovered mongoengine as a method of marrying the two and after a few minutes I was creating objects and storing them in mongo with ease.

So I set about creating some requirements for an idea submission and voting tool, but as I implemented these requirements grew, thankfully making changes with Django is easy. Once I had the basics up and running, I realised I needed to improve the user interface, since Django plays nice with almost anything, I went with JqueryUI.

Overall the three technologies played nice with each other, Django makes it easy to get a web application running quickly and without many requirements, mongodb is a joy to use when used with mongoengine and JqueryUI is very simple to use as long as you don’t stray too much from their example code.

One problem I did have was when I wanted to deploy to a ‘production’ environment, the advice I read was to use modwsgi, so I tried several guides I found online but none worked. In the end it was a combination of information from these guides that allowed me to deploy on an Ubuntu distro using apache and modwsgi.

I would have no fear in recommending this technology combo to anyone who wants to rapidly put together a web application with no fuss.

To have a look at my efforts, browse to http://server.jameswhite.ie

p.s. the project is opensource and can be found here: https://github.com/jamesmwhite/innuvate

7 comments so far, add yours

Role Based Access

On reading the white paper “Beyond Roles: A Practical Approach to Enterprise User Provisioning”, I was interested to read about the potential problems and overhead of Role Based Access (RBA) in certain systems. RBA works well in Single Systems where the number of roles is manageable and the number of combinations of user rights tends to be small. It also works well in systems where a large number of users have the exact same privilege requirements, e.g. bank tellers, flight attendants etc.

Request-Based User Administration strategy

Scaleability of roles and privileges becomes very tedious, time consuming and expensive for larger companies when using RBA, this is because of the large number of role definitions and slight variances between roles requiring multiple role definitions with only slight differences. The maintenance of these roles also requires a lot of time and effort on a continuous basis.

A possible solution to this is by empowering both managers to grant permissions to people working for them, and users to request permissions they need from their managers. This solution is scaleable but has some problems, namely users accumulating privileges, slow approval of requests and unreliable access termination. To solve the accumulation and termination of privilege problems, regular audits would need to be carried out by managers on their staff members.

 

Reference: http://www.idsynch.com/docs/beyond-roles.html

Leave the first comment

iPad 2

The iPad 2 was released, everybody go crazy!

Now for reality, the iPad 2 is a nice piece of hardware, for people who do not already have an iPad or other tablet. Hopefully it will learn from any mistakes the original iPad had and so become a better all round tablet.

As an owner of an original iPad, it does not appeal to me. Sure its lighter, slighter and has a front and rear facing camera, but none of this would convince me to sell my iPad and put a further 100-200 euros towards an iPad 2. Would I sell it and buy a different tablet? Possibly, the exciting thing about the tablet market now is the number of companies with upcoming hardware offerings. Android will provide the OS for most of these tablets but the variety of hardware will be the main attraction.

There is a huge number of directions tablets can go in now, the budget tablets will just be cheap copies of existing solutions, the premium tablets are pushing boundaries however, maybe in an attempt to out-spec the iPad or as in the case of Notion Ink’s Adam, to genuinely offer new exciting tablet combinations.

As per usual, I cant wait to see what Apple come back with to maintain their dominance.

Leave the first comment

MacBook Lifecycle

I am on my second MacBook Pro now, my first one was pretty much the same as this one, but without the long life battery, sd card reader and back-lit keyboard. Why did I bother upgrading then? Well the reason I upgraded was entirely due to the cost, it cost me nothing. When initially buying a Mac, the cost seems crazy, 2-3 times more expensive than competitors laptops of similar specs. But this initial cost brings with it excellent resale value, couple this to Apple’s weird pricing structure between the US and Ireland and a Mac Lifecycle is born.

It goes something like this:

1. Buy always in the US (if your work brings you there or you holiday there periodically)
2. Sell always in Ireland (or UK or whatever)
3. Always sell and buy immediately as new product is released.

This lifecycle works as long as there are people who dont want to splash out on new Macbooks and Apple retain their geographic price differences.

I will be continuing this lifecycle next week with my new i5 MacBook pro 🙂

Leave the first comment

2011, all out mobile platform war

The main contenders:
Android, iOS, Windows Phone 7…

For the first time, 3 viable options, all with their own strengths, weaknesses, lovers and haters. Can they all exist in harmony, blissfully cohabiting the ever growing mobile platform market? For a period of time this may well be possible, but developing apps and media content for 3 platforms will put strain on developers and add pressure to picking one or two of the platforms to support, at least at first.

What are going to be the deciding factors?

The OS:
Out of the box, all 3 will offer the usual apps: phone, messaging, email, camera, gallery, browser, facebook etc etc etc. How to get the edge here? UI, its all about the UI. How slick can each OS be? Android will be pushing further integration with social media, ever improving the experience with each release. iOS will as usual be a guarded secret, but nonetheless will inevitably impress and woo the fans. Windows phone is a very fresh approach and in time will start to “feel right”, something it is failing to do at the moment, something android is only overcoming in Froyo and Gingerbread.

The Apps:
Android Market, App Store and Windows phone marketplace hub (you think MS got the name long enough? 😀 ) are the locations for the biggest battles in this war. The app store is already well established and the clear dominant leader, android market place, more appealing to developers and less hoops to jump through, but only finding its feet at the latter part of 2010 in terms of paid app sales. The windows phone marketplace will be the one to watch, will developers embrace it as strongly as they embrace the android market? Will Nokia unleash a horde of developers, now at a loose end since the announcement of the partnership between Redmond and Finland (Redfin?) Whatever happens here, gaming is going to become a massive part of it, Onlive on the new HTC tablet really shakes things up!

The Hardware:
Can anyone knock Apple off the top spot in terms of hardware design? So far all that have tried have ultimately failed, its not their fault, they see the current gen iPhone and aim to beat it, and invariable do, but mere weeks later, Apple unveil the next gen iPhone, as usual black is the new white, or vice versa, whatever the design guru’s in Apple decide as “In”. Google seem to be happy to let HTC, Sony, Samsung et al challenge each other to come up with hardware chariots to carry their OS soldier and indeed so far they do a fine job and provide excellent components as horses for this increasingly strained metaphor. Windows? well they have indeed pulled off a stroke of genius, Nokia have been building phones for what seems like forever, they do a damn fine job of it, but were always woefully bad at software, could this union be a match made in Corporate Heaven?

Judgement Day
Post iPhone 5 release, the dust will begin to settle, the damage inflicted by its predictably market changing impact may leave the competitors shaking or running back to their design teams screaming for reinforcements. Whatever happens, 2011 will be the setting for the biggest mobile platform battle ever witnessed. I wait expectantly.

Leave the first comment