User-Sortable Code Blocks

I’d like to allow for something like port lets, where there can be a list of user-sortable ‘blocks,’ but these blocks would be used to generate configuration files that would be downloadable later.

The user should be able to add, remove, or re-organize blocks. When the user logs in, the blocks need to be there in the same order as when they left.

Would portlets be the way to go here, or are they just for menus, etc? Is there something else that I can use to accomplish this?