Now you can port code from .Net Framework to .Net Core

Now you can port code from .Net Framework to .Net Core

Microsoft is looking to help developers move code from the Windows-oriented .Net Framework to cross-platform .Net Core via extended API access. But whether developers should actually make the move depends on their affinity for Windows.

Microsoft has made available a beta of Windows Compatibility Pack, adding access to APIs previously available just to .Net Framework. As a result, .Net Core developers gain access to an additional 20,000 APIs. You can get Windows Compatibility Kit via a NuGet package.

.Net Framework emphasizes Windows desktop development; the open source .Net Core is optimized for building web applications for Windows, Linux, and MacOS.

There are reasons to port to .Net Core as well as reasons not to do so. On the plus side, .Net Core enables web applications that can scale and can run on Linux; the addition of the .Net Framework APIs makes .Net Core more useful. On the minus side, developers who want to use Microsoft desktop technologies such as WinForms, Windows Presentation Foundation, or ASP.Net should stick with .Net Framework.

Migration should be done as a series of steps rather than all at once. For example, to migrate from an ASP.Net MVC application deployed on a Windows Server to an ASP.Net Core application on Linux on the Azure cloud, Microsoft advises migrating to ASP.Net Core while still targeting .Net Framework. Then, you would move to .Net Core while still on Windows. Finally, you would move to Linux and Azure. (ASP.Net Core extends .Net Core for web development.)

Note that the actual order of steps may vary. Microsoft offers guidance on migrations that includes identifying third-party dependencies and use of the company’s API Portability Analyzer tool.

Source: https://www.infoworld.com/article/3237924/development-tools/now-you-can-port-code-from-net-framework-to-net-core.html#tk.rss_news

Powered by WPeMatico

What’s next for Microsoft’s .Net CLR

What’s next for Microsoft’s .Net CLR

Microsoft’s Common Language Runtime, the virtual machine that anchors the .Net Framework, is due for a makeover, with the company announcing plans to make the CLR more efficient and scalable.

Key to this modernization will be improvements to the intermediate language underlying the CLR, called IL, which has not been upgraded in 10 years, said Mads Torgersen, lead designer for C# at Microsoft. The company wants to improve the IL and make the CLR a richer target for programming languages. 

The goal of the CLR is to run .Net programs efficiently. Currently the biggest problem with .Net is the inherent limits of scalability of the runtime itself, Ben Watson, Microsoft principal software engineer, said. The CLR is being pushed beyond its original intention and design. Watson explained that when multiple gigabytes of code are being loaded, algorithms built into the CLR start breaking down. 

One imminent improvement involves Span, pronounced “span of tee,” a new type that will offer language and framework features for achieving safer, more-performant, low-level code. The t in Span means type parameter. Span will be used by C# and other languages to create more efficient code that does not need to copy large amounts of data or pause for garbage collection, Torgersen said. New versions of the CLR will have “inside knowledge” about Span to improve speed. Span will be rolled out over the next few releases of the .Net Framework. 

Serving as Microsoft’s counterpart to the JVM of the Java world, the CLR provides code management of .Net languages including C#, Visual Basic, and F#. Source code is compiled by the language compilers into IL code; the CLR runs the program by executing the IL and translating the output into machine code while the program is running. Other services are provided by the CLR including automatic memory management and type safety, saving the programmer from having to provide for these services. 

Source: https://www.infoworld.com/article/3237659/application-development/whats-next-for-microsofts-net-clr.html#tk.rss_news

Powered by WPeMatico

Microsoft debuts beta Visual Studio Tools for AI

Microsoft debuts beta Visual Studio Tools for AI

Microsoft has released a beta version of its Visual Studio Tools for AI, an extension to the company’s signature Visual Studio 2017 IDE that lets developers and data scientists embed deep learning models into applications. Visual Studio Tools for AI supports deep learning frameworks such as Microsoft’s Cognitive Toolkit and Google’s TensorFlow.

Microsoft also offers AI support for its Visual Studio Code editor via a cross-platform extension called Visual Studio Code Tools for AI.

Where to download Visual Studio Tools for AI

Developers can get the AI extension for Visual Studio at the Visual Studio Marketplace.

Microsoft’s new AI tools roster

Other new AI tools from Microsoft include:

  • The beta Azure IoT Edge cloud service for deploying intelligence to IoT devices.
  • Azure Machine Learning Update, which integrates wth Azure IoT Edge and supports model deployment on Apple’s Core ML machine learning platform for iOS devices. Developers can train models and deploy them to edge devices.
  • The beta Azure SQL Database Machine Learning Service, which supports  R language-based learning models inside SQL Database.

Source: https://www.infoworld.com/article/3237468/development-tools/microsoft-debuts-beta-visual-studio-tools-for-ai.html#tk.rss_news

Powered by WPeMatico

Microsoft’s Mono .Net runtime brings back interpreter

Microsoft’s Mono .Net runtime brings back interpreter

Mono, Microsoft’s open source, cross-platform runtime for .Net-based development, has regained its .Net interpreter, about a decade after it was removed to keep Mono’s development effort manageable.

Mono’s developers are now turning their attention to using the interpreter in mixed-mode code execution, which combines interpreted code and statically compiled code.

What mixed-mode exdcution will bring to Mono

When mixed-mode execution becomes available, developers will benefit from having core libraries optimized with the LLVM compiler platform but still have flexibility of running some dynamic code, said Miguel de Icaza, a longtime leader of the Mono project.

This mixed-mode capability also will allow for scriptable applications on devices using .Net languages. The interpreter itself provides a lighter mechanism for running some code; certain programs can run faster by being interpreted than by using just-in-time (JIT) compiler execution.

Other ambitions for the interpreter include improvements for statically compiled Mono, so scripting languages built on .Net can work on statically compiled environments such as IronRuby. Another mixed-mode possibility is instructing the interpreter to execute code not known to be performance-sensitive, such as static constructors or initialization code, or switching from interpreted mode to JIT compilation if a threshold is exceeded.

Where to download Mono

You can download Mono from the Mono project website.

Source: https://www.infoworld.com/article/3237305/development-tools/microsofts-mono-net-runtime-brings-back-interpreter.html#tk.rss_news

Powered by WPeMatico

What’s new in WebAssembly portable browser code

What’s new in WebAssembly portable browser code

If its roadmap holds, WebAssembly, the binary format to speed the performance of web applications on both computers and mobile devices, will improve its language support via garbage collection, threads, better debugging, and a SIMD (single instruction, multiple data) extension.

WebAssembly, introduced with great fanfare in 2015, is a low-level format intended to exceed JavaScript’s performance when it comes to executing computationally intensive operations in a browser. WebAssembly provides a binary code format that is smaller over the wire, loads faster, and has better performance than JavaScript. It could prove useful in applications such as web-based CAD programs, 3D models, calculators, and games.

New features planned for WebAssembly

WebAssembly garbage collection proposed

To support use of multiple languages with WebAssembly, garbage collection is needed to efficiently allocate and manipulate managed objects from WebAssembly code, said Deepti Gandluri, a Google Chrome software engineer on the WebAssembly team. Garbage collection currently is in the proposal stage of the WebAssembly roadmap.

WebAssembly thread support is coming soon

A trial version of threads is due by 2018, with the general release to be launched by July 2018, Gandluri said. The use of threads will simplify the porting of multithreaded applications to the web, and lay the groundwork for faster-running applications.

WebAssembly debugging enhancements under development

To improve debugging, the WebAssembly developers are working on capabilities for source maps and memory inspection. WebAssembly currently offers basic debugging capabilities. With the planned SIMD extension, WebAssembly will gain support for instructions used in image and video processing and cryptography.

Also on the roadmap is “zero-cost” exception-handling for C/C++ to eliminate overhead.

WebAssembly will gain more language support

It is technically possible now to use other languages with WebAssembly, and there have been experimental implementations to work with the format. However, these languages cannot currently achieve the ideal performance, memory utilization, or DOM integration, said Luke Wagner, a Mozilla engineer on the WebAssembly team. .

As a result, WebAssembly will likely be enhanced to support languages using higher level garbage collection, such as Java, C#, and Python. But it could take a couple years to accomplish this.

How browser vendors support WebAssembly

Google has released a 3D library called Draco that uses WebAssembly. Used for compressing and decompressing 3D geometric meshes and clouds, Draco features a WebAssembly decoder for better performance.

WebAssembly can be used with JavaScript in applications, with JavaScript used for scripting and WebAssembly for computational performance. WebAssembly JavaScript APIs can load WebAssembly modules into a JavaScript app.

Source: https://www.infoworld.com/article/3217704/web-development/whats-new-with-webassembly-portable-code.html#tk.rss_news

Powered by WPeMatico

Scripting languages slip in popularity, except JavaScript and Python

Scripting languages slip in popularity, except JavaScript and Python

Prominent scripting languages, once viewed as the future of programming by offering ease of use, have slipped in the monthly Tiobe index of language popularity. Only Python and JavaScript still have some momentum.

Languages that have seen their fortunes decline include Perl, PHP, and Ruby. Software quality services company Tiobe’s suspected cause is a desire among developers for higher quality than is afforded in scripting languages: “Because quality demands are getting higher and higher, hardly anybody dares to write a critical and large software system in a scripting language nowadays.”

With scripting languages, most errors show up in runtime. And this is a problem, Tiobe says. Developers can write unit tests to compensate for this but it still is “quite dangerous” because these errors can happen while the application is in production. Statically typed languages, meanwhile, have responded to the threat of scripting languages by reducing type verbosity.

In this month’s index, which ranks language popularity based on a formula assessing searches on languages in popular search engines, Python was ranked fourth, one spot ahead of where it was last year, up 0.91 percent in that period. The language has enjoyed a reputation of being easy to learn and has become popular at high schools and universities. JavaScript, a critical cog in web development, was ranked sixth after having been eighth a year ago. It grew 0.27 percent since November 2016.

But further down the list, PHP was ranked eighth in the November index after being in seventh place the same time last year; its rating has slipped 1.23 percent from a year ago. Ruby finished in 13th place and lost 0.39 percent from a year ago, when it was in 14th place. Perl, meanwhile, was in 15th place, down five spots and 0.8 percent from a year ago. As a result, scripting languages in general gradually are moving out of Tiobe’s top 20.

Even JavaScript has had to evolve, with Microsoft introducing TypeScript, its statically typed version of JavaScript. JavaScript also has benefitted from frameworks such as Angular and React that have served to safeguard the language and add extra functionality, Tiobe notes.

Tiobe’s Top 10 programming languages

Elsewhere in the index, the leaders, Java and C, continue to take the first and second spots. The top 10 languages in this month’s Tiobe index were:

  1. Java, at 13.231 percent
  2. C,  at 9.293 percent
  3. C++, at 5.343 percent
  4. Python, at 4.482 percent
  5. C#, at 3.012 percent
  6. JavaScript, at 2.972 percent
  7. Visual Basic .Net, at 2.909 percent
  8. PHP, at 1.897 percent
  9. Delphi/Object Pascal, at 1.744 percent
  10. assembly language, at 1.722 percent

PyPL’s Top 10 programming languages

In the alternative PyPL Popularity of Programming Languages index, which examines how often language tutorials are searched on in Google, scripting languages still finish near the top but remain behind Java. PyPL’s top 10 languages for November were:

  1. Java, at 21.4 percent
  2. Python, at 18.6 percent
  3. PHP, at 8.2 percent
  4. JavaScript, at 8 percent
  5. C#, at 7.6 percent
  6. C++, at 6.3 percent
  7. C, at 6.3 percent
  8. Objective-C, at 3.9 percent
  9. R, at 3.8 percent
  10. Swift, at 3.1 percent

Source: https://www.infoworld.com/article/3237085/javascript/scripting-languages-slip-in-popularity.html#tk.rss_news

Powered by WPeMatico

Beta JetBrains IDE moves Kotlin apps out of the JVM

Beta JetBrains IDE moves Kotlin apps out of the JVM

JetBrains has made available the Kotlin/Native technology, which creates native binaries for Kotlin code so they can run without a Java virtual machine. A beta version of the CLion IDE allows Kotlin programs to be compiled directly to an executable machine-code format.

Kotlin is a statically typed JavaScript language alternative that began on the JVM. But many platforms can’t run JVMs, restricting the use of Kotlin to JVM-friendly platforms like Android. The Kotlin/Native preview’s supported target platforms include MacOS, iOS, Ubuntu Linux, and Raspberry Pi.

How Kotlin/Native works

Kotlin/Native uses LLVM compiler technology to generate machine code. An LLVM back end, runtime implementation, and native-code-generation facility are provided as part of the beta CLion IDE.

Where to download the CLion IDE for Kotlin/Native

Developers can use Kotlin/Native by downloading CLion 2017.3, the beta version JetBrains’s IDE for C and C++ development. You will also need to download two plugins, for Kotlin and Kotlin/Native, from the JetBrains Plugin Repository to add Kotlin and Kotlin/Native support to CLion.

Source: https://www.infoworld.com/article/3236199/java/beta-jetbrains-ide-moves-kotlin-apps-out-of-the-jvm.html#tk.rss_news

Powered by WPeMatico

What’s next for Microsoft’s Visual Studio Code features

What’s next for Microsoft’s Visual Studio Code features

Microsoft’s 2018 roadmap for its open source Visual Studio Code code editor includes better performance, reduced memory consumption, and more support for JavaScript and TypeScript.

The multilanguage Visual Studio Code, which Microsoft has been updating monthly, is designed as a streamlined editor for debugging, running tasks, and version control. More complex workflows require the use of full-featured IDEs. Visual Studio Code 1.0 debuted in April 2016 and supports Node.js, JavaScript, and TypeScript.

Performance-improvement features planned for Visual Studio Code

Microsoft’s performance-oriented plans for Visual Studio Code include:

  • Reducing memory consumption.
  • Improving accessibility.
  • Support of language packs for community-contributed translation.
  • Improving the Windows update experience.
  • Adding more diagnostics.

Editor features planned for Visual Studio Code

Among changes to the editor itself that Microsoft plans for Visual Studio Code are:

  • Better scalability and performance for editor decorations.
  • Investigation of a native model layer.
  • A look into semantic coloring.
  • Rendering of more than text on the minimap.

Workbench-related improvements under consideration include:

  • Finishing multiroot folder workspaces support.
  • Showing SCM (source control management) status in the explorer.
  • Vertical panel layout support.
  • Improved notification UI.
  • Better intrafile navigation.
  • Enabling users to manage contributions to the status bar.

JavaScript and TypeScript features considered for Visual Studio Code

For JavaScript, Microsoft’s plans call for improving the discoverability in the use of TypeScript to type-check JavaScript code.

For both TypeScript and JavaScript, Microsoft wants to investigate improving source maps so they can be more precise and feature variable mappings. Also, the Visual Code Studio editor would gain the ability to organize imports and remove unused imports for the two languages.

Other features considered for Visual Studio Code

Microsoft plans to improve support for the Language Server Protocol, for integrating different languages into editors and IDEs.

For extension users, Microsoft wants to improve both the extension recommendation system and searching. Tracking down issues caused by extensions would be simplified. Users also would get more information about extension usage.

Also on the drawing board for Visual Studio Code is support for splitting and viewing of multiple terminals, along with source control integration improvements that include the ability to view changes inside the editor using a peek/inline experience.

An integrated history view also might be added.

Where to download Visual Studio Code

You can download Visual Studio Code from the project website.

Source: https://www.infoworld.com/article/3235996/development-tools/whats-next-for-visual-studio-code.html#tk.rss_news

Powered by WPeMatico

What’s new in Kotlin 1.2? Code reuse, for starters

What’s new in Kotlin 1.2? Code reuse, for starters

Version 1.2 of the statically typed Kotlin language, a version of Java endorsed by Google for Android app development, will offer an experimental feature enabling reuse of code across platforms, as well as compatibility with the Java 9 module system.

Where to download Kotlin 1.2

The release candidate for Kotlin 1.2 is now available for download from GitHub.

The new features in Kotlin 1.2

Kotlin’s experimental multiplatform projects capability lets developers reuse code between supported target platforms: JVM and JavaScript initially, and later native. Code to be shared between platforms is placed in a common module; platform-dependent parts are put in platform-specific modules. During compilation, code is produced for both the common and platform-specific parts.

Developers can express dependencies of common code on platform-specific parts via expected and actual declarations. This declaration specifies an API, while an actual declaration is either platform-specific to the API or a type alias that refers to an existing implementation of the API in an external library. The standard library, meanwhile, features the kotlin.math package for performing mathematical operations in cross-platform code.

The kotlin.math package also now offers better precision for math polyfills for JavaScript.

Kotlin 1.2’s standard library is compatible with newly introduced Java 9 module system, which forbids split packages (multiple .jar files declaring classes in the same package). In Kotlin 1.2, the kotlin-stdlib-jdk7 and kotlin-stdlib-jdk8 artifacts replace the old kotlin-stdlib-jre7 and kotlin-stdlib-jre8.

Also to support Java 9, Kotlin 1.2 also removes the deprecated declarations in the kotlin.reflect package from the kotlin-reflect library. Developers need to switch to using the declarations in the kotlin.reflect.full package, which debuted in Kotlin 1.1.

Type inference improvements in Kotlin 1.2 include enabling the compiler to use information from type casts in type inference. If a developer calls a generic method that returns a type parameter, such as T, and casts the return value to a specific type, such as Foo, the compiler now understands that T for this call needs to be bound to the type Foo. This is especially important for Android developers, for the Kotlin compiler to correctly analyze findViewById calls in Android API Level 26. Also, the compiler now has an option to treat all warnings as errors.

Kotlin 1.2 also has these enhancements:

  • It now supports array literals in annotations, simplifying coding.
  • It uses a more consistent syntax.
  • The new reflection API lets developers check whether a lateinit variable has been initialized.
  • The lateinit modifier now can be used on top-level properties and local variables.

Kotlin had its origins as a language for the JVM but has since been expanded to compile to JavaScript as well. The language received a boost this spring when Google endorsed it as a mechanism for building Android mobile applications, alongside Java itself. 

Source: https://www.infoworld.com/article/3229958/application-development/whats-new-in-kotlin-12-code-reuse-for-starters.html#tk.rss_news

Powered by WPeMatico