Practice English Speaking&Listening with: An introduction to the unified Azure SDK | Azure Friday

Normal
(0)
Difficulty: 0

Hey friends, you know we've covered

the Azure SDK since the very

first episode of Azure Friday,

and it continues to evolve,

grow, and just get better.

The SDK provides a cohesive developer

experience for interacting with

over 150 offerings across Azure.

Connie Yau is here to give me an update on what's

new with the Azure SDK today on Azure Friday.

Hey friends,

I'm Scott Hanselman and it's Azure Friday.

I'm here with engineer Connie Yau and

we're going to talk about the Azure SDK.

How are you?

Hi, I'm pretty good.

How about yourself?

I'm excited to learn about new

things and I love hanging out

with new friends in Azure Friday,

and I understand that you work

on the Azure SDK team and you're

an engineer who is kind of being

involved in the revamping of

the SDK for Azure services.

And there's a lot of cool things happening.

Oh yeah, totally.

Like most app developers,

when you deploy your app,

you probably have like multiple Azure

services that you integrate with

like storage Key Vault and you know

by the time you deploy your app you

realize that you have to like deploy

thousands of configurations and

understand different ways to authenticate.

So we've tried to make that user

story a lot easier for developers.

There's a lot going on and you really

having having a nice layer on top of

it that makes all of those things cohesive.

So if you know how to use one,

you can kind of guess how to use.

Another is a really great experience.

Oh yeah, definitely,

that's one of our design principles

that we've used like consistency.

So once you know one pattern,

for example, we all use clients,

then you'll know the patterns to add

different Azure services to your application.

I've heard it referred to

as a unified client library,

a lot like unification is a big

part of what Azure SDK stands for.

Yeah, definitely.

Will actually demo this for you,

so is that OK if I share my screen?

Let's see it.

Let's do the demos.

Alright here we go,

what are we looking at?

Alright so here we have this kind

of it's a dummy application but it

kind of gives you an example of

what an app developer might have.

So right here we have.

Cloud clipboard, which stores some clips.

In this case I've entered like

I'm a clip and like hello.

Uh, in addition,

you might want a Key Vault

to hold some of your secrets,

like some connection strings to

a database or so and so forth.

So right now we have, you know,

a secret that I have in my Key Vault,

which is my favorite drink.

But what matters to app developers

is the code behind that,

so I'm just going to show you what

our legacy client library look like,

so this is a class that allows me

to communicate with Key Vault.

And as you can see,

like on this code, I had to search

all over the Internet to figure out

how to authenticate with Key Vaults.

And once I copied this code and

then I added storage on top of it.

I realized I couldn't use

the same methodology.

To authenticate with storage,

so I had to learn something else.

That is a hassle that is confusing,

yes, so one of the features that we

have in our new client library is this

unified way to authenticate with Azure.

So let me just show you here in my new code,

so right here this is all I needed

to do to authenticate with Azure.

Like all of our clients start

with builders in Java,

and so you'll know exactly what to

do when you see our new library.

Go like new builder of some sort and

all you have to do is get this token

credential and this token credential

is backed by our underlying library

Azure identity which all Azure all

our new Azure libraries can use and

not to do is go like new default

Azure credential builder Dot build.

Yeah so based on the environment that

your app is running in it'll actually

figure out the best credentials to use.

So let's say you're a dev.

Just pressing F5 in Visual Studio,

it can use your Visual Studio credentials

to log into Azure so you don't have

to copy and paste some special like

service principal client to save.

Wow, so it actually knows the

context in which you're running.

Yeah,

So what it does is like the first thing

it does is tries to see if you're in

a magic managed service identity and

then if not it checks for a service

principle and then if not it'll go

and check other things like it can do

interactive browsing to like log in.

Or does Visual Studio or elsewhere does

Azure CLI like looks for eventual there?

Wow that's cool and I see that from

an object oriented programming

perspective you're using kind of like

provider model and I'm I'm wrecking.

Like I'm looking at this Java code

and I'm thinking this would work

in C# and this could work in

other languages with this model.

Be familiar if I moved to other languages.

Yeah,

so in C# you would also

see a default Azure credential.

So like if you're a polyglot and you

have other services in different languages,

you'd know exactly like that.

You could use exact same classes

and the exact same packages,

because one of the things we tried

to do is make sure that if you have a

feature in one library you also have

that feature in another language.

This seems like it would be really

cool for polyglot,

not just pulling out people,

but polyglot organizations,

particularly ones that use microservices.

And they're having all these services

talking to each other and then talking

to all the different Azure services.

Definitely one of the things

we also improved on is

people complain about docks a lot,

so we've improved that story a lot.

We have a ton of samples

that we can show you.

So if you go to like a dot Ms.

Azure SDK, you'll find a lot of

samples that we've included,

so it gets people get getting started easier.

That's great, fantastic.

Good documentation is fundamental

for this kind of stuff.

Yeah, definitely.

OK, cool what's next?

Oh well, I was going to show you

another cool thing that I liked about

our new client libraries is that

all the classes implement our common

Azure core so let's say pagination

is a common thing like you want to

list your secrets or list clips.

You can use the same classes and the same.

I guess methodology to

go through those clips,

so if you notice all of our paginate,

all our paged calls use paged flux.

So you can apply the same learnings

when you go and like move to

storage or schema registry to

use the exact same knowledge.

In addition we have.

We have a common.

Logging layer, so let's say you want

to be able to enable logging because

something failed in production.

You can set similar environment variables

to get logging across all the Azure SDK's.

All the client libraries in

the Azure SDK. Wow!

Okay, so when you talked about unified like

you weren't kidding like that's really cool.

Actually having unified logging,

especially again getting microservices

and applications that have a lot of layers,

that's huge. Oh yeah, and it.

Oh sorry. Like I got excited.

We also have. Please get excited.

We also have.

We've also implemented like telemetry

tracing like open senses and open

telemetry so you can actually plug those

things into your application as well,

or your own tracing as well till I get

more information about your application.

Alright, fantastic.

Ah, I see OldKeyVault and I say NewKeyVault.

What's going on there?

Oh, so in my demo application I want

to show you how easy it was to move

like how much less cognitive burden

it was to write in the new Azure SDK.

So like over here we have a lot

of code just to create a clients,

but over here it's pretty simple.

Like you know, right when you

show that beginning?

Actually I was trying to read

the old one and I love that you

called it cognitive burden.

Because I was kind of like.

I was trying to pretend like I

understood what was going on,

but I got lost somewhere unlike line 47.

So yeah, I like there's some magic

string here that I had to look up,

but if you look at the new client it

kind of automatically does that for you.

I no longer have to understand what this

identity is or how to connect to it.

I just know hey if I pass you this token

like and it's this user can access it.

Please just give me access so.

I also like the iPad.

I'm a fan myself with the Fluent API style,

right?

This is online 21 there.

That's all one line from 21 through

24 and that's that fluent sentence

building kind of API style.

Yeah, for Java we decided to use

fluent models because yeah,

just like that you get to connect

and Chain operates together.

In.net you can instantiate your secret

client using just constructors,

so it'll feel idiomatic to you

as a user as well.

You're just I love what you're saying here,

Connie,

because you just hit another

one of my favorite words,

which is idiomatic,

right?

Like you don't want to be writing Java and

then feeling like the person that wrote

the SDK is a Ruby programmer and you're like,

like what language are we speaking here,

right?

And idiomatic is really important.

Yeah,

that's one of the feedbacks that we had

gotten for our legacy client libraries.

Is that sometimes it didn't

feel idiomatic to the language,

so now we work across we work with

many different language experts

in their respective languages too.

Create this SDK so you know it'll

feel intuitive for you as like a

JavaScript developer. C++. Go developer.

That's awesome. Fantastic.

And the last thing is that we love

getting feedback and we're also open source.

So if you want to contribute to our

repository or you see some sort of

scenario that might be missing, like,

feel free to hit up our GitHub and just.

Interact with us.

That's another great point.

The Azure SDK.

The people who work on it yourself.

Like you're out there.

You want to talk to people.

You're on social.

You're on GitHub.

There's whole conversations about

the future of the Azure SDK.

They're happening in GitHub issues,

so if you're watching Azure

Friday and you want to

talk to Connie and her compatriots

that are working on this stuff,

they want to hear from you.

Alright, alright so actually let me

bring up that kid hubs you get lost.

Let's do that yeah so it's just Azure

Azure SDK for Java and if you replace this

with Azure SDK for NET or Azure SDK for

JS you'll go to the respective language.

Fantastic alright well thank you so

much for hanging out with me today.

Thanks for having me.

I am learning all about some of the

great work that's happening revamping

the Azure SDK for all the great Azure

Services today on Azure Friday.

Thanks for watching this

episode of Azure Friday.

Now I need you to like it.

Comment on it, tell your friends,

retweet it.

Watch more Azure Friday.

The Description of An introduction to the unified Azure SDK | Azure Friday