August 28, 2010

Factories, builders and singletons in standalone applications

When I started development, desktop applications were my only target and source of pain. I spent several
hours, days, months making things work. When I moved to web-enterprise development, a lot of frameworks save me a lot of time, things like Hibernate, Seam, JMS, Guice.

But when I tried to go back to desktop applications, things hadn't changed very much, I still needed to do a lot of work. Then I started emulating some of the best features of Enterprise frameworks for desktop application development.

One common problem I've been facing to, it's related to this components:
  • Factories: Delegate object creation and decouple components.
  • Builders: Construct complex components from different parts.
  • Singletos: Let's face it, in standalone applications are not that bad.
I've created a so called 'BaseFactory' component with a Guice-like approach to provide some of the previous features, here it is:

August 22, 2010

ArchLinux deception

Last weekend I decided to give ArchLinux a chance, I only read good articles about it and I thought it would be nice to get out of Slackware world.

I will divide my experiences in a few sections:
  1. Installation
    • This part was really strange for me, it supposed to be easier than Slackware ncurses wizards. It's not, it's even worse. 
    • I don't know if is just me, but I the default installation doesn't have anything, no media support, not extra-fs support, nothing. I don't know why ArchLinux community declares that it's painless than Slackware.
  2. Configuration
    • A good point here, configuration of mirrors and the system in general is pretty straightforward, very simple configuration with a lot of comments.  
  3. Package management
    • Maybe Pacman is its best feature, it's even better(IMHO) than APT.
  4. Usability
    • For me, it's not usable at all, I spent 2 hours to get a minimum XFCE desktop working. And don't make me talk about a work environment, it will take days!. I don't really get the idea of having such a basic environment, I don't want to install everything from scratch. But that's just me, maybe there's some other people who like to waste their time, good for them.
  5. Conclusion
    • In general, it's not better than Ubuntu or Slackware, installation and configuration tasks are not hard, but can be simplified. Meanwhile, I will stay with my Slackware desktop for another year.