As a result, many browsers vendors banned plug-ins of this sort, so Silverlight applications are being phased out. This had a few problems, including being very performance-hungry and thus a battery killer on mobile devices. But supporting Visual Basic and C# in the browser required a comparatively large and complex browser plug-in, similar to Adobe Flash. This was similar to Angular and other JavaScript libraries because you could render content in the browser. Silverlight applications made it possible to develop the front-end part of a web application directly in Visual Basic or C#. In an Angular app, you’ll cleanly separate the UI and business logic and data retrieval, and you’ll be responsible for your own JavaScript – via TypeScript.
While you can separate the UI from business logic and data retrieval when you’re using WinForms, WebForms or MVC/Razor, this code is frequently mixed together, resulting in applications that are difficult to test and maintain. MVC/Razor applications improve on this scenario but still result in frequent calls to the server that give the user the impression of working with a bunch of web pages instead of a unified application. Instead they reload the entire page from the server every time content needs to be updated – supplying generated HTML and JavaScript. This happens because the browser displays a web page using the Document Object Model (DOM) and WebForms apps don’t manipulate this DOM directly. This leads to WebForms apps feeling cumbersome and outdated compared to modern apps. If the user clicks a WebForms button, it initiates a round trip to the server. Each of these technologies uses a different approach to combine the UI definition and retrieving data and business logic on the server.įor example, in WebForms, your application is controlled by the web server. If you’ve been developing in WebForms or MVC/Razor, you’re familiar with round-tripping data between the browser and the web server. Responding to the user is separated from retrieving data and most business logic. By necessity, a web server also supplies the JavaScript for download, but the code runs entirely in the browser. The JavaScript of the Angular app calls a back-end WebAPI to run business logic and serve up data. Transpiling converts TypeScript to JavaScript at compiler time. The JavaScript running in the browser uses the Angular library and is created from TypeScript via a transpiling step. JavaScript in the browser responds in real time to user actions in a manner similar to WinForms, although the handling of events is somewhat different. Part of the code for web applications runs in the browser and part runs on the server. If you’ve been developing in WinForms, this will be a paradigm shift for you. But the development process is different, so this post begins by comparing the WebAPI/Angular approach technologies you might be familiar with. If you’re familiar with Visual Basic, you’ll be able to implement your first Web API with TypeScript and Angular solution fairly quickly. The sample application is called Roaming Clipboard and maintains grouped links so you can find your favorite websites.Ĭomparing Angular with WinForms, WebForms, MVC/Razor and Silverlight You might want this to give your application a modern feel, improve the architecture or move to.
This post shows that if you prefer Visual Basic or choose to update your existing Visual Basic application, you can continue to use Visual Basic. Microsoft remains committed to supporting application development techniques including Visual Basic, WebForms, and WinForms. The TypeScript/Angular front end provides a responsive SPA (single-page-application) user interface. Working in Visual Basic lets you work in your favorite language and reuse existing business logic. This post covers using Visual Basic ASP.NET Core WebAPI for the back end, along with a new TypeScript and Angular front end.
Preserving domain-specific code when modernizing applications allows step-wise conversions, decreases cost, and avoids disruptions. This opens new possibilities for new applications and modernizing existing applications. NET Core starting in Visual Studio 2017 Update 3 (15.3).