Podcast: Play in new window | Download
Subscribe: Apple Podcasts | Spotify | TuneIn | RSS
Episode twenty five is live!
This week we give away Joe’s stuff, we break up with IE8 like a big boy, Joe and Allen get excited about readme files, and we argue about which is worse: bad code or bad architecture. That and more in this week’s episode where we explore the new bits in ASP.NET 5.
News & Updates
- We give away Joe’s stuff! That was easy, maybe we should give away more of his stuff. Who won? Keep reading.
Picking the winner of the “Design Patterns” contest tonight! pic.twitter.com/GO57FoX00t — CodingBlocks.net (@CodingBlocks) March 26, 2015
- IE sucks. Chrome sucks. Firefox sucks. Maybe it’s just me. While we patiently await Microsoft’s release of their new browser, codename Spartan, we break up with IE8 like a grown man. By tweeting it. Read the best break ups or submit your own at BreakUpWithIE8.com. Oh IE8, your ad campaign will not be forgotten.
- We argue which is the lesser evil: Bad Architecture or Bad Code. Join the conversation!
Which is the lesser evil, bad code or bad architecture? https://t.co/KKNwY8COEQ — CodingBlocks.net (@CodingBlocks) March 26, 2015
ASP.NET 5
- In three new exciting flavors: Full .NET CLR, Core CLR (a.k.a. cloud-optimized runtime), and the Cross-Platform CLR.
- MVC, Web API, and Web Pages have been unified.
- Dependency Injection is now part of your project. Not everyone will be excited. Just go to Google and start typing “dependency injection is” and see some of the suggestions.
- NuGet all the things. Modularity is good.
- New JSON structure for project files. Want a new file in the project? Simply drop it into the directory. Michael is excited that merge conflicts will decrease.
- Side-by-side versioning. Bundle the .NET runtime with your app.
- Microsoft felt more package managers were necessary, so all of them are in use. All of them. Just kidding, it’s only Nuget, NPM, Bower, … /8)
- Joe and/or Allen are very excited about the new Project_Readme.html files. Wait, what?
What did it take to run ASP.NET 5 on a clean instance of OSX?
Here’s everything Michael did to get C# code running on a Mac for the first time.
- Open up the App Store and install Xcode. You will need to accept the Xcode license. For the lazy, the next step *should* prompt you to accept it.
- Install Homebrew:
- ruby -e “$(curl -fsSl https://raw.githubusercontent.com/Homebrew/install/master/install)”
- Install Mono and the DNVM (previously known as the KVM):
- brew tap aspnet/k
- brew install kvm
- Install Node.js.
- Install Yeoman:
- npm install -g generator-aspnet
- Install Grunt:
- npm install -g grunt-cli
- Install Bower:
- npm install -g bower
- Apparently after all of the installs above, my path still didn’t include the location of kvm.sh. So I sourced it:
- source kvm.sh
- Use Yeoman to generate an ASP web app:
- yo aspnet (follow the on screen instructions)
- About now, it’s time for Homebrew to actually bring me a brew. Michael prefers Guinness.
- Change directory into your newly generated app dir.
- Restore all of the NuGet packages:
- kpm restore
- Build the app:
- kpm build
- Start the web server:
- k kestrel
- Did you get a “too many open files” exception? Yeah me, too. Turns out to be a bug in Mono. Try this workaround:
- export MONO_MANAGED_WATCHER=disabled
- Start the web server again:
- k kestrel
- To quit the web server, simply press the ENTER key. Michael noted in the episode that pressing *any* other key required using “kill -9 _PID_” to stop it (where _PID_ is the process ID of the running kestrel instance). There is a request to make this more obvious.
Resources We Like
- ASP.NET 5: First Look by Scott Allen
- asp.net/vnext – The official place for everything vNext! Of course, it wouldn’t be complete without an official overview resource.
- Introducing ASP.NET 5 by Scott Gu – What is it with guys named Scott creating great information about ASP.NET 5? We don’t know either.
Tip & Tricks
- Tilt 3D – View your code like a cityscape. Or use it to see how your divs stack up, it’s up to you.
- MacBook Retina causing you to have DPI issues with your 2nd monitor when booted to Windows? #FirstWorldProblems. Use the Windows key + the plus key to zoom in. Or the minus key to zoom out. Or the ESC key to exit. Now you can see those tiny letters.
- SqlPin – Have some SQL statement that you’d like to have repeatedly ran? Thanks to @leeenglestone now you can.
Your Opinion Matters
If you’ve already taken the time to leave us a review, thank you. Sincerely. And if you haven’t, now’s your chance. Visit www.codingblocks.net/review to pick the platform of your choice. Your opinion means a lot to us. Peace, love, and code.