Authlogic: keeping you in the loop

I figured I would post an update keeping everyone in the loop. I created a new branch for authlogic locally and I’ve been making some changes mentioned in this post. Some of the changes I’m making are still somewhat experimental and I’m playing around with the code to see if I like the end result. Figuring out a way to make this ORM agnostic has proven difficult, simply because there is no standard. They all follow a similar pattern, but the method naming conventions and some of the feature implementations are vastly different. I’m also not sure you could even set a standard. Regardless, I do think this is an important feature since there is a lot of movement around alternative storage solutions such as MongoDB, CouchDB, etc.

Splitting out some of the authentication code into “authenticators” has worked out great so far. More importantly, its more or less a blueprint for people to extend Authlogic and provide alternate authentication solutions (openid, facebook connect, oauth, etc.).

The last major change I’ve been making is removing validations in the acts_as_authentic module. Validations add some clutter to authlogic, some might say its a necessary clutter, but I’m leaning towards leaving it out. Validation is such an easy thing to do. ActiveRecord provides very simple methods for doing this, I also feel like its gets in the way for certain edge cases. Authlogic will still provide some nice methods to make your life easier, like validating the format of an email address, the main difference being that you have to explicitly implement this validation. No validations will be automatically added. Lastly, this makes ORM abstraction a little easier.

So that’s that. I’ll keep you updated when I start to push out some code and what not. I’m probably going to label this release as v3, because of the validation changes and some of the other major changes that might break backwards compatibility.

  • Share/Save/Bookmark

5 Responses to “Authlogic: keeping you in the loop”

  1. Aleksey says:

    Awesome! Especially the validations part.

  2. Uriptical says:

    Sounds great. Making the validations explicit is a smart move.

  3. trung says:

    I love the idea of ORM agnostic.

    Don’t forget about DataMapper.

    Currently, it’s the only ORM supported by Google AppEngine. :)

  4. andy says:

    +1 for removing validations from AuthLogic

  5. yannski says:

    Any news on that front ? We’d like to use MongoMapper and authlogic together and willing to help :)