Archive for January, 2012

  1. Going back to Java applets for upload

    This is something that I didn’t think that I would be writing in 2012 – we are switching to a Java based applet for our uploader.

    The problem has been that browsers and their operating systems handle uploads differently. Really differently. Evening using a project like plupload, you can’t polyfill over the cracks. There are new APIs coming out (if you want to call it HTML5, not strictly true though), but to handle backwards compatibility, including IE9, there needs to be a mechanism to make it generic and the only thing is Java.

    • Flash can be ok, but there are limitations in filesize,
    • Javascript depends on the browser implementation.
    • Gears & Silverlight – not exactly something that I want to deploy.
    • Java – the cross platform way.
    • Depending on the browsers built in widgets – Not possible for large files.

    We need to transfer large files of over 2Gb, and some browsers will actually try and load the entire file into memory before transferring. Certain death of the browser on old machines.

    Java gives us chunking, it gives us a cross platform implementation, it gives us a easy testing mechanism. 2012 – roll out your applets.

    By timc3 on the
    January 25th, 2012
  2. Javascript MVC frameworks with MVC server frameworks

    Really interesting article about Javascript MVC frameworks at CodeBrief.

    Personally and for work I am totally into backbone.js. It is changing the way that I work with Javascript in my web applications for the better by bringing greater structure and organisation to my code and having a common methodology in the way that I approach server-browser communications.

    The only problem that I have is that having a MVC stack in the browser is fine, but then we have the same on the server side with Rails (ok not exactly MVC), Django, Node.js or what have you. We end up with MVCMVC or rather MCVCMV, and this is of course a pattern that causes code duplication if we are not careful.

    I might look into creating backbone.js models from Django at some point, but I am not sure that this is the correct route. Obviously the way that GWT and PyJamas work becomes more compelling. Well for me GWT is not that compelling as I don’t really want to have to work on frontend in Java, I don’t think there is the control that one needs over the presentation and I can’t stand Eclipse/NetBeans/xxxx IDE’s as they are slow and cumbersome.

    Regarding the Codebrief article ember.js came out on top, and I can see the negatives of backbone.js in its somewhat boilerplate approach though I think this can be minimised somewhat.

    Personally I think my goals going forward for Javascript is:

    1. Find a decent testing enviroment that I am happy with
    2. Loading of modules should be optional, and I need to work to convert my existing application to load intelligently our backbone.js models and views
    3. Greater reuse or automatic generation of code

    I am intending to write about all of this on this blog in the near future as I come up with more conclusions.

    By timc3 on the
    January 21st, 2012
  3. The new web stack

    There is a really interesting article over on Ilya Grigorik’s blog titled . Be sure to read the comments if you are interested in how AOL built a similar system many moons ago.

    I have been thinking about next generation web stacks, with proper (M)VC in the browser, communication with server using SPDY / WebSockets / SSE or similar with SSL, and then the topology of the stack in the background being event driven and that article has some really nice points. Kinda interested in playing with 0MQ now and perhaps hooking it up to Go, Erlang or just plain old Gevent.

    Probably wouldn’t use a NoSQL backend because there is little reason most of the time.

    The hackernews article is here: http://news.ycombinator.com/item?id=3481140

    Damn I feel old fashioned having this blog on Apache | PHP | MySQL. At least my work environment is Nginx | Gunicorn | Python | Postgresql

    By timc3 on the
    January 19th, 2012
  4. New year, new workflow improvements

    So another new year has started but I continue to improve and refine my workflow and tooling.

    Firstly git. The more I learn with git, the more I like it, and the more I get into it. I like the fact that I don’t need any other tool, if I was using Mercurial I would still have to use Git because of the amount of excellent code being published into GitHub. For example “git whatchanged” or however.

    ZSH – I think its maybe because I invested the effort to configure it, put together my own theme but I am getting lots of improvements out of this.

    Dotfiles in GitHub. I have more than one machine nowdays, in fact I generally work on 6 machines (Laptop, Virtual Ubuntu on Laptop, General purpose SSH server, home server, home OS X box and a work VMWare image), so having generic dotfiles with my configuration, ZSH configuration, Vim config and more really helps.

    Working with django, multiple branches, I have switched pretty much fully to virtualenv and virtualenvwrapper. I now have one command for switching, with scripts that can move my config files etc.

    SublimeText2 is pretty much my editor of choice on GUI with Vim on the server.

    iterm2 for terminal on OSX. TMux for remote servers, so if I am using something more dumb than iTerm2 I still have multiple panes. This together with trying to get more and more keyboard shortcuts (even in Apple Mail), and less mouse usage is pretty damn good.

    At some point I am going to start blogging more about other bits and pieces here I think, and move a more personal blog somewhere else. Either more in Facebook or into GooglePlus. This will all be linked together, as I have many separate profiles all over the place now.

    By timc3 on the
    January 13th, 2012