Introducing the User Script Console

The Alfresco JavaScript Console is really popular among Alfresco administrators and developers to easy automate tasks around Alfresco. This leads to more and more requests from users to have their problems fixed and tasks automated and keeps developers and administrators from more important tasks.

With the new User Script Console extension for Alfresco Share the users finally can access the powerful JavaScript API directly by themselves without needing a specialist. It integrates as a page in a Share site:

Of cause it can not be expected of end users to know JavaScript or the Alfresco APIs right away. That is why the User Script Console slowly introduces the users to the capabilities of the API using a Gamification approach. Users start out as novices and can gain experience (XP) while using the JavaScript API.

User “Experience”

API access gradually changes with increased experience:

  • 0 XP = No Alfresco API access
  • 10 XP = Read properties and permissions, only document root object
  • 1000 XP = Add comments, add Tags to any node
  • 5000 XP = Write properties and add tags, Site API, full ScriptNode api
  • 10000 XP = Groups API (Add/Remove people from sites)
  • 20000 XP = Full Alfresco Javascript API
  • 50000 XP = runas admin, access beans using Packages.java

A new user starting out as a novice must first write a syntactically correct JavaScript using given examples. He receives 1 XP for each successful transaction and will soon gain access to some parts of the Alfreco API (XP of 10 or more). Commands above his experience level are not available:

Examples

To help users find their way around, there are examples in the “Examples” menu that are adjusted to the users experience level. It starts out with a list of simple JavaScript examples for “for”-loops and “if”-clauses.

Badges

Additionally users can earn badges for special achievements (each earns 500 XP):

  • Unlocker: Unlocked more than 10 documents that were locked by the Sharepoint API.
  • Tagmaster: Added 100 different tags to documents
  • Ninja: more than 10 “hidden” property changes with behaviourfilter.disableBehaviour()
  • Shapeshifter: More than 100 calls of the transformDocument/transformImage
  • JsGuru: Run 10 consecutive scripts that all JsLint without any warnings
  • Loadtester: Your last 10 scripts have all run longer than 30s
  • MrClean: Purge the archive store (nodeArchiveService)
  • Reporter: Generation of more than 10000 lines of print output
  • Bouncer: Removed at least 100 people from groups/sites
  • Hacker: Usage of Packages.java to access Spring beans directly

The new User Script Console will help to empower the savvy user to automate Alfresco in an unprecedented way and lets administrators focus on more important tasks like backup and restore of the Alfresco repository.

Available today for Alfresco 4.1.

Windows freeware for commercial use

When developing software at work you might be restricted to what software you can install and use. You might even work at a client’s computer where you don’t want to risk using trial versions for months and violate licenses. This is where Open Source software really pays off, it’s just free.
Unfortunately, when searching for free software you often find shareware applications or even worse, freeware for personal use only. That’s why I started compiling the following list that contains great freeware and open source apps that allow commercial use. (A link here is no guaranty that commercial use is granted. Licenses can change or I could have made a mistake – check the licenses and EULAs!)

Browser / Web

Mail-Client

FTP-Client

Text and XML-Editors

Diagnostics / System Utils

Archiver

Backup

Media Player

File-Manager

  • FreeCommander Windows filemanager similar to Total Commander
  • XPlorer basically a windows explorer with tabs

CD/DVD Recording

Terminal / SSH / Remote-Control

Messaging

Web-Development

Linux Tools / XWindows

  • Cygwin – a complete linux like environment, including shell, services and X.

Version Control

  • Subversion version control system, sucessor to CVS
  • TortoiseSVN windows client for subversion as explorer integration

Imaging / Graphics

Visualization / UML

  • ArgoUML Java Tool to create UML diagrams
  • StarUML Windows UML ß MDD Tool
  • FreeMind a free mind mapping software like Mindjet’s Mindmanager

Office

Development Environments

  • Visual Studio Express Express Editions of MS Visual C++, C#, VB and SQL Server
  • PHP Designer 2006 PHP Development Environment (eula says personal use, but several forum posts say commercial use granted)

*Missing*

  • good image viewer with thumbnail view
  • a complete burning appliction (like Nero or K3B)
 
I realize that this list is far from complete – I basically started with apps I like to use or think they might be useful for me. Especially if you look for development tools there are a lot more useful apps out there – I deliberately neglected the whole field of java development tools, since most of them are already commercially usable.
 
This list will be updated whenever I find new apps – I would appreciate any suggestions you might have for additions to this list.

Search engine friendly urls without mod_rewrite

When I set up my wordpress blog yesterday I wanted to use search engine friendly URLs which wordpress usually supports by the use of Apache’s mod_rewrite. Unfortunately my hoster doesn’t support .htaccess files in the small web package I currently purchased, which I found rather disappointing. Generally, there might by a couple of reasons why the default way of rewriting URLs might not work: Your hoster disabled .htaccess files (AllowOverride None), mod_rewrite is not loaded oder not available on the server or your site runs on IIS which naturally doesn’t Apache’s rewriting. Luckily there are two ways around this limitation that are supported by WordPress out of the box.

The first way that is suggested in the Using Permalinks Section of the WordPress Codex is by using URLs like index.php/some/path/. All you have to do is specifing the custom permalink structure in Options>Permalinks. Apparently this type of permalinks without the use of mod_rewrite worked in WordPress at least since v1.2 but for me, the ugly index.php/ path isn’t something I want to have permanently in my URLs. I favour the following sollution.

You can set your index.php of WordPress as the 404 error page for your website. This has the effect that WordPress is called for all your virtual URLs which do not exisit as actual files on the webserver. I’ve tested this with version 2.0 and so far it works pretty well. There may be problems with HTTP POST operations according to experiments with the textpattern weblog. If it turns out to work properly it should be added to the WordPress documentation since it produces the same clean URLs as mod_rewrite with the bitter aftertaste of being an ugly hack though.

Internally both methods rely on index.php to analyze the URL. Actually in WordPress v2.0 this has become the default way of URL rewriting any way. If you’d have a look at a .htaccess file of a WordPress v1.5 installation you’ll see about 30 rules for all the different URLs (search/, category/, author/, …). In WordPress v2.0 the .htaccess looks much cleaner: all requests are forwarded to index.php – pretty much the same way a redirection of the 404 error page would do it.