Blog Categories
Ad Space
Twitter Updates
    follow me on Twitter
    Currently Reading
    Powered by Squarespace
    Git Projects
    Friday
    10Apr

    Power CouchDB - Basic HTTP Handlers

    You may know CouchDB's mostly as a kick ass document store but you can use it's base for many great things. Thanks to the fact that CouchDB is an amazingly well written and very modular piece of technology. It is easy to extend it and add your custom code to all areas of CouchDB. If you want to use your own language for views you can add it without even touching the CouchDB code. Write your own authentication handlers connected to LDAP or even CouchDB itself in just a few lines of erlang.

    Click to read more ...

    Thursday
    15Jan

    The State of Me - Jan 2009

    Well. Just a little status update on me and my various projects for 2008.

    2008 was a good year for me and my education as a developer. I got to know Erlang at the middle of the year and by the end of the year I was almost exclusively coding in Erlang. I have also started learning some standard C for playing with Arduino. I also learned the basics of Emacs and so far I like it though I still use Textmate for many things. And I started using Git and Github. I was to begin with skeptical about it and the fact that Linus Thorvalds was a bit of a dick when talking about it didn't help. But once I tried it I found it to be very productive and combined with GitHub it's quickly revolutionizing open source development in the world.

    I became a contributor to the Nitrogen Web Framework. I have many ideas for it and hope to add many things to it. Nitrogen is at a very exciting stage as we are finding the path we want to take and can make many choices at this stage.

    Is started playing with a little project I call CouchMail. It's basically a quick ugly hack to research gluing together a mail server with Nitrogen, Cappuccino, Mochiweb and finally CouchDB for data storage. If this works out ok I may consider writing a real application from scratch from what I learn.

    I forked CouchDBX and completely rewrote the UI. I like my changes as they remove CouchDB from the desktop and you don't have to know about it until it is needed. I have most of the new code needed for CouchDB 0.9.0 ready so it should come out as soon as the new CouchDB is released.

    ErlangXcode is an attempt to make Apple's Xcode 3 IDE be a kick ass Erlang IDE. A lot of the basic syntax is there with some, like records, still to be implemented. Also a basic build system in place and compilation errors show up in-code. I had to take a bit a break from it before going nuts though. Xcode's plugin system is 100% undocumented and there is no way do debug anything. What you have to do is to make small changes, compile and then reboot Xcode. There are no errors. The code just works, quietly doesn't work or it crashes Xcode. Hopefully I will quickly have energy to deal with it again soon. I did however start a little wiki project at google code documenting the xcode plugin system.

    Finally there is a little project I started in the middle of the year called AstAssist. It's in a bit of a pause at the moment but basically it is an Erlang based system for Asterisk management. It's a complete solution for configuration, monitoring, event parsing, fastagi and so on. I have some of the basics done and hope to continue later in the year.

    Well.. That's the bullet points. Hope some or all of these will become something amazing in 2009.

    Thursday
    18Dec

    Erlang Web Development Frameworks

    Web Frameworks.

    I'm going to mention the two of the most interesting web frameworks out there. They choose a very different path and I would call both of them production ready. As they are both projects in active development you might have a problem with a new release breaking a few things.

    Nitrogen

    Nitrogen is the new kid on the scene but has quickly become my favorite framework. Unlike most frameworks it's event driven. I enjoy it even more than Rails at the moment. It's dead simple to get started in and very powerful. It's in very active development and new and cool features are added almost weekly. The last new feature added was the simplest but one of the most powerful Comet implementation out there.

    ONe of it's drawbacks is that there is no routing system in it. Paths are defined by the module names. So web_index.erl becomes /web/index or /web and web_blog_comment.erl becomes /web/blog/comment. Some might find this a bit limiting.

    There are many cool features planned and one of the most interesting is implementing Erlangs power to be a distributed web frameworks. Thus solving many of the problems of scalability that many other web frameworks have

    Pros:

    • Dead simple.
    • Nice bindings system.
    • Kick ass Comet support.
    • Interesting future ideas.

    Cons:

    • No routing at the moment.
    • A little too simple on the template side.
    • Really young so no real documentation yet.

    Erlang Web

    I have not much experience with Erlang Web but many seem to have started using it. It's and MVC framework built on OTP principles and uses many standard Erlang practices. It's template system on first view reminds me a bit of good old WebObjects. Currently it supports INETS and Yaws but not MochiWeb at the moment.

    Pros:

    • Very Flexible.
    • Powerful template language.
    • OTP Principles.

    Cons:

    • Could be simpler.
    • Needs way better documentation.

    Template Languages

    Sometimes you may just want something simpler. Just a little template engine on a custom built web server to show some dynamic data. Or for use in your own web framework. Here are 2 notable template engines.

    HERML

    HERML is an erlang implementation of the HAML markup language. It's quick and simple but remember that this skips HTML altogether so it might not be for everyone.

    ErlyDTL

    ErlyDTL is an erlang implementation of the Django Template Language. I personally found DTL to be Django's most anoying feature but as many people like it it's best to mention it.

    Friday
    12Dec

    5 Minute Blog Using Nitrogen and CouchDB

    Introduction

    Hey. Today I'm going to show you how to create a really, really simple blog in a few minutes using the Nitrogen Web Framework and the CouchDB document system. I presume you have basic erlang skills but this should be simple for anyone. I also presume you have already seen the Nitrogen Screencasts and are familiar with the basic behavior of Nitrogen.

    Click to read more ...

    Sunday
    23Nov

    My CouchDBX version

    Hey people.

    I have been playing with Jan's CouchDBX a bit and thought someone might enjoy what I did. CouchDBX is a nice little Mac OS X tool to run CouchDB without the need to set up Erlang or anything.

    There are 3 major changes that I did. First of the UI is gone and everything is now in a status bar menu. Should make for quicker access to it and also stay out of the way. There is also a new transparent log window if you need to see what is happening on the Erlang level. The third an most important change is that CouchDBX now stores it's database in ~/Documents/CouchDB. Before the database was inside the Application bundle itself and all the data disappeared every time you downloaded a new release of CouchDBX.

    I have not renamed it or anything in case Jan would like to incorporate these changes to the original code or something.

    EDIT 26. Nov: There was a serious error in my old version that made the javascript engine not run correctly. This has now been fixed and you need to redownload.

    CouchDBX Screenshot

    Fork me on GitHub