PowerShell Pipeworks does a lot more than most web languages.
The goal of Pipeworks is to be able to create web sites and services quickly, cheerfully, and nicely. The aim is to remove as many painful little parts of the process as possible.
Pipeworks provides the toolkit you'll need to write the frontend and backend of almost any application you can imagine. In other words, it helps you put it all together with PowerShell.
These tools fall into a few general categories:
One of the major differences between Pipeworks and, say, PHP, is the amount of functionality designed to help you generate HTML. Pipeworks contains many helper functions that write complex HTML for you, and it provides a Less.css template to help spruce up your site.
There are several different functions for writing HTML:
- ConvertFrom-Markdown(view source) - This converts markdown to HTML.
- New-Region(view source) - This helps you generate different types of layout containers, like menus, trees, and newspapers
- Out-HTML(view source) - This translates the PowerShell formatting engine into HTML, which lets you write custom formatters for your output. It also generates CSS3 bar and pie graphs.
- Write-Link(view source) - This simplifies writing lists of links and linking to rich media content.
There's also a few helper functions for interacting with CSS:
) - This converts Less.CSS style sheets into CSS, using dotLess
) - This translates between PowerShell hashtables and CSS style attributes
Dealing with Data
No matter what type of web site you build, storage comes into play. Pipeworks includes several functions to simplify using storage.
- Select-SQL / Update-SQL / Remove-SQL / Add-SQLTable / New-SQLDatabase / Import-StoredProcedure - These functions let you interact with SQL Server, SQL Compact, and SQLite.
- Add-AzureTable / Get-AzureTable / Remove-AzureTable /Search-AzureTable /Set-AzureTable / Update-AzureTable - These functions let you interact with Windows Azure table storage
- Get-Blob / Export-Blob / Import-Blob /Remove-Blob - These functions let you interact with Windows Azure Blob Storage
- Expand-Data / Compress-Data - These functions let you expand and compress data
- Expand-Zip / Out-Zip - These functions let you create and expand .ZIP files
- Import-PSData / Export-PSData - These functions let you import and export PowerShell data files (.psd1)
- Get-FTP / Push-FTP - These functions let you interact with FTP servers
Pipeworks also includes several handy commands for dealing with user-related storage and authentication:
- Get-Person / Confirm-Person - These functions handle user authentication and user data storage
- Add-Interaction - This function helps manage specifically tracked interactions on a user account (for instance, liking a photo)
Sweet Software Services
Nowadays, no web site is an island. Many sites and services leverage well known and trusted web services to help lighten the load. Pipeworks includes a number of functions to interact with these software services.
Every site needs a little bit of setup. These commands can help you manage your deployments and configure your machines:
- Add-Deployment/ Get-Deployment / Import-Deployment / Publish-Deployment / Push-Deployment / Remove-Deployment / Switch-TestDeployment / Wait-Deployment - This family of commands help you manage which modules get deployed, and where they get deployed to.
- ConvertTo-ModuleService - This is the "heavy lifter" in Pipeworks. It performs the actual conversion of your module into a web site and service.
- Start-At - Lets you schedule tasks on the machine, including tasks with advanced triggering, such as new email received or data changes within a table or database
- Out-Deamon / Remove-Deamon/ Watch-Deamon - These functions let you create and manage Windows services
- Open-Port / Close-Port - These functions open and close ports on a box
- Install-PSNode / Start-PSNode - Helps you install and run PSNode, a very lightweight interactive web server included in Pipeworks
- Add-AzureLocalResource, Add-AzureRole, Add-AzureSetting, Add-AzureStartupTask, Add-AzureWebSite, New-AzureServiceDefinition, Out-AzureService - These commands help you build service deployments in Azure. Commonly, these commands will be called for you when you publish a deployment.
- Add-SecureSetting / Get-SecureSetting / Remove-SecureSetting - These commands help you manage secure information (for instance, user name and passwords) for use in your scripts and services