What is the best technology used to automate tasks using .net libraries?

Imagine you need to develop and plan an application / script to do the following: -

  • Link to one or more .net assemblies
  • Request API, get some objects
  • for each object, a call to another method in the API

What would you use?

In the past, I created small console applications that do the above, but that seems a bit awkward and redundant.

I suppose something like PowerShell or IronPython might be better.

Any recommendations?

+6
scripting powershell ironpython automation
source share
5 answers

IronPython

I tried using both Powershell and IronPython for the above task and came to the conclusion that IronPython is best suited (for me).

To be fair, Powershell or any DLR-based language such as IronPython or IronRuby would be appropriate for the task and would have less overhead than considering trivial console applications.

If all you do is consume the .net library and execute some scripts, then IronPython will cut Powershell. If you want to use some type of shell or use existing CMDLETS, then Powershell is the best choice.

IronPython, an implementation of python, brings all the benefits of python to scripting, such as ease of use, easy reading, and fast development.

+2
source share

Absolutely PowerShell, this is exactly what it is intended for.

Here are some useful resources to help you get started:

+10
source share

One of the advantages of PowerShell is that they did a lot of work in the background, so that everything was easily arranged, making implicit type conversions, etc., to make the output of one program useful as an input to another. And since everything goes through objects, you don’t need to write text-searching code to fool things together.

I prefer Python, however, when I write a lot of source code, rather than relying heavily on libraries and gluing components.

+3
source share

The problem with application drivers is that they constantly break. Applications are constantly changing the external surface, and this damages the drivers. Therefore, you constantly need to update driver parts. I believe that an uncompiled dynamic language is ideal for this, as you can quickly update and run the task.

Powershell is a great technology for this. This is an amazingly flexible and very simple task. This is a combination of compiled and dynamic code. Thus, the more heavy fragments of your driver can be any compiled language, the more fragile and frequently updated fragments can be a script. They integrate easily.

I am a greedy Powershell user and really don't really understand much about IronPython (hence my choice). IronPython may also have these features, although if you are more comfortable with this language, where you need to go.

+2
source share

Due to frustration in PowerShell, I looked at IronPython. I think this is a good alternative to powershell, especially if you are a programmer. Even if you are an IT professional, I think that the Windows + IronPython command shell is a good combination that will help you in the .NET era (for example, that the shell + vbscript command works great in the COM era).

0
source share

All Articles