October 6, 2018 – Building A Startup Experience For The Corewiki | Ubuntober

It’s something like that right um c-sharp theme for unity now now IDE extensions a from J Chanin we know that guy extensions that hopefully speed up your development workflow yeah ad C sharp interface right I want to be able to add class yeah yeah add class there we go fantastic give me those c-sharp bot woohoo if you do find a snippet I think I just found one Thiago and I don’t know the specifics for the problem here but he saved source of truth on.

Server versus local memory in state right so let’s let’s talk about that I’m gonna reload here there we go so let’s talk about this so we’re building this first start experience when you first start we have these extensions that we’re going to load to determine do I need to start and there’s use first start configuration that sets up the application.

To write to insert the redirect that says if first start is incomplete right if you haven’t configured the application yet we’re gonna reroute your request to actually go into the first start sub application.

If you will right and inside of these pages will go and walk you through that setup process that’s what what this does right it injects in and allows us to intercept that configuration and in this ease first start complete we’ll figure out what the logic is to determine if the first start has been completed if the application is properly configured and not to do this reroute if and now that all happens inside of our asp net core startup so we have.

Configure services and we have this configure method that configures the HTTP pipeline and we have where is it use first start configuration right here so that.

We stop and do that reroute before we do things like configure RSS or localization localization we may want to move around here but what I’m.

Thinking is we may need to have a services ad first start up here that will allow us to inject inject a singleton and an ancient coder.

You know I think we’re on the same page with this let me know inject a singleton that sits in memory and we’ll load from from the wizard right from the first.

Start wizard as we configure each of the pieces so that when we get to that last page and we say okay we understand here’s.

Your configuration press ok and save it to disk same page fantastic so ancient coder.

And and Robert tables were on the same page good stuff and Thiago is saying wait isn’t it called localization with an S right here we are we I know very much that that and I understand that we do have viewers we do have.

Pair programmers from all over joining us and for.

For Ashley who wrote write you could see Ashley brought in their when they wrote this method and added it into the mix here for their locale localization.

Is spelled with an S and I’m okay with the S there so it depends on where you are exactly ancient coder whatever tongue you may be using so you see what I did there and I love that steve carell quip clip not being in.

English native speaker this time sometimes confuses.

Me fair enough so there’s english english and then there’s American English and we Americans put Z’s on those things folks in the UK they and and English english-speaking yet there you go color vs. color they also use that spelling I believe in India Aussies right the Australian folks will use.

That as well and that’s okay I’m I’m okay with whatever spelling makes us as a community happy and lithic says just like just like that oh my.

Be like the middle of the night the colonies versus the colonies that rebelled oh I see yeah us because we we blew. oh how are you spelling that American yeah American Americans our here do the.

American thing so so what I think I need here is if I were to say.

Ad first start configuration let’s let’s add that in here Rodrigue a FS thank you so much for the follow I appreciate you joining us here and first starch configuration now services is typically adding and doing dependency injection configuration.

And that’s what this I service collection parameter is here it’s it’s allowing us to configure dependency injection so those objects are just available to us as we work around the application so I’m going to receive a nice service collection and I want to make sure that I use.

A first start configuration and I’ll make this a.

An extension method here so that we can use a fluid interface if.

We want I’m going to control period on that so I can get my using statement built there we go and I.

Need to make sure I return my services at the end of this.

So that we’re returning the same object that we say we are now if we’re going to take our configuration that’s submitted here in index and output output it to disk appropriately America America Americans get your cup of Good Morning America cup of coffee cup of joe loaded up there and in the Canadians in the.

Chat room we’re going oh those stupid Americans yes that’s me so alright anyways so what I’ll be able to do is if I set up some sort of a configuration object here now let’s see.

If that’ll work with that new add-in that I put if I do ctrl shift P and if I look for click look at that new c-sharp class put down.

A new c-sharp class and let’s call this first start config first starch configuration yeah.

You mean unable to find it it’s right there what are you talking about I.

Want a new c-sharp class first start configuration and now I feel bad what is the world coming to new c-sharp class first start configuration now it works all right.

So let’s create some of these properties that we want to capture from our index page let’s open this side-by-side there we go and close this so my in debt not the not that page no no I want let’s go side by side and over.

Here let’s open index yeah that one so now we can see our fields that we want to capture here what do you think my hopes are up again oh good is this state machine going to be simply tracking state so collection of enums or boolean x’ and not actually storing the values I think we can store the values ourselves let’s take a look watch.watch cool go check out what I’m gonna do here let’s.

A property so let’s just do the name first right so let’s call this wiki name okay crop string no no no and let’s call this a admin user name let’s just start with those two now what I’m going to.

Startup extensions is I’m going to add right services add singleton and this is going to be onion specify the type now now let’s.

Do this and we’re gonna make it first start configuration is the type and we’re gonna new up a new.

First start configuration so now what I can do is inside my first start configuration index wait a sec mmm I want that page I can receive not just the.

Hosting environment or I configuration I can receive a first start configuration what the heck yeah and we will call this let’s call this first start config this dot first starts in fig equals first yeah.

Like that right and then I can generate that property um no yeah generate property read-only property so this is a pointer to a singleton no it’s not a dumb question Robert tables a Thank You Tiago never dumb questions here always happy to answer questions it’s only dumb.

If you don’t ask it Amen lithics you’ll be able to add an item and the azured features could be configure and deploy sure sure.

Absolutely so what I should be able to do is as those values come in put them into the first.

Start configuration object because it’s a singleton and it’s being referenced and it should persist I may need to make first start configuration I may need to make these static objects but they should just work had to delete my fork and recreate it I made.

A new pull request with better blue badges do you mind if I check out the blue badges real quick chat room I’m so excited blue badges blue badges I sound like the guy from what’s it called we don’t mind alright let’s take a quick look back over here refresh we’ll take a quick peek do to do files changed 36 36.

There’s the 72 72 oh yeah it does scroll over oh yeah oh yeah get down with your bad self there our hawk whoa I like that one what do you think chat room so you made a new Fork that’s okay but you called it that’s fine yeah I agree that looks really good so I’m gonna take this one and I will merge awesome and I will go back over to my Windows machine and get pull that oops this is weird because I’m bouncing back and.

Forth I’m going to go to my dashboard and affiliate partner down here loyalty badges so we’ll grab the blue one that one let’s rebuild we can rebuild it yeah look at those yeah now look at them side-by-side that looks really good I think that if you want to if you want to tinker with the red go for it chat room do you.

Have any comments for our hawk on the on the colors i i i think these are these are really nice i look I love the gold they don’t look similar anymore yeah red one could be a shade redder but it’s not yeah I these are looking good there you go I need I need some sort of I need like a compliment these look these look really really good thank you thank you so much where is it I have where do my theme music there’s the theme music.

Now I shouldn’t play any of those because.

YouTube will just mute me I have a yeah really nice work it it looks very nice our Hawk if it does look a little it does look a little pink but that’s okay I mean if you do want to make it redder that’s great but you had a question about learning desktop get or or learn the command I would look at the command line is pretty easy to learn if you let me let me close that so because.

Some of these start gumming up the works here take a look there’s a tool out there called get cracking that.

I think is extremely good for learning how to get started with git and it gives you a nice user interface that shows you exactly how things are merged and laid out and it’s a there you go Frank likes it that’s a that’s a very good endorsement from Frank give this a try it’ll it’ll make it a little bit clearer how to visualize it sometimes working at the.

Command line is a little abstract and it’s hard to visualize exactly what’s happening inside your repository and get cracking does a real nice job.

Of showing you exactly what’s happening but the.

Basic git commands just get commit get status get add there’s you know four or five basic commands for adding and removing and checking out inside of.

Repository that are really easy to learn to start great get.

Crackin does a nice job of making them visible to you ancient coder says that gold is your favorite yeah I think it is.

I do like that gold let’s see it is free for personal use get crackin is command line with posh get maas is right when if you do start working on the command line use posh get.

It’s very very good to give you some insight get.

It there of their own company my team lean suggested I learned it learned.

Command line first that was four years ago never really left it I was the same way yeah console only four console first is the way that I learned it so great stuff thank you so much.

Our Harket really looks good another five months and i have gold all right so what I.

Think I can do here to finish the thoughts here around this configuration I should be able to to add the values into into our configuration as they’re posted back right so if I make first start configuration first start config right.

If we make that a bind if we put bind property on it so bind property is a a feature inside of razor pages with asp net core that allows us to.

During the post operation receive values back.

Into this specific thing you’ll be able to receive and work with values directly from the user interface so over on this side let me open up that index CS HTML page again and.

Can get the properties lined up so it’ll post right into that you open you did you did another update here let’s say we got that is much redder never be angry that that is a nice red posh git is a PowerShell thing right yes posh git does run on PowerShell which means now that PowerShell is cross-platform you can run.

It on Windows Mac or Linux and you’ll get that same posh get experience didn’t mean to update the blue if you did now I think it.

Just came along for the ride so let’s do this I’m gonna do one more.

That and then I want to finish writing some code and then I think I need to cut out here today I think I need to call it a day here at some point so I’m going to run one more pull oh I.

Posted in Linux<a href="https://baby2471.com/tag/c" rel="tag">c#</a> <a href="https://baby2471.com/tag/dotnetcore" rel="tag">dotnetcore</a> <a href="https://baby2471.com/tag/linux" rel="tag">Linux</a> <a href="https://baby2471.com/tag/ubuntober" rel="tag">ubuntober</a> <a href="https://baby2471.com/tag/ubuntu" rel="tag">ubuntu</a>