Posts

Errorlytics Captures and Fixes 404 Page Not Found Errors For Drupal, Wordpress, PHP, Rails, and Java

For the past several months, I've been working on Errorlytics, a Software as a Service that captures, analyzes, and helps you fix 404 Page Not Found errors for your Drupal, Wordpress, PHP, Rails, and Java web sites and applications. The original idea came from my friends and partners at Accession Media ( SEO and Internet Marketing experts ) and New Evolutions ( web application engineers ). Errorlytics is both a small plugin installed on your web site or application, and a hosted service which captures, processes, aggregates, and fixes 404 page not found errors. If you run a site with Drupal, Wordpress, straight PHP, Ruby on Rails, or Java, then Errorlytics can help you. After installing the open source (and small) plugin, you let the hosted service begin to capture the 404 page not found errors. You can then begin to handle those errors by telling Errorlytics where you want to redirect your visitors. The next time a visitor encounters a 404, they will be transparently redirecte...

Display Javascript Confirmation When User Leaves a Web Page

Update : the original code did not work in Internet Explorer 6 or 7. This is because change events for form elements do not bubble in Internet Explorer. That is lame. In any case, the included code has been tested for Firefox 3, Internet Explorer 6 and 7. Our customer wanted to warn users that if they leave the current page with unsaved changes, those changes will be lost. The requirement is to only show an alert/confirmation when the user has changed the form but did not submit the form. However, don't forget that if the user changed the form but then clicked Submit, no confirmation or warning should be displayed (as they are saving the changes before they leave the page via the submit.) The following Javascript is one way to do it. Note that I am using both Prototype and Ext JS in this snippet. Ext.onReady(function() { Ext.namespace('Dses'); Dses.formChanged = false; $$('form.watch-for-changes').each(function(form, index) { form.getElements().each(fu...

CouchDB Ruby Libraries

This is a quick list of CouchDB Ruby libraries. Need to connect Ruby to CouchDB? Try one of these! CouchRest - hosted at GitHub, this library by Chris Anderson (jchris) , has a low level component and a high level component. RelaxDB - also hosted at GitHub, this library provides a base class that your models will extend (similar to the high level component provided by CouchRest.) RelaxDB adds pagination support as well as has_many and belongs_to relationship support. CouchObject - this library is unique because it is implemented as a module, to be included in your model class. This library also has both low level and high level components. Basic Model - from topfunky, this library was featured in the PeepCode CouchDB episode . Your model classes extend BasicModel. ActiveCouch - tries to look like ActiveRecord. Supporting a simple find method to query views. Views are defined as Ruby classes, and loaded via rake tasks. CouchFoo - attempts to replication ActiveR...

Reasons Why CouchDB Is Exciting

I've been playing with CouchDB lately, and having a good time getting out of the relational database mindset. I'm not against relational databases, but I do think the time has come to stop thinking they are the only way to store and process data. There are a few reasons why I think CouchDB is exciting. Arbitrary JSON document storage. I like this feature not so much because I'm not required to design a rigid schema, but because it implies that I can store arbitrarily complex and deeply nested data structures. This clears the way for easily storing an object graph without the pains of going through the pains of decomposing into a relational schema. Incremental view rebuilds. This is a killer feature for me, because it implies that a small change in the data does not invalidate the entire view. Keys can be complex objects. In other words, you can now use an array or hash as a key in a view. For example, a key can be [2008, 01, 12] which represents a date. N...

Multi Model Forms With Rails

Ruby on Rails still doesn't have a good story to tell with regard to multi-model forms. Multi-model forms are HTML forms that have fields from more than one model, which the user edits and submits as one. Rails should take this single collection of fields, split it up into multiple models, and create, edit, or delete as necessary. Unfortunately, this still requires quite a bit of work. I've collected a set of links that may help those that are new handle multiple models in HTML forms with Rails. None of these are the "official" answer to this complex question. However, it appears that Rails core will one day have an out-of-the-box solution to this. Read on. Ryan Bates, of Railscasts fame, has probably the best known solution to this problem. He suggests Complex Forms Part 1 , Complex Forms Part 2 , and Complex Forms Part 3 . However, as even he mentions, it doesn't work with Rails 2. Refer to these screencasts, and their sometimes useful comments, as...

Force HTTP GET for Ext JS DataGrid and Store and JsonReader

I work with ExtJS a lot, and have had great luck with it. We use the layouts, DataGrid, and most of the included widgets. One thing that has always struck me as odd is the Store (the class responsible for fetching and exposing the data) defaults to a HTTP POST when retrieving data. I think that any retrieval of data from an HTTP end point should be GET, to take advantage of caching and the simple fact that the operation is idempotent. If you want to force a HTTP GET method to be used when retrieving data with an Ext JS Store (for instance, when retrieving JSON data), here's the Javascript code: var proxy = new Ext.data.HttpProxy({ url: '/foos.json', method: 'GET' }); var store = new Ext.data.Store({ remoteSort: true, proxy: proxy, sortInfo: {field: 'id', direction:'desc'}, reader: new Ext.data.JsonReader({ fields: [{name:'id', type:'number'}, {name:"created_at", type: 'date', dateFormat: Date.patterns.XmlSc...

Blog Now Hosted At Wordpress.com, Redirects All Setup, Crossing Fingers

I moved this blog to http://blog.semergence.com which is now hosted on wordpress.com.  I just didn't feel the need to continue to host my own installation of wordpress.org, which was always out of date anyway.  Plus, everything else in my life is either rented or a service, so why not my blog? I told Apache to redirect everything from www.semergence.com that is NOT a file over to blog.semergence.com.  Here's how I did it: RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ http://blog.semergence.com%{REQUEST_URI} [R=permanent,QSA,L] Hopefully your feed reader respects the redirects! And thanks for following!