Posts

subscribe via RSS

  • Missing Link: Update Contact Image in Mac's Address Book using Gravatar

    It's that simple. just download the bundle, drop it to Library/Address Book Plug-Ins/ and restart Address Book. Once you click on an E-Mail address of one of your contacts, it will update the image using gravatar.com .

    Have fun.

    Update

    There is a version available for Snow Leopard now, just check out the new post.

    Continue Reading...

  • Web Development: The controller, the view, a pain, it's true.

    I'm currently heavily involved in developing a rather huge application for the web. Nowadays, there is a certain illusion that frameworks, be it the Java EE using Spring or Rails and it's friends simplify development and make it actually fun developing for the web.

    At least for me, this fun suddenly ends when it comes to controllers and their more-or-less tight integration to according views. The traditional, but still largely used, MVC-pattern worked perfect for monolithic, big pages with each one having a clearly defined function.

    Today, the world changed. AJAX is still hot shit, and using it without a) blowing up the lines of code in both the view and the controller requires either writing a lot of unreusable helper-functions or depending on templates ( or partials ), anyhow, prepared lines of view code.

    But the core idiom of AJAX, the ability to exchange single parts of a website without touching the rest of it, is and cannot be addressed efficiently using these two methods, at least not with the claim that development is fun. It's not fun ( at least not here.. again ) to include templates over and over and over again. Web development is still, tell me I'm wrong, struggling with the Presentation rather than solving complicated Model-related tasks. And there is either no one concerned or I am way to stupid to get the point.

    I'm really looking for a metalanguage describing a web-interface, with all it's bindings to data, to related controllers and a framework being able to process such a thing ( including caching and so on ), making it straightforward to develop an ajax-based interface, tailored to one's needs.

    For those of you pointing at one of the many JavaScript Frameworks, like GWT, enabling such a functionality: It's not what I mean. It's a more general, server-side processed approach, enabling slim clients and fast page processing.

    Edit: I know, editing posts is not best practice, but this small additions isn't wort another post. So I was really thinking a lot about what I wrote here, and I'm quite confident that the main point is indeed the fact the code that logically belongs to the viewer ( something that loads a list for an autocompleter ) is still around in the controller which creates a scenario we usually try to avoid using MVC.. view code in the controller. And updating the view once again requires updating the controller code, most likely at least. What is the other option? To let that simple code be created by a helper at the time it's needed. Same for Content-type switching orgies to format the output properly. I'm on it, to make coding a little more fun.

    And if I've been missing some hot new thing ( I've been playing with CouchDB, jiha ), please let me know.

    Continue Reading...

  • The two Internets. A rather frustrated summary.

    Once upon a time, some brave men fought for the freedom of communication and knowledge. They built the Internet, and all it's great applications, like the WWW, E-Mail, Instant Messaging.. bla.

    It gained public interest with porn. Nothing special. Just happened. But despite the fact the the Internet is as crowded with porn as any other media is, the people who originally designed it still kept on going. The idea was and is unique.

    Other people spent there time, developed whole new models of how to create software, collaborate in projects and communicate. Built up a whole new world.

    Well, the jerks came back. Monetizing the Web. Without understanding it. Governments want to restrict it. Without having a clue about the how and what. And still. People are there building a great web. Making it a pleasure to use everyday.

    So, despite of all the Spam, Phising and whatever is out there, next time you here someone talking about a great idea to make money there, just think of what the idea was. Certainly, it wasn't money.

    Continue Reading...

  • Implementing a Ruby-Based LDAP-Server

    Oh yes. Good question. Why would anyone want to implement a LDAP Server? Besides the fact the OpenLDAP is a pain to set up and isn't really rewarding in terms of perfomance, there are situations demanding LDAP Access to data residing in some kind of RDBMS. And that's my motivation.

    After seriously thinking about doing it all by myself, I plugged in Google to get some answers. And there is ruby-ldapserver, hosted at rubyforge. Unfortunately. the project seems pretty dead, nevertheless the Alpha 0.3.1 Version released there works fine, although without SASL support, only simple ( plain bind ) works. 

    How to use it? It's very straightforward. Download the package, see that it's in your path, and ready to rock. The package includes a few examples, showing off the beauty of the lib and ruby. That is how you implement a fully working LDAP Server ( okay, doing nothing, but works. )

    class MyLdapOperations < LDAP::Server::Operation
      
      def search(basedn, scope, deref, filter)
        puts scope
        puts basedn
        puts deref
        puts filter[1]
      end
      
      def simple_bind(version,dn,password)
        puts "Auth: #{dn} + #{password}"
        puts version
      end
      
    end
    s = LDAP::Server.new(
    	:port			=> 1234,
    	:nodelay		=> true,
    	:listen			=> 10,
    #	:ssl_key_file		=> "key.pem",
    #	:ssl_cert_file		=> "cert.pem",
    #	:ssl_on_connect		=> true,
    	:operation_class	=> MyLDAPOperations
    )
    s.run_tcpserver
    s.join
    

    You launch it, and it works. Certainly worth giving it a try, and a good piece to start if you want to get involved in the OS community.

    Continue Reading...

  • Rails Plugin: Superdumper, helps you visualize your database schema

    You know the problem. You are agile like hell. You don't bother doing complicated diagrams to show somebody what you're doing. That's okay. But sometimes, you need to show off what you've been struggling with, and if that day comes, this little rakefile can save some time.

    Simply , Unpack this file ( tar bz btw ) in your rails app's root folder and call rake db:superdumper. This will create a file called database.dot in your root folder, containing your database scheme, including associations, in the so-called "dot" format, used by the open-source GraphViz package as input. If you don't have that package, install it, via ports or apt or whatever applies to your platform. 

    In Detail what you have to do is here ( assuming you unpacked the file already.. )
     

    rake db:superdumper

    This task will automatically dump your scheme and call GraphViz, resulting in a pdf file in the root of your app with the name database.pdf. If it's not your database schema smiling at you, let me know.

    Continue Reading...

Newer Posts Older Posts