If you haven’t heard of Slack, it’s a wonderful team messaging platform. At first glance, it looks a bit like a private Twitter where you can set up “channels” to have conversations with colleagues. But the great thing with Slack is its flexible API and all the marvelous ways in which you can extend its functionality. You can send rich text messages with status updates from your production servers or you can interface with popular web services like Trello, right there in the chat window!
So as a way to kick start an effort at learning node.js and re-discover web development (which I haven’t really done in about 15 years now), I set out to build a Slack API. Here’s what I learned.
Want to try something in SQL Server, but don’t have a server handy where you are? Check out SQL Fiddle – it’s a kind of web scratch pad for SQL code (not just SQL Server, by the way, lots of other platforms).
This is truly a beautiful tool with separate entry panes for schema and DML statements, as well as the possibility to view or download query plans for each query. And when you’re done editing, you can copy a URL and post on online forums, in e-mails, etc, so other people can run and test your code.
For most things that you can’t do straigh-off in T-SQL, you have the option to write a Common Language Runtime procedure. This gives you access to a huge array of APIs, so you can create really cool stuff, way beyond what T-SQL would normally allow you to do. Here, we’ll explore how to write a web request procedure in C#, so you can download a web document (for instance, a file on a REST service) directly into a table or a string variable using just a regular function call.