PowerShell – SharePoint – RegEx – .NET – JavaScript

Main menu

Tag Archives: ISE

I enjoy using different programming languages and styles. As most languages have specific things they are designed for. Different languages have different strengths and weaknesses.

Java

Java has great portability (supported on almost any platform) and OOP capabilities. Java has multiple easy to use editors. One of the most popular being Eclipse. The IDE is lightweight and itself is portable (so it can run from a USB stick and you can take it anywhere with you). Because of it’s popularity there is a lot of information to find about Java on the internet.

C#

C# builds on the extensive .NET framework (as well as VB.NET) and can create nice native looking applications for the Windows platform. It is also easy to pick up, and with a free programming environment (Visual Studio Community Edition) it take little effort to get started. Because of the great popularity of the language a lot of information can be found on the internet. Apart from community support there is also support from Microsoft in the form of Technet or MSDN.

PowerShell

PowerShell is a language based on the .NET framework (just like C# and VB.NET). It comes default with Windows 7/Windows Server 2008 R2 (PowerShell 2.0) and newer versions. It also included a nice ISE (Integrated Scripting Environment) which comes as a feature which can be activated.

As it is build on top of .NET the entire framework is available to work with. Every variable or return value is a .NET object. A particular strong feature of PowerShell is the concept of piping, which allows the output of one cmdlet to be used as input of another cmdlet.

Another benifit is it can be run without needing to build an executable. It combines scripting power (known from batch files) with the power of a full programming language supported by the entire .NET framework. This enables you to create a Windows dialog from a few lines of PowerShell code. Through this it is possible to start a PowerShell script and then display a GUI with buttons, graphs, sliders and so on.

Also an advantage of PowerShell over C# is (IMHO) the ease of handling custom objects. Importing a csv will result in a collection of custom objects with properties with the names of every column of the CSV file. Also when creating custom objects you can add members (properties) programmatically as you go along (runtime). These new objects can then be gathered is a collection of your custom objects. Finally these can be exported back to a csv or passed along to a function or cmdlet. This would not be easy to do in a language like C# because you would have to define the objects beforehand and every change in the imported csv file would require a rewrite of the code.

C

When it comes to writing fast code C/C++ is a commonly used language. I like C especially because it brings the programmer close to the core of programming. There are no strings, just arrays of characters. When traversing an array of integers the steps in memory are larger then when traversing a character array (aka string). Which brings a better understanding of how much memory you are consuming. Currently memory is rarely an issue. Some understanding of this can be quite useful when programming for custom devices with limited memory. This is the case with integrated electronics in devices such as a camera or a remote control.

Web based

Web based languages differ from previously mentioned languages in the aspect that they only have html and css as output. Browsers then decide what happens with the rendering of the eventual output.

JavaScript

As some have noted I did not mention JavaScript as an output. This is because JavaScript itself cannot be rendered. It are the results of JavaScript that are rendered. Changes in css, html or text. JavaScript is one of the most used web based language. No matter what the server side system is, the client side logic almost always is JavaScript.

For JavaScript there are many (often minified) libraries available. A popular one is Jquery. When it comes to programming languages the focus is shifting more and more towards client side code inside a browser (like JavaScript). Which requires future devices to have a browser and an internet connection. Complex calculations can still happen server side. But then through asynchronous calls to services.

PHP

For server sides code there are many ways to go. A popular language is PHP (the site you are looking at right now runs on PHP.), it is free to use and has many (free) editors available. PHP supports Object Oriented programming and is easy to get started with.

ASP.NET

Microsoft offers ASP.NET as server side language. As most of Microsofts languages it is supported by the .NET framework and can use most of the .NET libraries (because the web based nature it does not support all windows based features). There are many extensions on ASP.NET, like Microsofts MVC which allows easy creation of data driven sites.