Microsoft is revamping Visual Studio JavaScript projects in a future release • The Register

0

Microsoft has reworked its JavaScript / TypeScript projects in the upcoming Visual Studio 2022 to update them with modern development.

According to the latest StackOverflow survey, Microsoft provides the two most popular Integrated Development Environments (IDEs): Visual Studio Code and second (but far behind), Visual Studio.

This survey also showed that the most popular web framework is React.js, and the most popular programming language JavaScript, which may explain why the company is now trying to improve Visual Studio support for React projects. and JavaScript.

Visual Studio 2022, now in preview, has six new templates in this area, which are JavaScript and TypeScript variants of stand-alone templates for React.js, Angular, and Vue.js. When creating new projects based on these, there is an option to add startup code to call an ASP.NET Web API backend, forming a two-project solution.

In appearance, this is similar to templates that exist in Visual Studio 2019 (and also exist in VS 2022) such as “ASP.NET Core with React.js” and “Vue.js base app”, but there are some differences. important.

Program manager Gabrielle Crevecoeur explained that “the current Angular, React and Vue models included with Visual Studio were often not up to date” and JavaScript tests were not well integrated.

As if to emphasize the point about older versions, starting a Basic Vue.js project in Visual Studio 2019 raises a ton of warnings about obsolete and unsupported versions.

Building a Vue.js app in Visual Studio 2019 raises many warnings

Building a Vue.js app in Visual Studio 2019 raises many warnings

The newer models, which have an .esproj extension (which we assume for the ECMAScript project), work in a different way. Rather than relying on JavaScript / TypeScript frameworks that come with Visual Studio, they use the version of each framework that is in the system path. If Vue is not installed, for example, a stand-alone Vue project cannot be created until Vue is globally installed using npm.

While the old ASP.NET/React model generated a single project that included both ASP.NET Core and React elements, the new approach separates these projects. Another change is that JavaScript / TypeScript projects automatically create VS Code launch.json files so developers can open, run, and debug the application in VS Code without any further steps.

A Reaction and ASP.NET app in Visual Studio 2022 preview

A React and ASP.NET app in Visual Studio 2022 preview

Despite Microsoft’s best efforts, VS Code will likely remain superior to its cousin for JavaScript and TypeScript projects, and the inclusion of the VS Code config file is almost a recognition of that. Visual Studio is ideal for a back-end ASP.NET project, but VS Code still has advantages for JavaScript and TypeScript, itself being coded primarily in TypeScript and having cross-platform support, a huge community of oriented developers Web, and a more agile development process. Visual Studio is also cross-platform for Windows and Mac to some extent, although the Mac version is not comparable to the Windows edition.

That said, the effort to have Visual Studio use the system version of these JavaScript frameworks makes sense, especially since they have a fast pace of development and it’s hard for Visual Studio to keep pace.

[The current development approach for JavaScript applications is a] massive tumor of complexity

Ruby on Rails inventor David Heinemeier Hansson said last week that the current development approach for JavaScript applications, in which source code is transpiled and optimized by a tool like webpack (this is how works the Create React script called by Visual Studio), is a “massive tumor of complexity.”

He said: “ES6 is now supported by all major browsers. Chrome, Edge, Safari and Firefox fully support ES6. The last major hurdle was IE11, but Microsoft fortunately announced its end of life this year. means we don’t. No need for a transpilation step to turn ES6 into something that will run in the browser. It works great, no changes needed.

He said the Rails team was therefore working on removing everything, although he did add that React relies on transpilation for its JSX files.

Hansson’s comments illustrate how web development continues to evolve and show the common sense of the Visual Studio team in decoupling the creation of JavaScript and TypeScript projects from the IDE as much as possible. ®


Source link

Share.

About Author

Leave A Reply