Drupal productivity - savetofile module saves time and aggravation

As a follow up to a previous article comes an even more elegant solution than the 3 little lines of code.

The spectacularly awesome savetofile.module lets developers:

1. Exchange the Drupal submission UI for their favorite IDE/text-editor:
Simply click a button and via an ajax call, the contents of your node/block/whatever is auto-injected into a file (with the name of your choice) and all that is left in the node/block/whatever is a one line function call which will load the contents of the file at runtime. So at this point you can choose to never look at the editing page for that item again and instead simply edit the file which was created to affect the item. This can be a massive time saver as well as put all your favorite tools at your disposal.

2. Get code out of the database and into version control and make it searchable (from the desktop):
Ideally all that would be in a site's database is text-only content (e.g., no html/php). Having code in there is a nightmare in-general for editing reasons - but even worse - what happens 9 months later when you forget how you made that little widgety-thing in the first place? Is it a block, is it a node, is it in a theme file? Who knows!?

With savetofile that's less of a problem because now that node/block/whatever content can be version controlled and/or searched for with your favorite desktop tools since it's not in the database anymore.

3. Reverse all of the above with one simple click
Want to develop using the file method but want the contents of the file back in your node/block/whatever when the time comes to go live? Press one button on the edit page of the item and another ajax call will replace the savetofile code with the contents of the referenced file and all is back to 'normal'.

Personally, I won't be building a site without this module from here on out! :-)

18 April, 2008

Comments

Great work, keep it up. I love returning back to this site and reading the quality content you always have on offer.