1. IT-Security >
  2. Programmierung


ArabicEnglishFrenchGermanGreekItalianJapaneseKoreanPersianPolishPortugueseRussianSpanishTurkishVietnamese

Programmierung


Suchen

News RSS Quellen: 35x
News Kategorien unterhalb von Programmierung: 1x
News RSS Feeds dieser Programmierung Kategorie: RSS Feed Programmierung
Benutze Feedly zum Abonieren.Folge uns auf feedly
Download RSS Feed App für Windows 10 Store (Leider gibt es nicht mehr viele Extensions mit welchen Sie RSS-Feeds in einer Software abonieren können. Der Browser Support für RSS-Feeds wurde eingestellt (Firefox,Chrome).

Eigene IT Security Webseite / Blog / Quelle hinzufügen

Seitennavigation

Seite 1 von 87 Seiten (Bei Beitrag 1 - 35)
3.037x Beiträge in dieser Kategorie

Nächste 2 Seite | Letzte Seite

[ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ]

UX / UI Inspiration for 2019

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Improving the Quality of Incoming Code

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Building UIs in the Dark

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

TWC9: New Flight Simulator, WSL 2 for Insiders, Visual Studio Code Java Pack and more | This Week On Channel 9

Zur Kategorie wechselnProgrammierung vom | Quelle: channel9.msdn.com Direktlink direkt öffnen

This Week on Channel 9, Christina is celebrating the start of summer (and the breaking news of Taylor Swift's new album!), wearing Supreme, and ready to dive into the latest developer news, including:

Please leave a comment or email us at [email protected]. 

 

 

Create a Free Account (Azure)

 


News Bewertung

Weiterlesen Weiterlesen

TWC9: New Flight Simulator, WSL 2 for Insiders, Visual Studio Code Java Pack and more

Zur Kategorie wechselnVideo | Youtube vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

The State of Images (The State of the Web)

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

How does the NT architecture differ between Windows Server and Client? | One Dev Question

Zur Kategorie wechselnVideo | Youtube vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

How much work does the GPU do depending on the stack you use? | One Dev Question

Zur Kategorie wechselnVideo | Youtube vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Can you tell us any secrets about Windows Phone? | One Dev Question

Zur Kategorie wechselnVideo | Youtube vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Machine Learning Infrastructure || Alexandra Johnson

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Time Travel Is Easy With A Time Zone Selector Button

Zur Kategorie wechselnProgrammierung vom | Quelle: program.developer.samsung.com Direktlink direkt öffnen

Whether you want to display the time in another location or create a watch face with dual-time-zone digital clocks, you can do both with with the latest release of Galaxy Watch Designer 1.7.1. Implementation is easy, so please continue reading to learn how to add this travel-friendly feature to your next watch face. At the […]
News Bewertung

Weiterlesen Weiterlesen

Updated App Store Links

Zur Kategorie wechselnProgrammierung vom | Quelle: developer.apple.com Direktlink direkt öffnen

Links generated for apps on the App Store now begin with apps.apple.com. Existing links that begin with itunes.apple.com will continue to work in their current form and will automatically redirect to the apps.apple.com domain.
News Bewertung

Weiterlesen Weiterlesen

Constant Time

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Announcing the Visual Studio Code Installer for Java

Zur Kategorie wechselnProgrammierung vom | Quelle: devblogs.microsoft.com Direktlink direkt öffnen

It’s been almost 3 years since the first Java language server was developed during a hackathon in a small conference room at Microsoft’s Zurich office with people from Red Hat, IBM, Codenvy and Microsoft, which later became one of the most popular extensions for Visual Studio Code with more than 2.7 million installations. Since then, Visual Studio Code has gone through a thrilling journey and become to the most popular development environments according to Stack Overflow. More and more Java extensions are now available in Visual Studio Code to serve a growing Java community using Visual Studio Code along with their favorite tools and frameworks.

During this journey, we’ve heard many developers ask how to start with Java in Visual Studio Code. As the vibrant Java community expands to include more students and developers from other languages, many new comers struggle with setting up their environment to be able to start coding. To help people get started, we created the Java extension pack to give you the relevant extensions, and also included tutorials with detailed steps in our documentation.

Back in 2018, Microsoft Azure became a Platinum Sponsor of the AdoptOpenJDK project – that just got renewed until June 2020 – and provides a truly vendor neutral, completely free and open source distribution of the JDK (Java Development Kit) based on the OpenJDK project. This was a turning point for us so much we’ve also added a functionality to detect and help developers install a JDK binary in their environments, having AdoptOpenJDK as the recommended distribution. These efforts were encouraging, but got us thinking about more ways we could make it easier to starting coding in Java.

Introducing the Visual Studio Code Java Pack Installer

So today, we’re releasing a special Installer of Visual Studio Code for Java developers. The package can be used as a clean install or an update for existing environment to add Java or Visual Studio Code to your development environment. Once downloaded and opened, it automatically detects if you have the fundamental components in your local development environment, including the JDK, Visual Studio Code and essential Java extensions.

After clicking Install, it will pull the stable versions of those tools from trusted online sources and install them on your system. Once it’s done, you can open Visual Studio Code and start writing and running Java code directly! Below is a short video showing you how to write and run a Hello World program with Java in Visual Studio Code in less than 1 minute. See more detailed functionality in our tutorial.

The installer is available for download for Windows now while we’re still working on the Mac version. Please have a try and let us know your feedback!

If you’d like to follow the latest of Java on Visual Studio Code, please provide your email with us using the form below. We will send out updates and tips every couple weeks.

Thank you and happy coding.

The post Announcing the Visual Studio Code Installer for Java appeared first on The Visual Studio Blog.


News Bewertung

Weiterlesen Weiterlesen

How to Upgrade to Typescript Without Anybody Noticing, Part 1

Zur Kategorie wechselnProgrammierung vom | Quelle: devblogs.microsoft.com Direktlink direkt öffnen

This guide will show you how to upgrade to TypeScript without anybody noticing. Well, people might notice — what I really mean is that you won’t have to change your build at all. You’ll have the ability to get errors and completions in supported editors and to get errors on the command line from tsc, the TypeScript compiler, but you won’t have to integrate TypeScript into your build.

Here’s what you’ll actually need to check in to source control:

  1. A TypeScript configuration file, tsconfig.json.
  2. New dev dependencies from the @types package.
  3. A TypeScript declaration file to hold miscellaneous types.

How can you upgrade with so little change? Well, the secret is that you’re not using TypeScript. The TypeScript compiler can check Javascript just fine, so you can stick with Javascript and use JSDoc to provide type information. This is less convenient than TypeScript’s syntax for types, but it means that your files stay plain old Javascript and your build (if any) doesn’t change at all.

Let’s use TypeScript-eslint-parser as an example package so you can follow along if you want. Confusingly, even though the name includes “TypeScript”, the parser is actually written in Javascript, although it has since been merged into a larger project that is written in TypeScript.

This guide assumes that you have used TypeScript enough to:

  1. Have an editor set up to work with TypeScript.
  2. Have used npm to install a package.
  3. Know the basic syntax of type annotationsnumber, { x: any }, etc.

If you want to look at the package after the upgrade, you can run the following commands, or take a look at the branch on github:

git clone https://github.com/sandersn/TypeScript-eslint-parser
cd TypeScript-eslint-parser
git checkout add-tsconfig
npm install

Also make sure that you have TypeScript installed on the command line:

npm install -g TypeScript

 

Add tsconfig

Your first step is to start with tsc --init and change the settings in the tsconfig.json that it produces. There are other ways to get started, but this gives you the most control. Run this command from the root of the project:

tsc --init

Here is what you should end up with, skipping the lines you don’t need to change:

{
  "compilerOptions": {
    "allowJs": true,
    "checkJs": true,
    "noEmit": true,
    "target": "esnext",
    "module": "commonjs",
    "resolveJsonModule": true,
    "strict": false
  },
  "exclude": [
    "tests/fixtures/",
    "tests/integration/"
  ]
}

For Javascript, your “compilerOptions” will pretty much always look like this.

  • allowJs — Compile JS files.
  • checkJs — Give errors on JS files.
  • noEmit — Don’t emit downlevel code; just give errors.
  • target — Target the newest version of EcmaScript since we’re not emitting code anyway.
  • module — Target node’s module system since we’re not emitting code anyway.
  • resolveJsonModule — Compile JSON files (if they’re small enough).
  • strict — Don’t give the strictest possible errors.

A few notes:

  • "target" and "module" should not actually matter since they have to do with generated downlevel code, but you’ll get some bogus errors if you use ES6 classes like Map or Set.
  • "resolveJsonModule" is optional, but you’ll need it if your code ever requires a JSON file, so that TypeScript will analyze it too.
  • "strict" should be false by default. You can satisfy the compiler on strict mode with pure Javascript, but it can require some odd code.

You may want to specify which files to compile. For TypeScript-eslint-parser, you’ll be happiest with an "exclude" list. You may want to check all the source files, which is what you get by default. But it turns out that checking a Javascript parser’s tests is a bad idea, because the tests are themselves malformed Javascript files. Those malformed test files shouldn’t be checked and mostly don’t parse anyway.

You might want to use "include" if, say, you only want to check your source and not your tests or scripts. Or you can use "files" to give an explicit list of files to use, but this is annoying except for small projects.

OK, you’re all set. Run tsc and make sure it prints out errors. Now open up files in your editor and make sure the same errors show up there. Below are the first few errors you should see:

Makefile.js(55,18): error TS2304: Cannot find name 'find'.
Makefile.js(56,19): error TS2304: Cannot find name 'find'.
Makefile.js(70,5): error TS2304: Cannot find name 'echo'.

You should be able to see the same errors when you open Makefile.js in your editor and look at lines 55 and 56.

Congratulations! You’ve done the only required part of the upgrade. You can check in tsconfig.json and start getting benefits from TypeScript’s checking in the editor without changing anything else. Of course, there are a huge number of errors, hardly any of which are due to real bugs. So the next step is to start getting rid of incorrect errors and improving TypeScript’s knowledge of the code.

Here’s the commit.

 

Install @types packages.

Your first order of business is to install types for packages you use. This allows TypeScript to understand them, which makes it the easiest way to reduce the number of errors. Basically, if you have a dependency on some package, say, jquery, and you see errors when you use it, you probably need a dev dependency on @types/jquery. The type definitions in @types/jquery give TypeScript a model of jquery that it can use to provide editor support, even though jquery was written before TypeScript existed.

Definitely Typed is the source for the packages in the @types namespace. Anybody can contribute new type definitions, but tons of packages already have type definitions, so you will probably find that most of your dependencies do too.

Here’s a good starting set for TypeScript-eslint-parser, although there are likely more available:

npm install --save-dev @types/node
npm install --save-dev @types/jest
npm install --save-dev @types/estree
npm install --save-dev @types/[email protected]
npm install --save-dev @types/eslint-scope

After the installation, these three types packages still didn’t work (although notice that we intentionally installed an old version of shelljs – more on that later):

  • @types/shelljs
  • @types/eslint-scope
  • @types/estree

They fail for different reasons, though. shelljs and es-lint-scope just don’t have types for a lot of their values. estree has all the correct types, but the types aren’t imported correctly.Part 2 shows how to fix these two problems.

At this point, you have types for some of your packages working and your own code checked by the TypeScript compiler. The next step is to fix compile errors in the rest of the package types, or to fix them in your own code. Or you can just ignore the errors and start using the TypeScript support in the editor.

Next up: Part 2, to learn about the various kinds of fixes.

The post How to Upgrade to Typescript Without Anybody Noticing, Part 1 appeared first on TypeScript.


News Bewertung

Weiterlesen Weiterlesen

Bootstrapping Azure DevOps extensions with Yeoman

Zur Kategorie wechselnProgrammierung vom | Quelle: devblogs.microsoft.com Direktlink direkt öffnen

Azure DevOps has evolved over the last several years, which has resulted in many improvements to the extension landscape. Many engineering teams use this extension functionality heavily to customize their development environment exactly how they want it. When people first get started building an extension, they often deploy the extension to the Visual Studio Marketplace and use the browser’s built-in debugging tools. Although this approach works, we wanted to demonstrate a faster way to debug right in Visual Studio Code using hot reload.

The azure-devops-extension-hot-reload-and-debug repo already demonstrates this scenario, but we also wanted to offer developers an easy way to bootstrap their own projects. Our Yeoman generator will create a new, clean extension project for you and handle the details of filling in the required config files with the correct values.

Although the TFX CLI offers a command (tfx extension init) that will bootstrap an extension project, it does not contain the necessary bits for this hot reload and debugging scenario.

How to generate a new project

  1. If you already have Node.js installed, you can use npm to install Yeoman:

    npm install -g yo

  2. Yeoman is just the scaffolding engine so it doesn’t know how to generate an Azure DevOps extension project. We will need to install our generator that knows the specifics of how the extension should be set up:

    npm install -g @microsoft/generator-azure-devops-extension

  3. Now that we have the Yeoman engine and the Azure DevOps extension generator installed we can use Yeoman to run the generator (we can leave off the package’s generator- prefix because Yeoman knows to only look for packages with this prefix):

    yo @microsoft/azure-devops-extension

  4. The generator will ask you to fill in several parameters:

    • Extension ID: The unique ID that you want to publish your extension under.
    • Extension name: The name that users will see in the Visual Studio Marketplace and Azure DevOps.
    • Extension description: A short description that users will see in the Visual Studio Marketplace and Azure DevOps.
    • Extension publisher ID: The Visual Studio Marketplace publisher ID under which you want to publish the extension. To learn more see Package and publish extensions.

The result

The generator creates a new folder with the following folder structure (the folder’s name will be the extension ID you chose during creation):

.
├── .eslintrc.js
├── .gitignore
├── .vscode
│   └── launch.json
├── README.md
├── configs
│   ├── dev.json
│   └── release.json
├── img
│   └── world.png
├── package.json
├── src
│   └── hub
│       ├── hub.html
│       ├── hub.scss
│       └── hub.tsx
├── tsconfig.json
├── vss-extension.json
└── webpack.config.js

What’s next?

Now that you have generated a new project, you are ready to start debugging. Refer to the generated readme in your new project for instructions on how to get started. You should also check out our blog post for an in-depth look at how these features work.

The post Bootstrapping Azure DevOps extensions with Yeoman appeared first on Azure DevOps Blog.


News Bewertung

Weiterlesen Weiterlesen

Fun with R and the Noops

Zur Kategorie wechselnProgrammierung vom | Quelle: blog.revolutionanalytics.com Direktlink direkt öffnen

Earlier this week, Github introduced Noops, a collection of simple black-box machines with API endpoints, with the goal of challenging developers of all skill levels to solve problems with them. Five "Noops" machines have been released so far along with challenges suitable for beginner programmers, with 15 further machines (and some more complex challenges) to be released over the coming three weeks. The bots available now are:

  • Hexbot, which generates random RBG color strings and x/y coordinates
  • Vexbot, which generates random endpoint coordinates of (possibly-connected) line segments
  • Directbot, which will generate sequences of LOGO-like movements, either at random or according to a pattern you specify
  • Drumbot, which generates commands for various pre-defined drumbeats
  • Fizzbot, which tests your knowledge of classic programmer interview questions

Descriptions of the Noops and their APIs are provided on GitHub, along with sample code in Javascript and/or Python. However, as long as you can connect to the internet, you can use any language you like to solve the challenges. 

R is an idea language for interfacing with these bots. The httr package for R makes it easy to interact with APIs using the GET operation, which is also what you use to control most Noops. (Fizzbot also uses the POST verb.) All I need to do is to load the package, and define the endpoint URL for Hexbot. And the data from the bots lends itself to graphical visualization, which is also easy to do with R. So I thought it would be fun to take Hexbot for a spin with R.

Calling the endpoint without any parameters generates a single RGB color specification (for example: #95DDFA), and this is easily done using the GET function from the httr package. Here, I define a function random.color to return a random color generated by Hexbot as a single R character. Luckily, you can pass RGB strings as colors to the base graphics functions in R, so I can use the barplot function to generate a block of random color:

Onecolor

Hexbot can generate more than one color at once, if you pass in the count parameter. For this, we just need to use the query option to the GET function. Here, we define a function to generate n random colors and extract the results as a vector, which we can then display with the barplot function once more:

Manycolors
You can also provide multiple parameters to the endpoint: if you also provide width and height, it will return random x and y locations within those ranges, along with the random colors. This adds some additional complexity when it comes to extracting the data from the payload, but with that done we can display the results as a scatterplot:

Noops-scatter
Of course, this is all rather pointless, in the sense that I could trivially use R itself to generate random points and colors. But still, it's a useful exercise to work through this yourself if you're not familiar with interacting with HTTP APIs. You'll learn several things along the way:

  • about the HTTP GET operation and how to provide query parameters;
  • how to navigate the nested lists that httr creates from the JSON content payload; and
  • how to unroll those nested lists to extract the data you need in R.

The Noops yet to be revealed promise to offer more complex challenges, so I expect we'll learn about other aspects of HTTP APIs when they're to be released in the coming weeks as well.

Github: Meet the Noops


News Bewertung

Weiterlesen Weiterlesen

Troubleshoot resource property changes using Change History in Azure Policy | Azure Friday

Zur Kategorie wechselnVideo | Youtube vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Troubleshoot resource property changes using Change History in Azure Policy | Azure Friday

Zur Kategorie wechselnProgrammierung vom | Quelle: channel9.msdn.com Direktlink direkt öffnen

Jenny Hunter joins Donovan to showcase a new integration inside Azure Policy that enables you to see recent changes to the properties for non-compliant Azure resources. Public preview of the Resource Change History API is also now available.


News Bewertung

Weiterlesen Weiterlesen

Taming Reactive NodeJS: Stream-oriented Architecture with Nest

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Top Stories from the Microsoft DevOps Community – 2019.06.14

Zur Kategorie wechselnProgrammierung vom | Quelle: devblogs.microsoft.com Direktlink direkt öffnen

I’m back home this week in England – and after week in sunny Raleigh-Durham, North Carolina (and before that, a week in even sunnier New Orleans), the cold rain has me stuck inside in the office. But it’s not all bad, as that gives me an opportunity to catch up on some of the great articles written by the Azure DevOps community:

Global DevOps Bootcamp
The Global DevOps Bootcamp is this weekend! Global DevOps Bootcamp is incredible, with DevOps thought leaders around the world coming together to show you how to build modern apps using continuous delivery and DevOps practices. Are you ready? Have you signed up for one of the events near you?

Azure Pipelines – Git checkout step fails with cannot lock ref error
One of git’s leaky abstractions is that it sometimes uses the filesystem to store branch names. That means that you can have different behavior – and even errors – if you mix capitalization of branch names on a case insensitive platform like Windows. Utkarsh Shigihalli explains the problem, how to fix it and how to configure Azure Repos so that you never have the problem again.

End-to-end Pull Request on Azure DevOps
Are you using all the features of pull requests in Azure Repos? Olivier Léger provides an incredibly thorough deep dive into them, including how to set up policies, tying them in with pipelines, merging them, build triggers, and more.

Azure DevOps: Build pipelines for Arduino microcontrollers
It’s clear that whether you’re building web apps, desktop apps or mobile apps, you should have a modern build and release pipeline for maximum productivity and safety. But what about something a little more exotic? Roberto Peña shows you how to create a pipeline for an Arduino device.

Workspace management tips for TFVC
Using TFVC instead of Git? No problem, a centralized version control system is the best choice for many workflows. But are you using it as effectively as you could? Jessie Houwing explains how to set up individual workspaces and best practices for using them for maximum efficiency.

As always, if you’ve written an article about Azure DevOps or find some great content about DevOps on Azure then let me know! I’m @ethomson on Twitter.

The post Top Stories from the Microsoft DevOps Community – 2019.06.14 appeared first on Azure DevOps Blog.


News Bewertung

Weiterlesen Weiterlesen

4 Argumente für eine mobile Optimierung

Zur Kategorie wechselnProgrammierung vom | Quelle: thinkwithgoogle.com Direktlink direkt öffnen

4 Argumente für eine mobile Optimierung
News Bewertung

Weiterlesen Weiterlesen

5 Argumente für eine mobile Optimierung

Zur Kategorie wechselnProgrammierung vom | Quelle: thinkwithgoogle.com Direktlink direkt öffnen

5 Argumente für eine mobile Optimierung
News Bewertung

Weiterlesen Weiterlesen

Getting Started with VueJS and WordPress

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Fast and Beautiful Modern Image Delivery Techniques

Zur Kategorie wechselnProgrammierung vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Announcing Entity Framework Core 3.0 Preview 6 and Entity Framework 6.3 Preview 6

Zur Kategorie wechselnProgrammierung vom | Quelle: devblogs.microsoft.com Direktlink direkt öffnen

New previews of the next versions of EF Core and EF 6 are now available on NuGet.Org.

What is new in EF Core 3.0 Preview 6

In recent months, a lot of our efforts have been focused on a new LINQ implementation for EF Core 3.0. Although the work isn’t complete and a lot of the intended functionality hasn’t been enabled, before preview 6 we reached a point in which we couldn’t make more progress without integrating the new implementation into the codebase in the main branch.

Query changes

IMPORTANT: Although as always, we want to encourage you to experiment with our preview bits in a controlled environment and to provide feedback, preview 6 has significant limitations in the LINQ implementation that we expect to affect any application that performs all but the most trivial queries. Given this, we want to explicitly recommend you against trying to update any applications you have in production to this preview.

While some of the limitations are caused by intentional breaking changes, a lot more are temporary issues we expect to fix before RTM.

These are some of the main things to know:

  • Temporary limitation: In-memory database and Cosmos DB providers aren’t functional in this preview: In the initial phase of the switch to the new implementation, we have prioritized getting our relational providers working. Functionality with in-memory database and Cosmos DB providers is broken, and we recommend you skip preview 6 if you have code that depends on these providers. We expect to gradually restore functionality in subsequent previews.
  • Temporary limitation: Several areas of query translation aren’t working with relational databases: Queries that use any of these constructs will very likely fail to translate correctly or execute:
    • Owned types
    • Collections reference on projections
    • GroupBy operator
    • Equality comparisons between entities
    • Query tags
    • Global query filters
  • Intentional breaking change: LINQ queries are no longer evaluated on the client: This is actually one of the main motivations we had for building a new LINQ implementation into EF Core 3.0. Before this version of EF Core, expressions in the query that could not be translated for SQL would be automatically evaluated on the client, regardless of their location in the query. This contributed to hard to predict performance issues, especially when expressions used in predicates were not translated and large amounts of data ended up being filtered on the client, and also caused compatibility problems every time we introduced new translation capabilities. In the new implementation, we only support evaluating on the client expressions in the top-level projection of the query. Read the full description of this breaking change in our documentation.
  • Intentional breaking change: Existing FromSql overloads has been renamed to FromSqlRaw and FromSqlInterpolated, and can only be used at the root of queries: Read more details about it in the breaking change documentation.

If you run into any issues that you don’t see in this list or in the list of bugs already tracked for 3.0, please report it on GitHub.

If you hit limitations only in a few queries, here are some workarounds that you might be able to use to get things working:

  • Switch explicitly to client evaluation if you need to filter data based on an expression that cannot be translated to SQL, using the AsEnumerable() or ToList() extension methods. For example, the following query will no longer work in EF Core 3.0 because one of the predicates in the where clause requires client evaluation:
    var specialCustomers = context.Customers
      .Where(c => c.Name.StartsWith(n) && IsSpecialCustomer(c));

    But if you know it is ok to perform part of the filtering on the client, you can rewrite this as:
    var specialCustomers = context.Customers
      .Where(c => c.Name.StartsWith(n))
      .AsEnumerable()
      .Where(c => IsSpecialCustomer(c));
  • Use the new FromSqlRaw() or FromSqlInterpolated() methods to provide your own SQL translations for anything that isn’t yet supported.
  • Skip preview 6 and stay on preview 5 until more issues are fixed, or try our nightly builds.

Switch to Microsoft.Data.SqlClient

As announced recently, development of the ADO.NET provider for SQL Server has moved to this new package. The EF Core provider for SQL Server now uses the new package to connect to SQL Server databases.

Please continue to create issues for the EF Core layer (for example SQL generation) on the EF Core issue tracker. Any issues related to SQL Server database connectivity are better reported to the SqlClient issue tracker.

DbContext scaffolding improvements

We now have support for:

  • Scaffolding entities without keys.
  • Scaffolding entities from database views.
  • Scaffolding DbContext from an Azure SQL Data Warehouse.
  • A new dotnet ef dbcontext script command to generate the SQL script equivalent to calling EnsureCreated().
  • New Package Manager Console command functionality in Get-DbContext for listing DbContext types available in an application.

Thank you very much @ErickEJ for all these contributions! You rock!

What’s new in EF 6.3 Preview 6

Here are some of the main changes since preview 5:

  • We automatically locate System.Data.SqlClient when it isn’t registered with DbProviderFactories: This means it’s no longer necessary to register SqlClient as a workaround before you start using EF.
  • EF 6 tests are passing on .NET Core: We made infrastructure updates necessary to get our existing tests running on .NET Core. This has allowed us to identify and fix problems in the product code as well as an issue that was fixed in .NET Core 3.0 Preview 6. There is a known issue with the translation of String methods like StartsWith, EndsWith and Contains that wasn’t fixed on time for Preview 6.

What’s next

For upcoming previews and the rest of the EF Core 3.0 release, our main focus will be on restoring and improving the query functionality using our new LINQ implementation.

We are also working to enable more aspects of the experience you would expect from using EF 6.3 on .NET Core. For example, we are making additional changes to simplify working when an application .config file isn’t present, enabling embedding metadata from an EDMX into the compilation output on .NET Core, and reimplementing the EF migration commands in a way that is compatible with .NET Core.

Weekly status updates

If you’d like to track our progress more closely, we now publish weekly status updates to GitHub. We also post these status updates to our Twitter account, @efmagicunicorns.

Thank you

As always, thank you for trying our preview bits, and thanks to all the contributors that helped in this preview!

The post Announcing Entity Framework Core 3.0 Preview 6 and Entity Framework 6.3 Preview 6 appeared first on .NET Blog.


News Bewertung

Weiterlesen Weiterlesen

Visual Studio 2019 for Mac version 8.1 is now available (and a Preview for 8.2)

Zur Kategorie wechselnProgrammierung vom | Quelle: devblogs.microsoft.com Direktlink direkt öffnen

Todaywe are excited to announce the release of Visual Studio 2019 for Mac version 8.1 along with the first preview of Visual Studio 2019 for Mac version 8.2. Both releases contain exciting new features as well as improvements to performance and stability across the IDE. You can download the latest update on the Visual Studio download page or update an existing installation via the Updater within Visual Studio for MacYou can find release notes for both the stable and preview releases on our Release Notes page. We’ve also updated our Roadmap to give you a look at whatcoming over the next 3 months in versions 8.2 and beyond – including updated web editors, support for projects using multiple target frameworks, and solution-level NuGet package management! 

Visual Studio 2019 for Mac version 8.1 

Version 8.1 continues to expand on the improvements we’ve brought to Visual Studio for Mac with new features added to the C# code editor as well as new ASP.NET Core templates.  

The new editor, which was initially announced as a preview feature in Visual Studio 2019 for Mac version 8.0is now the default editing experience for C# filesThe new editor features an updatedfully native UI built on top of the reliable Visual Studio foundation. You’ll find several additional features that close the gap between the old and new editor in addition to some that were explicitly requested by the Visual Studio for Mac user community. These features include: 

  • Faster code generation through code snippets 
  • Improved analyzer functionality with inline lightbulbs 
  • Improved multicaret functionality 
  • Quick navigation via Document Outline and an improved Go to Line implementation  
  • Faster editing with drag and drop across views 

One of the most requested features from our users was the ability to utilize code snippets within a C# file. They’re a great way to quickly add blocks of common code to your project, such as properties and constructors, by leveraging the power of IntelliSense. Visual Studio for Mac now contains dozens of built-in snippets and allows you to easily expand the default library with custom ones using the Code Snippets editor within Preferences.  

Another feature we’ve added to help increase your coding efficiency is inline lightbulbs for C# projects.  For cases where you’re looking for alternative code suggestions or trying to find that code error that stops your code from building, inline lightbulbs help you refine your code and quickly detect errors in real-timeAll it takes to apply a suggested fix is a few clicks of the mouseallowing you to quickly get back to codingAnd because the logic powering these suggestions is shared with Visual Studio on Windows, you’ll always be up to date and have support for the latest analyzers.  

The latest version also brings improved navigation and editing shortcuts, such as the Document Outline and a brand-new Go to Line implementation. The new editor also supports the ability to drag and drop code across files within your project. All these improvements have been implemented with your improved productivity as our primary focus, empowering you to write better code, faster. 

In addition to the new C# editor features, you can now edit Android layout files side-by-side with a real-time designer view. This experience allows you to see changes you make to an Android layout file on the fly as you are editing, greatly improving the efficiency while editing these files. 

Finallywe’ve introduced a handful of improvements to performance and stability, updated ASP.NET Core project templates, and refined the component selection process at install based on your feedback. 

Visual Studio 2019 for Mac version 8.2 Preview 

As we mentioned earlier in this post, today we’re also releasing the first preview of Visual Studio 2019 for Mac version 8.2. In order to use the 8.2 Preview, you can easily switch to the Preview channel within Visual Studio for Mac. 

Improved XAML Editing Experience 

The 8.2 Preview release introduces new XAML and AXML editing experiences based on the same core as the new C# editor as well as the XAML language service from Visual Studio on Windows. These components provide improved XAML and AXML editing experiences, including more accurate and powerful IntelliSense, faster performance, better matching, improved linting, and an overall increase in the reliability of the editing experience. You can enable the new XAML editor via Visual Studio > Preferences > Text Editor > Behavior > XAML and selecting “Enable new XAML language service”.

One of the advantages of the new XAML Language Service with Visual Studio for Mac is that you now have access to much improved matching capabilities. For example, completions now support fuzzy matching, substring matching, and CamelCase matching, reducing the time it takes to find keywords without the need to perfectly match casing. Examples of the new matching patterns supported in the XAML editor include: 

  • Substring Matching: Matches will be listed when you type a part of a string, even if it is in the middle of the string. This is a great feature if you recall a section of a command, but not the entire command. Typing “Lay” will match “StackLayout” along with any other string which contains “lay”. 
  • Case Insensitive Matching: If you can’t recall the exact casing of a string you’re trying to find, case insensitive matching will ensure you can still find what you’re looking for. With support for this kind of matching, typing “stack” will match to “StackLayout. 
  • Fuzzy Matching: Typing any portion of a string will provide a list of matching and like matches. If you type “stck”, StackLayout will still appear as an option. 

You’ll also see improvements to suggested completions in a wide variety of scenarios for XAML, including light bulb suggestions and binding, resource, XMLNS, and markup extension completion, allowing you to write code faster and more accurately. 

.NET Core 3 and C# 8 Preview 

At Build 2019, we highlighted the next evolution in the .NET Core ecosystem.NET Core 3With it comes improved performance, streamlined project files, and an updated deployment experience. You can learn more about the new features and fixes offered in .NET Core 3 through the What’s New documentation. 

In addition to .NET Core 3, Visual Studio for Mac 8.2 also offers a preview of support for C# 8. This next generation update of C# continues to improve upon the solid foundation of C# through the integration of language features to help you write powerful code in less time. You can learn more about some of the new features in C# 8 through our documentation. 

Improved Android XML editing experience 

Android layout and resource file editing is now powered by Visual Studio for Mac’s new editorThis means that you will be able to experience all of the rich editing experiences and performance that you see in the C# editor in your Android layout files. These enhancements include improved IntelliSense, go-to-definition, and semantic editing of your files, all within Visual Studio for Mac. 

Download and try today 

We encourage you to download and try out the version 8.1 release todayWe hope this release brings us one step closer to our goal of providing you with the right tools to make .NET development on macOS a breeze.  

We also invite you to try the 8.2 Preview 1 release of Visual Studio 2019 for Mac if you’re interested in benefiting from the new XAML editor and in helping us build a better product by providing feedback and suggestions. As always, if you come across any bugs or issues, please use thReport a Problem feature to help us to improve this new experience and make each release as powerful and reliable as possible. 

The post Visual Studio 2019 for Mac version 8.1 is now available (and a Preview for 8.2) appeared first on The Visual Studio Blog.


News Bewertung

Weiterlesen Weiterlesen

Chrome 76 Beta: dark mode, payments, new PWA features and more

Zur Kategorie wechselnProgrammierung vom | Quelle: blog.chromium.org Direktlink direkt öffnen

Unless otherwise noted, changes described below apply to the newest Chrome Beta channel release for Android, Chrome OS, Linux, macOS, and Windows. Find more information about the features listed here through the provided links or from the list on ChromeStatus.com. Chrome 76 is beta as of June 13, 2019.

Dark mode

Many operating systems now support inverted color schemes with a system setting referred to as ‘dark theme' or ‘dark mode', depending on the system.


The prefers-color-scheme media query allows a website or web app to adopt the preferred display mode of the user. Use the query in your CSS code like so:


@media (prefers-color-scheme: dark) {
body {
color: white;
background-color: black;
}
}


What is left out of this is the explanation? For that, watch our web platform blog for an article titled "Hello Darkness, My Old Friend".

Payments API

Over the last few versions of Chrome we've rolled out a number of improvements to the payments APIs. These APIs provide a way to interact with proprietary payment systems without needing to build your own user interactions. Changes in Chrome 75 included replacing hasEnrolledInstrument() with canMakePayment() and removal of languageCode from the billing address. With the detailsPromise option Chrome 75 gives PaymentRequest.show() a means of performing a quick server call before showing payment details to the buyer.

Chrome 76 brings three changes to the payment realm. Now implemented are features that allow a merchant website or web app to respond when a user changes payment instruments. Additionally, the PaymentRequestEvent has a new method called changePaymentMethod() and the PaymentRequest object now supports an event handler called paymentmethodchange. You can use both to notify a merchant when the user changes payment instruments. The former returns a promise that resolves with a new PaymentRequest instance.

Additionally, Chrome now makes it easier to use the payments APIs for self-signed certificates on the local development environment. To do this, launch Chrome from a command line with the —ignore-certificate-errors flag.

For detailed information about these features, read Web Payments Updates.

Improvements for Progressive Web Apps

Install Progressive Web Apps on the desktop with ease

On desktop, there is typically no indication to a user that a Progressive Web App is installable, and if it is, the install flow is hidden within the three dot menu.

In Chrome 76, we're making it easier for users to install Progressive Web Apps on the desktop by adding an install button to the omnibox.


If a site meets the Progressive Web App installability criteria, Chrome shows an install icon in the omnibox. There is no extra work required from developers. Clicking the button prompts the user to install the PWA.

Control the Add to Home Screen mini-infobar

In Chrome 76, we're giving you control over the add to home screen mini-infobar.




Chrome shows the mini-infobar the first time a user visits a site that meets the Progressive Web App installability criteria. Developers want to prevent the mini-infobar from appearing, and provide their own install promotion instead.

To do this, listen for the beforeinstallprompt event, and call preventDefault()
on it. Then, update your UI to notify the user by adding an install button or other element. Depending on your app, there are several different patterns you can use to promote installation of your PWA.

The add to home screen mini-infobar is still a temporary measure. We are experimenting with new UI patterns for giving Progressive Web App users the ability to install, and do this in a way that reduces clutter in the browsing experience.

Updating WebAPKs more frequently

When a PWA is installed on Android, Chrome automatically requests and installs a WebAPK. Chrome periodically checks to see if the manifest has changed, and if a new WebAPK is required. Starting in Chrome 76, Chrome will check the manifest more frequently: checking every day, instead of every three days. If any of the key properties have changed, Chrome will request and install a new WebAPK.

Other features in this release

Animation.updatePlaybackRate

Adds Animation.updatePlaybackRate(), which lets you seamlessly transition the playback rate of an animation such that there is no visible jump in the animation. Current time is preserved at the instance the new playback rate takes effect.

Async clipboard: read and write images

Implements programmatic copying and pasting of images for the Async Clipboard API. This change also updates navigator.clipboard.read() and navigator.clipboard.write() to comply with the specification. Programmatic copying and pasting of images is Chromium's top starred bug.

Escape key is not a user activation

The escape key is no longer treated as a user activation. Browsers prevent calls to abusable APIs (like popup, fullscreen, vibrate, etc.) unless the user activates the page through direct interactions. Not all interactions trigger user activation. For example, clicking on a link or typing in a textbox does, but swiping fingers on a screen or hovering with the mouse cursor does not. Since users never intend to interact with the page through the escape key, it should not trigger user activation.

Fetch Metadata

Introduces a new HTTP request header that sends additional metadata about a request's provenance (is it cross-site, is it triggered from <img>, etc.) to the server to allow it to make security decisions which might mitigate some kinds of attacks based on timing the server's response (XSS leaks and others).

For example, it is unlikely that a bank's "Transfer all money" endpoint would be referenced from an <img> tag, and likewise unlikely that evil.com is going to be making any legitimate requests whatsoever. Ideally, the server could reject these requests a priori rather than deliver them to the application backend.

form.requestSubmit()

Adds the form.requestSubmit() function, which requests form submission. It includes interactive constraint validation, dispatches a submit event, and takes a reference to the submitter button.

ImageCapture support for focusDistance constraint

The Image Capture API provides a means to set the focusMode to manual which is not useful if you cannot set the focus distance. This change provides an interface for getting focus range values and setting focus distance value.

Implement Animation.pending

Adds the pending attribute to the Web Animations API. A pending animation is one that is waiting on an asynchronous operation that affects the play state. Adding support for this attribute does not affect the rendering or timing of animations, but simply exposes the signal.

IndexedDB transaction explicit commit API call

Adds a commit() function to IDBTransaction objects, which explicitly marks a transaction as not accepting further requests. Currently, IndexedDB only commits a transaction after all associated requests have had their completion event handlers executed, and no new requests have been queued by the event handlers. Developers can use the explicit commit() function to shave a few event loop cycles off of the latency of their transactions.

The primary benefit of explicit commit is that it increases the throughput of read and write requests made on an object store. This is a clear performance benefit in terms of the rate at which operations can be processed. Additionally, the increase in speed is advantageous because it adds stability to IndexedDB by reducing the probability that a disruptive event occurs within the lifetime of a transaction.

JavaScript

DateTimeFormat dateStyle and timeStyle
Adds dateStyle and timeStyle options to functions on Intl.DateTimeFormat, specifically formatToParts() and resolveOptions(). These options provide a compact way to request the appropriate, locale-specific date and time of given length styles.

Locale sensitive BigInt.prototype.toLocaleString and allow Intl.NumberFormat format/formatToParts to take BigInt.
Changes BigInt.prototype.toLocaleString() to locale-sensitive number formatting and changes Intl.NumberFormat.prototype.format() and formatToParts() to accept BigInt as input.

Media capabilities in workers

Enables the Media Capabilities API in all types of workers to help website and web apps pick the best media to stream from a worker. The information can then be used to create the MediaStream from a worker.

Promise.allSettled

Adds Promise.allSettled(), which returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, in other words after it has either resolved or rejected.

Simpler reading methods for Blob interface

Adds three new methods to the Blob interface to perform read operations: text(), arrayBuffer(), and stream().

WebRTC

RTCSctpTransport
Exposes information about the SCTP transport that is used to carry WebRTC data channels such as max-message-size and max channels.

RTCRtpSender.setStreams
Allows changing the association between the track associated with an RTCRtpSender and streams. Stream association causes tracks in the same stream to be synchronized. This is useful, for example, if during a call a user switches from a front-facing camera to a back-facing camera and the application uses RTCRtpSender.replaceTrack(). On the receiving end the new track must be associated with the existing stream and synchronized with its auto track.

RTCRtpTransceiver.setCodecPreferences()
Adds the setCodecPreferences() method, which overrides the default codec preferences used by the user agent. This allows applications to disable the negotiation of specific codecs. It also allows an application to cause a remote peer to prefer the codec that appears first in the list for sending.

white-space: break-spaces

The white-space:break-spaces value allows authors to specify that any sequence of preserved white space that would otherwise overflow a line and hang (as per the CSS Text Module specification's Trimming and Positioning rules) must be broken.

Removals

Remove feature policy: lazyload

The lazyload feature policy was intended to allow developers to selectively control the lazyload attribute on the <iframe> and <img> tags to provide more control over loading delay for embedded contents and images on a per origin basis.

The policy is removed in favor of a newer feature policy for loading, namely loading-frame-default-eager which is more aligned with how the loading attribute will be used. The removal applies to both the Feature-Policy header and the <iframe> allow attribute.

Remove outputs from MediaStreamAudioDestinationNode

According to the specification, the MediaStreamAudioDestinationNode in the Web Audio API should have no outputs. Chrome's implementation has a single output which has been removed.

Remove insecure usage of DeviceMotionEvent

Chromium has been showing deprecation warnings since 2015 whenever the API is used in a non-secure browsing context. Chrome now restricts the API to secure browsing contexts. This change brings Chromium's implementation in line with the privacy and security recommendations in the specification, and is aligned with the effort to deprecate powerful features on insecure origins.
News Bewertung

Weiterlesen Weiterlesen

Prism Modules for Xamarin.Forms | The Xamarin Show

Zur Kategorie wechselnVideo | Youtube vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Prism Modules for Xamarin.Forms | The Xamarin Show | The Xamarin Show

Zur Kategorie wechselnProgrammierung vom | Quelle: channel9.msdn.com Direktlink direkt öffnen

This week, James is joined by Dan Siegel, Microsoft MVP and Prism maintainer, who shows us a super cool feature of Prism for Xamarin.Forms to create modular apps. He shows how to create a modular application that is divided into a set of loosely coupled functional units (named modules) that can be integrated into a larger application.

Show Links:

Useful Links:

News Bewertung

Weiterlesen Weiterlesen

Try the new System.Text.Json APIs

Zur Kategorie wechselnProgrammierung vom | Quelle: devblogs.microsoft.com Direktlink direkt öffnen

For .NET Core 3.0, we’re shipping a brand new namespace called System.Text.Json with support for a reader/writer, a document object model (DOM), and a serializer. In this blog post, I’m telling you why we built it, how it works, and how you can try it.

We also have a video:

Getting the new JSON library

  • If you’re targeting .NET Core. Install the latest version of the .NET Core 3.0 preview. This gives you the new JSON library and the ASP.NET Core integration.
  • If you’re targeting .NET Standard or .NET Framework. Install the System.Text.Json NuGet package. In order to get the integration with ASP.NET Core, you must target .NET Core 3.0.

The future of JSON in .NET Core 3.0

JSON has become an essential part of virtually all modern .NET applications and in many cases even surpassed the usage of XML. However, .NET hasn’t had a (great) built-in way to deal with JSON. Instead, we’ve relied on Json.NET until now, which continues to serve the .NET ecosystem well.

We’ve decided that we needed to build a new JSON library:

  • Provide high-performance JSON APIs. We needed a new set of JSON APIs that are highly tuned for performance by using Span<T> and can process UTF-8 directly without having to transcode to UTF-16 string instances. Both aspects are critical for ASP.NET Core, where throughput is a key requirement. We considered contributing changes to Json.NET, but this was deemed close to impossible without either breaking existing Json.NET customers or compromising on the performance we could achieve. With System.Text.Json, we were able to gain 1.3x – 5x speed up, depending on the scenario (see below for more details). And we believe we can still squeeze out more.
  • Remove Json.NET dependency from ASP.NET Core. Today, ASP.NET Core has a dependency on Json.NET. While this provides a tight integration between ASP.NET Core and Json.NET, it also means the version of Json.NET is dictated by the underlying platform. However, Json.NET is frequently updated and application developers often want to — or even have to — use a specific version. Thus, we want to remove the Json.NET dependency from ASP.NET Core 3.0, so that customers can choose which version to use, without fearing they might accidentally break the underlying platform.
  • Provide an ASP.NET Core integration package for Json.NET. Json.NET has basically become the Swiss Army knife of JSON processing in .NET. It provides many options and facilities that allow customers to handle their JSON needs with ease. We don’t want to compromise on the Json.NET support customers are getting today. For example, the ability to configure the JSON serialization in ASP.NET Core via the AddJsonOptions extension method. Thus, we want to provide the Json.NET integration for ASP.NET Core as a NuGet package that developers can optionally install, so they get all the bells and whistles they get from Json.NET today. The other part of this work item is to ensure we have the right extension points so that other parties can provide similar integration packages for their JSON library of choice.

For more details on the motivation and how it relates to Json.NET, take a look at the announcement we made back in October.

Using System.Text.Json directly

For all the samples, make sure you import the following two namespaces:

Using the serializer

The System.Text.Json serializer can read and write JSON asynchronously and is optimized for UTF-8 text, making it ideal for REST API and back-end applications.

By default, we produce minified JSON. If you want to produce something that is human readable, you can pass in an instance of JsonSerializerOptions to the serializer. This is also the way you configure other settings, such as handling of comments, trailing commas, and naming policies.

Deserialization works similarly:

We also support asynchronous serialization and deserialization:

You can also use custom attributes to control serialization behavior, for example, ignoring properties and specifying the name of the property in the JSON:

We currently don’t have support for F# specific behaviors (such as discriminated unions and record types), but we plan on adding this in the future.

Using the DOM

Sometimes you don’t want to deserialize a JSON payload, but you still want structured access to its contents. For example, let’s say we have a collection of temperatures and want to average out the temperatures on Mondays:

The JsonDocument class allows you to access the individual properties and values quite easily.

Using the writer

The writer is straight forward to use:

The reader requires you to switch on the token type:

Integration with ASP.NET Core

Most use of JSON inside of ASP.NET Core is provided via the automatic serialization when accepting or returning object payloads, which in turn means that most of your application’s code is agnostic to which JSON library ASP.NET Core is using. That makes it easy to switch from one to another.

You can see the details on how you can enable the new JSON library in MVC and SignalR later on in this post.

Integration with ASP.NET Core MVC

In Preview 5, ASP.NET Core MVC added support for reading and writing JSON using System.Text.Json. Starting with Preview 6, the new JSON library is used by default for serializing and deserializing JSON payloads.

Options for the serializer can be configured using MvcOptions:

If you’d like to switch back to the previous default of using Newtonsoft.Json, do the following:

  1. Install the Microsoft.AspNetCore.Mvc.NewtonsoftJson NuGet package.
  2. In ConfigureServices() add a call to AddNewtonsoftJson()

Known issues

  • Support for OpenAPI / Swagger when using System.Text.Json is ongoing and unlikely to be available as part of the 3.0 release.

Integration with SignalR

System.Text.Json is now the default Hub Protocol used by SignalR clients and servers starting in ASP.NET Core 3.0 Preview 5.

If you’d like to switch back to the previous default of using Newtonsoft.Json, then you can do so on both the client and server.

  1. Install the Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson NuGet package.
  2. On the client add .AddNewtonsoftJsonProtocol() to the HubConnectionBuilder:
  3. On the server add .AddNewtonsoftJsonProtocol() to the AddSignalR() call:

Performance

Since this feature is heavily motivated by performance, we’d like to share some high-level performance characteristics of the new APIs.

Please keep in mind that these are based on preview builds and the final numbers will most likely differ. We’re also still tweaking default behaviors which will affect performance (for example, case sensitivity). Please note that these are micro benchmarks. Your mileage will most certainly differ, so if performance is critical for you, make sure to make your own measurements for scenarios that best represent your workload. If you encounter scenarios you’d like us to optimize further, please file a bug.

Raw System.Text.Json

Just doing micro benchmarks to compare System.Text.Json with Json.NET yields the following output:

Scenario Speed Memory
Deserialization 2x faster Parity or lower
Serialization 1.5x faster Parity or lower
Document (read-only) 3-5x faster ~Allocation free for sizes < 1 MB
Reader 2-3x faster ~Allocation free (until you materialize values)
Writer 1.3-1.6x faster ~Allocation free

 

System.Text.Json in ASP.NET Core MVC

We’ve written an ASP.NET Core app that generates data on the fly that is then serialized and deserialized from MVC controllers. We then varied the payload sizes and measured the results:

JSON deserialization (input)

Description RPS CPU (%) Memory (MB)
Newtonsoft.Json – 500 B 136,435 95 172
System.Text.Json – 500 B 167,861 94 169
Newtonsoft.Json – 2.4 KB 97,137 97 174
System.Text.Json – 2.4 KB 132,026 96 169
Newtonsoft.Json – 40 KB 7,712 88 212
System.Text.Json – 40 KB 16,625 96 193

 

JSON serialization (output)

Description RPS CPU (%) Memory (MB)
Newtonsoft.Json – 500 B 120,273 94 174
System.Text.Json – 500 B 145,631 94 173
Newtonsoft.Json – 8 KB 35,408 98 187
System.Text.Json – 8 KB 56,424 97 184
Newtonsoft.Json – 40 KB 8,416 99 202
System.Text.Json – 40 KB 14,848 98 197

 

For the most common payload sizes, System.Text.Json offers about 20% throughput increase in MVC during input and output formatting with a smaller memory footprint.

Summary

In .NET Core 3.0, we’ll ship the new System.Text.Json APIs, which provide built-in support for JSON, including reader/writer, read-only DOM, and serializer/deserializer. The primary goal was performance and we see typical speedups of up to 2x over Json.NET, but it depends on your scenario and your payload, so make sure you measure what’s important to you.

ASP.NET Core 3.0 includes support for System.Text.Json, which is enabled by default.

Give System.Text.Json a try and send us feedback!

{"happy": "coding!"}

The post Try the new System.Text.Json APIs appeared first on .NET Blog.


News Bewertung

Weiterlesen Weiterlesen

XAML Islands v1 – Updates and Roadmap

Zur Kategorie wechselnProgrammierung vom | Quelle: blogs.windows.com Direktlink direkt öffnen

At Microsoft Build, we announced that the Windows 10 May 2019 Update (version 1903) would include XAML Islands v1.

Below you can find more details on the roadmap and two workstreams in progress to complete the developer experience: the .NET wrappers and Visual Studio 2019 support.

What are XAML Islands?

XAML Islands enable .NET and native Win32 applications to host UWP XAML controls. You can enhance the experience and functionality of your existing desktop applications with the latest UI innovations previously only available for UWP apps. For example, you can use the UWP XAML controls such as ColorPicker, InkCanvas, CalendarView, and NavigationView in your existing C++ Win32, Windows Forms, and WPF applications.

With XAML Islands you can modernize your app at your own pace without having to rewrite your app–just use the UWP XAML controls.

How can I use XAML Islands?

The first component is the UWP XAML hosting API. This is a set of Windows 10 APIs (Windows Runtime classes and COM interfaces) that are shipped within the Windows 10 version 1903. If you have a native C++ Win32 app that is using the Common Controls library (Comctl32.dll) or MFC and you need to modernize your UI, use these APIs.

The second component consists of the .NET wrapped controls and the host controls. Those are a set of UWP XAML hosting API wrappers in the Windows Community Toolkit for both Windows Forms and WPF developers.

What are the requirements for using XAML Islands in my application?

  • Windows 10 version 1903 and above: Regardless you have a native Win32 app or a .NET app, this first version of XAML Islands only works on apps running in the Windows 10 version 1903 and above.
  • Windows 10 SDK version 1903 (10.0.18362): This SDK provides the headers, libraries, metadata, and tools for building Windows 10 apps with XAML Islands.
  • Packaged desktop app: Desktop apps can be packaged into a MSIX to access certain Windows 10 APIs like live tiles and notifications. To package your desktop app you should use the Windows Application Packaging Project. Packaging your app doesn’t mean that your desktop app will run in the UWP reduced-privileged sandbox. Instead, your packaged Win32 app will run in a full-trust process. Packaged apps with XAML Islands will have a streamlined developer experience with Visual Studio 2019.

Note: Unpackaged apps will have a limited support in this release, but some scenarios will be possible.

  • Visual Studio 2019: Only Visual Studio 2019 will have the toolchain necessary for building desktop apps with XAML Islands.
  • .NET Core 3.0: This environment is fully supported for .NET apps. Some scenarios will also work in apps that target the .NET Framework 4.7.2, but there are some limitations for these apps, for example consuming managed 3rd party controls.

What versions of .NET Core and .NET Framework can I target with XAML Islands?

The .NET wrapped controls are supported in .NET Framework and .NET Core 3. The .NET host control (WindowsXamlHost) is available for Windows Forms and WPF. This control allows you to host UWP XAML content. If the UWP XAML content is a control that ships with the Windows 10 platform such as ColorPicker or NavigationView, you can target the .NET Framework 4.7.2 or NET Core 3.

If the UWP XAML content is a UWP user control that is implemented in a 3rd party WinRT component, the version of .NET you can target depends on how the user control was developed. A user control is considered a 3rd party WinRT component if it is defined in one of these ways: in a separate UWP project, in a Nuget Package, or via a link to file.

3P WinRT component vs. desktop host app.

  • If the 3rd party WinRT component is native (written in C++/WinRT), the user control can be consumed by both .NET Framework 4.7.2 and the NET Core 3.
  • If the 3rd party WinRT component is managed (for example, written in C#), the user control can be consumed only by .NET Core 3. The full .NET Framework is not fully supported in this scenario, and it requires some cross compilation to work at all.

This is the matrix of platform support for XAML Islands v1:

Chart showing platform support for XAML Islands v1.

If your app targets .NET Core 3, regardless of whether the 3rd party WinRT component you are hosting is native or managed, you will get a streamlined developer experience. If your app targets the full .NET Framework, you will get a streamlined developer experience only if your 3rd party WinRT component is native.

How can I use XAML Islands in my native C++ Win32 app?

If you’re a C++ developer, you need to use the UWP XAML hosting APIs. These are some basic steps:

  1. First initializes the UWP XAML framework in the current thread (you can use thestatic InitializeForCurrentThreadmethod of the WindowsXamlManager class).
  2. Create a DesktopWindowXamlSource object that requires the HWND of your app. The DesktopWindowXamlSource will create a ChildWindow where you can place the XAML content.
  3. You need to take care of the keyboard focus when users navigate into and out of the XAML Islands. This DesktopWindowXamlSource object exposes event for routing keyboard focus navigation.

You can find more details at: https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/using-the-xaml-hosting-api

How can I use XAML Islands in my .NET App?

The Windows Community Toolkit version 6.0.0 (in preview right now) provides several NuGet packages for Windows Forms and WPF that you can add to your project.

The WindowXamlHost control is a host control in which you can host all kinds of UWP XAML content.

The wrapped controls wrap most of the events and properties of a small set of specific UWP controls into WPF and Windows Forms controls. These wrapped controls are designed to be used as regular Windows Forms and WPF controls so you don’t need to understand UWP concepts. Currently we provide these wrapped controls:

  • InkCanvas wraps the UWP InkCanvas and InkToolbar and provides a surface and toolbars for Ink-based user interaction.
  • MediaPlayerElement enables your .NET apps to use modern audio and video codecs and provide better performance for streaming and rendering media content.
  • MapControl enables you to use the latest innovations from the mapping platform in your apps, such as more photorealistic maps.
  • SwapChainPanel (preview) enables you to add DirectX 12 content in your app.

What modern web view controls are available to desktop applications?

Windows Forms and WPF apps use the WebBrowser control, which uses the Internet Explorer rendering engine and therefore lacks support for HTML5 and other features. The Windows Community Toolkit contains a Windows Forms and WPF wrapper for the UWP WebView control that uses Edge as the rendering engine, so these apps can host web content that requires HTML5.

The Windows Community Toolkit also contains the WebViewCompatible control. This control uses either the WebBrowser or the WebView rendering engine, depending on the version of Windows the app is running on:

  • Apps running on Windows 10, version 1803 and later will use the current WebView rendering engine.
  • Apps running on earlier versions of Windows, like Windows 8.1, will use the older WebBrowser rendering engine.

Are the XAML Islands using a different thread?

No. XAML Islands run on the same UI thread of your desktop app. You can access all the UWP XAML objects from your code behind without doing any marshalling. This is different from Windows Forms and WPF hosted technologies.

Any samples?

XAML Islands Lab is a comprehensive lab that provides step-by-step instructions for using the wrapped controls and host controls in the Windows Community Toolkit to add UWP controls to an existing WPF line-of-business application. This lab includes the complete code for the WPF application as well as detailed instructions for each step in the process.

This C++ Win32 Sample demonstrates a complete implementation of hosting a UWP user control in an unpackaged C++ Win32 application (that is, an application that is not built into an MSIX package).

For a WPF .NET Core 3 app that consumes a UWP project within a User Control you can use this one:

The Windows community Toolkit contains demos to validate the wrapped control and the host control.

What is your roadmap for XAML Islands v1?

1. Windows 10 May 2019 update contains the first release of XAML Islands (v1).

2. The Windows Community Toolkit, v6.0, will contain the WindowsXamlHost and wrapped controls for the .NET Framework.

  • This is planned for this Summer of 2019.
  • There will be a preview of v6.1 that will contain the .NET Core 3 version of the WindowsXamlHost and the wrapped controls. This update will be released to align with the .NET Core 3 release – the second half of 2019.

3. Visual Studio 2019 will get an update in the second half of 2019, aligned with the release of .NET Core 3 that will support XAML Islands v1. Remember that only packaged apps will get a streamlined developer experience.

What is your roadmap for XAML Islands v2?

XAML Islands v2 is intended to ship as a part of WinUI 3.0. Therefore, v2 will support the same Windows 10 versions as WinUI 3.0. We are planning to release v3 major release of WinUI during the first half of 2020. WinUI is an open source project, and you can follow  the latest roadmap and news at: https://github.com/microsoft/microsoft-ui-xaml/blob/master/docs/roadmap.md

What are the best ways for me to give you feedback about XAML Islands?

The post XAML Islands v1 – Updates and Roadmap appeared first on Windows Developer Blog.


News Bewertung

Weiterlesen Weiterlesen

Customers get unmatched security with Windows Server and SQL Server workloads in Azure

Zur Kategorie wechselnProgrammierung vom | Quelle: azure.microsoft.com Direktlink direkt öffnen

Customers such as Allscripts, Chevron, J.B. Hunt, and thousands of others are migrating their important workloads to Azure where they find unmatched security. While understanding cloud security is initially a concern to many, after digging in, customers often tell us the security posture they can set up within Azure is easier to implement and far more comprehensive than what they can provide for in other environments.

Azure delivers multiple layers of security, from the secure foundation in our physical datacenters, to our operational practices, to engineering processes that follow industry standard Mitre guidelines. On top of that, customers can choose from a variety of self-service security services that work for both Azure and on-premises workloads. We employ more than 3,500 cybersecurity professionals and spend $1 billion annually on security to help protect, detect, and respond to threats – delivering security operations that work 24x7x365 for our customers.

Let's look at some examples of how Azure delivers unmatched security for your Windows Server and SQL Server workloads.

The broadest built-in protections across hybrid environments with Azure Security Center

Customers can get the broadest built-in protection available across both cloud and on-premises through Azure Security Center. This includes security recommendations for virtual machines, storage, networking, databases, identity, application services, and IOT – all from a single integrated dashboard.

Azure Security Center leverages the Microsoft Intelligent Security Graph, which collects more than 6.5 trillion signals daily from Microsoft services such as Xbox, Dynamics 365, Office 365, Azure, and our broad partner ecosystem. With Azure Security Center, customers can easily install an agent on Windows Server and get detailed recommendations on which best practices to implement such as installing end-point protection and the latest patches. It also comes with all the capabilities of Microsoft Defender ATP built-in. As a result, you get to tap into our industry-leading threat protection to protect your Windows Server and SQL Server workloads.

Further, Azure Security Center integration will soon be available through Windows Admin Center, a modern Windows Server management solution being used to manage millions of instances today. With a few clicks, you will soon be able secure your Windows Server instances on-premises directly from Windows Admin Center.

Unique platform-level security and governance

Azure’s consistent policy platform makes it easier for you to apply security policies faster across your Windows Server and SQL Server workloads. For every workload you run in Azure, you can easily define a set of security policies and apply them uniformly across your subscriptions or management groups at scale. Using Azure Blueprints, you can literally create a new subscription with all the security settings you need in a few clicks. All of this is possible because Azure has a unique underlying resource management foundation, giving you the confidence that your Windows Server and SQL Server workloads are compliant by design. Best of all, Azure Governance capabilities are available at no additional charge.

Built-in, AI driven Security Information and Event Management (SIEM)

Customers often use SIEM to bring together threat protection information from across the enterprise to enable advanced hunting and threat mitigation. Azure Sentinel is a cloud-native SIEM with built-in AI that enables you to focus on the important threats rather than low fidelity signals. It helps reduce noise drastically—we have seen a reduction of up to 90 percent in alert fatigue from early adopters. It also lets you combine signals from your Windows Server and SQL Server workloads on Azure with all of your other assets including Office 365, on-premises applications, and firewalls to get ahead of bad actors and mitigate threats.

Industry leading confidential computing capabilities

Azure confidential computing offers encryption of data while in use, a protection that has been missing from both on-premises datacenters and public clouds. For certain workloads, it is important to ensure the data is not transparent while it is processed in the CPU. Azure brings this capability through hardware-based enclaves built on top of Intel SGX extensions in the Azure DC series of virtual machines. Microsoft, as the cloud operator, cannot access the data or compute resources inside a secure enclave. Confidential computing also opens up new scenarios like secure block-chain or multi-party machine learning where the data is shared between two parties, but neither has access to the other party’s data due to the secure enclaves. In addition, we have enhanced the Always Encrypted feature in SQL Server 2019 to support secure enclaves and you can build your own applications using this technology with our open SDK.

Unique database security monitoring for your cloud SQL

We use our experience from monitoring more than one million databases over the past few years to offer Advanced Data Security for SQL Database and SQL Server VMs. It includes two key components – vulnerability assessment and Advanced Threat Detection. Vulnerability assessment scans your databases so you can discover, track, and remediate potential database vulnerabilities. Advanced Threat Detection continuously monitors your database for suspicious activities like SQL injection and provides alerts on anomalous database access patterns. Threat alerts and reports from vulnerability assessments also appear in the Azure Security Center threats dashboard.

Free security updates for Windows Server and SQL Server 2008

We understand that customers are still running workloads on SQL Server and Windows Server 2008 and 2008 R2. These versions are approaching end of support in July 2019 and January 2020 respectively. You can automatically get three additional years of free Extended Security Updates if you simply migrate your 2008 and 2008 R2 instances to Azure to ensure they are protected. You can plan your upgrades to newer versions once they are in Azure. Additionally, for SQL Server, you can migrate legacy SQL Server workloads to Azure SQL Database Managed Instances. With this fully managed, version-less service your organization will not face end of support deadlines again.

Get started with Azure for unmatched security in the cloud

Microsoft offers you the training and best practice guidance you need to set up the most powerful protection for your Windows Server and SQL Server workloads in the cloud.

To learn even more best practices on how to take advantage of the built-in tools in Azure to protect your workloads, save the date for the upcoming Azure Security Expert Series webinar coming next Wednesday, June 19, 2019.


News Bewertung

Weiterlesen Weiterlesen

Reduce image size: use srcset to automatically choose the right image

Zur Kategorie wechselnVideo | Youtube vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Try the new System.Text.Json APIs!

Zur Kategorie wechselnVideo | Youtube vom | Quelle: youtube.com Direktlink direkt öffnen


News Bewertung

Weiterlesen Weiterlesen

Seitennavigation

Seite 1 von 87 Seiten (Bei Beitrag 1 - 35)
3.037x Beiträge in dieser Kategorie

Nächste 2 Seite | Letzte Seite

[ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ]