Scott Hanselman

Announcing PowerApps with Azure App Service

November 30, '15 Comments [8] Posted in Azure
Sponsored By

Introducing PowerAppsMicrosoft announced Azure App Service in March of this year on ScottGu's blog. Azure App Service includes all this stuff for one price. In fact, if you are already using Web Apps/Sites, have many of these features but may not know it:

  • Web Apps - This is the Azure Web Sites that you use today. .NET, node.js, Python, Java, PHP, and more.
  • Mobile Apps - libraries and runtimes for iOS/Windows/Android/Mac, plus offline sync support, notifications, and more
  • Logic Apps - Workflow in the cloud (like IIFTTT but hosted and controlled by you) that can orchestrate business processes within your App Service
  • API Apps - RESTful web services, connections to lots of SaaS systems like Dropbox, Office365, etc, plus security and automatic versioning.

In April the Azure team added isolated App Service Environments. An App Service Environment provides a isolated and fully dedicated environment for securely running all of your apps including Web Apps, Mobile Apps, API Apps and Logic Apps. Your apps run on virtual machines that only run your apps. You aren't on a pool of shared machines like much of the cloud. These dedicated App Service Environments can also scale much larger than the standard App Service. App Service Environments always run in their own private virtual network that you control.

Today at the Convergence Conference in Spain, Bill Staples announced PowerApps. The team I work on doesn't just make ASP.NET, we also make tools and services for Azure App Service and for the last year the team has been building PowerApps. PowerApps makes it easy to quickly create new business apps, connect systems and then share those apps with anyone on your team.

You should go check out http://www.powerapps.com to learn about the creation process for business users (like, folks who use Office but don't program), but I decided to focus more on how a professional developer would use Azure App Service and PowerApps, so I made a video to demonstrate a real example.

PowerApps for developers

bricksA Real Scenario

I wrote an app something like 13 years ago for Pioneer Courthouse Square here in Portland. The square is the Center of the City and it's covered with bricks that have the name of the people who donated to have the square built. There's tens of thousands of bricks and they are hard to find. There was an Access Database and a paper map but that was lame, so I put together an ASP app and a SQL database to generate a printable map that gets visitors within ten or so feet of their brick.

This is a real legacy app that has been running - happily and unchanged - for over a decade. We don't like to admit apps like this exist but the world is full of them. This apps was created before the iPhone, before ubiquitous connectivity, before web services, and before federated security. I thought it would be cool to make this legacy data available as a JSON-based web service, secure it's admin access with Azure Active Directory, build a CRUD mobile admin app with PowerApps for iOS, Android, and Windows, and then, just for fun, also create a native Android app with Xamarin 4 and the Azure Mobile Apps libraries so that volunteers can manage requests for photographs of bricks.

What does this all mean? What's changed?

PowerApps is the business application creation side. Think of it as a new member of the Office Family. It's not a Visual Studio thing. Apps made with PowerApps are sharable with in your organization as easy as sharing documents and they run on Windows, Android, and iOS. A business user could build a new workflow app and share it with everyone. They can auth that new app against APIs like Office 365, Microsoft Dynamics, Salesforce, Dropbox, Twitter, Google Drive, and OneDrive. For example, my example app takes photos of the bricks and puts the result in Azure Storage, but I could just as easily drop them in Google Drive or OneDrive.

However, for Visual Studio developers, or any developer, you still use the language of your choice (C#, F#, node.js, PHP, etc) and write Web APIs and Apps and host them in Azure App Service as you always have. But, if you want, those APIs can live in a new gallery that is specific to your organization so that anyone in your org (developer or business user alike) can use in their applications. My legacy BrickFinder is now an authenticated API living in an Azure App Service Environment. The API is being used by a website, an Android app written with Xamarin, and also an application created with PowerApps, running everywhere.

One other interesting point to note is that PowerApps pricing isn't consumption based, it's user-based pricing. Pay by the head, rather than prices fluctuating by consumption. For companies with public facing apps like my startup, I like pricing that changes with the popularity and usage of my app. For enterprise and large companies, simple pricing that's per-user makes more sense and is easier to budget for.

Check out the launch videos. PowerApps is in private preview now (go sign up at http://www.powerapps.com if you like), but you'll be hearing more about it in the months to come. 


Sponsor: Big thanks to Infragistics for sponsoring the feed this week. Responsive web design on any browser, any platform and any device with Infragistics jQuery/HTML5 Controls.  Get super-charged performance with the world’s fastest HTML5 Grid - Download for free now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

RFC: Server-side Image and Graphics Processing with .NET Core and ASP.NET 5

November 26, '15 Comments [21] Posted in ASP.NET | Open Source
Sponsored By
image

The .NET Core and the Core Libraries are open source and run on Windows, Mac, and Linux. In fact, you can run them with support, today, in production on Windows and Linux (Mac is for development, not production).

Head over to http://get.asp.net to get ASP.NET 5 with .NET Core on any platform. Also get the free cross platform editor Visual Studio Code as well.

Because .NET Core runs anywhere, there are things that it doesn't have. It doesn't have a UI layer (no WinForms, for example, because that makes no sense on Linux) or Registry Access (that's only on Windows, so it's simply omitted). While these omissions make sense, others don't exist because of lack of times, changing priorities, or peoplepower.

Currently, as of the time of this blog post's writing, .NET Core has no good built-in option for image resizing or image generation/creation. There is no System.Drawing because there is no Win32 GDI. There are some options, that I'll point out later, but this clearly hasn't been a priority so it's not done yet. There has been some work on System.Drawing.Graphics, but it seems stalled.

Nathanael Jones is the very accomplished author of ImageResizer and the primary at Imazen, an imaging software company. I've talked about ImageResizer before, it's fantastic. Nathanael has been pushing hard to get folks at Microsoft to commit to a story around Server-side Graphics in ASP.NET 5 and recently updated his own roadmap with respect to ImageResizer and the new ASP.NET 5 (that runs on .NET Core as well as the full .NET Framework). Take a moment and read it, there's a lot there. Concerns about how to call native code, how to distribute managed code that has to call native code, and lots more. I've worked with Nathanael for the last year trying to work out some way to solve this problem but it hasn't worked out well. Big company, sigh.

Another library in the .NET imaging space is called ImageProcessor by James M. South. Jim also wants to solve the program of server side image manipulation. He's currently working on a re-write of his ImageProcessor as a cross-platform library and I'm sure he would appreciate your help.

Jim himself says:

Is this wise? Honestly... I don't know. I could be writing code that may be suddenly obsolete. There has been little feedback on questions I've asked but it's a nice learning process if anything and I will definitely be releasing the code for consumption.

Over in the Microsoft corefxlab repo Jim has asked some questions and tried to push as well, but the issue is currently closed. Fortunately it is just closed for lack of interest. Krzysztof Cwalina from Microsoft says:

We have nobody working actively on this. It's a interesting problem space, but it does not align with our current priorities. I will close this for now. Please let me know if anybody wants to work on it and I will reopen.

Enter, you, us, the community. Jim has asked for help, and I'm also asking for help. Is Server-Side graphics manipulation in ASP.NET 5 important? Jim asks:

Please... Spread the word, contribute algorithms, submit performance improvements, unit tests. Help me set up CI for nightly releases.

Performance is a biggie, if you know anything about the new vector types and can apply some fancy new stuff with that it would be awesome.

There's a lot of developers out there who could write this stuff a lot better and faster than I and I would love to see what we collectively can come up with so please, if you can help in any way it would be most welcome and beneficial for all.

So, two things.

First, head over to https://github.com/JimBobSquarePants/ImageProcessor/tree/V3 and talk to James M. South on Twitter. If you can, offer support. Perhaps help with a AppVeyor setup, or offer your own CI server for builds. Do you have a need for server-side image work now or perhaps you have a cache of unit tests? See what you can offer. Even if you're a First Timer to Open Source.

Second, if you want to work on it, either with James, or with Microsoft, check out the closed issues on GitHub at https://github.com/dotnet/corefxlab/issues/86#issuecomment-158459437 and engage there. It'd be awesome to see this problem solved.


Sponsor: Thanks to RedGate for sponsoring the blog this week. They're offering a free .NET eBook! Discover 52 tips to improve your .NET performance! Our new eBook features dozens of tips and tricks to boost .NET performance. With contributions from .NET experts around the world, you’ll have a faster app in no time. Download your free copy.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

ASP.NET 5 and .NET Core RC1 in context (Plus all the Connect 2015 News)

November 19, '15 Comments [32] Posted in ASP.NET | Open Source | VS2015
Sponsored By

Connect() 2015 - Scott Hanselman's KeynoteIt was a huge day in New York today as I got to join Scott Guthrie and the team at the Connect() 2015 event as they announced a bunch of stuff, including, but not limited to:

  • Visual Studio Code is now Open Source and a new Beta that supports extensions is out now!
  • ASP.NET 5 RC1 is out with .NET Core and has a Go Live License. This means you can go into production with ASP.NET 5 on Windows or Linux and Microsoft will support you.
  • You can get ASP.NET at, wait for it, http://get.asp.net. Yes. This lively URL is a mini-site that will look at your OS and show you Linux, Mac, or Windows (try visiting it on a mobile phone for fun, too) and tell you how to get ASP.NET.
    • If you insist, you can visit https://get.asp.net/OtherDownloads for a list of all the packages and combinations available. There is a .pkg for Mac and a .tar.gz and some instructions for Linux. In the future I hope/expect we'll have .NET in some popular OS package managers.
  • Node.js Tools 1.1 for Visual Studio was also released. A lot of folks don't realize how cool Node.js development is in Visual Studio. Node.js Tools for VS is free and open source AND works with the Visual Studio Community, which, ahem, is also free.

If you don't have Visual Studio, I'd recommend you grab Visual Studio Code which is a non-threatening size and runs on any OS, then if you're a command line person you can do this on Windows:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{iex ((new-object net.webclient).DownloadString('https://dist.asp.net/dnvm/dnvminstall.ps1'))}"

or this on Linux/Mac.

curl -sSL https://dist.asp.net/dnvm/dnvminstall.sh | sh && source ~/.dnx/dnvm/dnvm.sh

And yes, we have have formal ways to get this and you can again, always go to https://get.asp.net and check our SSL cert. ;)

Connect 2015 Keynotes and Videos

You can watch everyone's talks here and my specific keynote here. My talk was complex and varied but also very personal as we built all the demos around my diabetes and blood sugar system. I also used the Nightscout Open Source CGM Project and gave them a shoutout as well. I use Nightscout to remote my continuous glucose meter's data to the cloud. That glucose data collector runs in an Azure Web Job that I've blogged about before.

We had so much fun making our "parade" of cool cloud demos. I get tired of doing demos around product catalogs and such, so we build a connected Health Clinic. We pulled data in from thousands of (simulated) Microsoft Bands, as well as my actual physical Band 2 that I wear every day. We combined my heart rate data with my actual live and historical glucose data and ran it through Azure Machine Learning to create a "Hanselman Stress Index" to get a sense of how stress and my schedule affects my heart rate and blood glucose. You should really watch the video to get the full effect.

We'll do some cleanup of the slides and code and try to get it all on GitHub soon(ish) so please be patient with us.

image

I also want to point out the documentation for ASP.NET 5 RC1 over at http://docs.asp.net. This documentation is hosted and built at ReadTheDocs using Python and Sphinx and managed as source in GitHub using reStructuredText.

Contributing to the docs is a great way for YOU to get involved in Open Source, especially if you are a FirstTimer! Check out this great video on how to contribute to the ASP.NET documentation.  The community can contribute by:

The Mega List of Connect() 2015 Information

You want it all? OK, here you go, the list of everything announced at Connect() 2015:

What does it all mean?

It means that you can build basically whatever you want, however you want. You can use the editor you like, the OS you like, and the languages you like. VSCode on a Mac doing Node and deploying to Azure? Check. ASP.NET 5 with C# to Docker Containers in a bunch of VMs created in Azure and managed with Microsoft Operations Manager? Check. And on and on. Node.js on VS, C to Raspberry Pi's in C in VS, whatever you dig. It's a whole new world.


Sponsor: Big thanks to Octopus Deploy for sponsoring the feed this week! Check out their amazing product. I'm a fan.

Build servers are great at compiling code and running tests, but not so great at deployment. When you find yourself knee-deep in custom scripts trying to make your build server do something it wasn't meant to, give Octopus Deploy a try.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

The Crowdsourcing of Software Quality

November 12, '15 Comments [52] Posted in Musings
Sponsored By
Stock photo used under CC from WoCinTechChat's "stock photos of women of color in tech"

I posted a rant back in 2012 called "Everything's broken and nobody's upset." Here's another. Lots of people commented on that first post and a number agreed with the general premise. Some were angry and thought that I was picking on particular companies or groups. Sure, it's easy to throw stones, and criticism is a great example of stone throwing. So, in the years since I posted I made a concerted and focused effort on a personal level to report bugs. By this, I mean, I REPORT BUGS. I take screencasts or videos, I email reproductions (repros) and I fill bug issues anywhere and anytime I can because a Bug Report is a Gift.

Fast forward a few years, and I think that we as an industry are perhaps still headed in the wrong way.

Technology companies are outsourcing QA to the customer and we're doing it using frequent updates as an excuse.

This statement isn't specific to Apple, Google, Microsoft or any one organization. It's specific to ALL organizations. The App Store make it easy to update apps. Web Sites are even worse. How often have you been told "clear your cache" which is the 2015 equivalent to "did you turn it on and off again?"

It's too easy to ship crap and it's too easy to update that crap. When I started in software we were lucky to ship every 6 to 9 months. Some places ship every year or two, and others still ship once.

I see folks misusing Scrum and using it as an excuse to be sloppy. They'll add lots of telemetry and use it as an excuse to avoid testing. The excitement and momentum around Unit Testing in the early 2000s has largely taken a back seat to renewed enthusiasm around Continuous Deployment.

But it's not just the fault of technology organizations, is it? It's also our fault - the users. We want it now and we like it beta. We look at software like iOS6 and say "it feels dated." I even overheard someone recently say that iOS9 felt visually dated. It JUST came out. Do we really have to restyle our sites and reship our apps every few months to satisfy a finicky public?

As with many rants, there isn't a good conclusion. I think it's clear this is happening. The question for you, Dear Reader, is do you agree? Do you see it in in your own organization and in the software and hardware that you use every day? Is the advent of the evergreen browser and the always updated phone a good thing or a bad thing?

Sound off in the comments.


Sponsor: Thanks to Infragistics for sponsoring the feed this week. Responsive web design on any browser, any platform and any device with Infragistics jQuery/HTML5 Controls.  Get super-charged performance with the world’s fastest HTML5 Grid - Download for free now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Using Redis as a Service in Azure to speed up ASP.NET applications

November 6, '15 Comments [18] Posted in ASP.NET MVC | Azure
Sponsored By

Microsoft Azure has a Redis Cache as a Service. There's two tiers. Basic is a single cache node, and Standard is as a complete replicated Cache (two nodes, with automatic failover). Microsoft manages automatic replication between the two nodes, and offers a high-availability SLA. The Premium tier can use up to a half-terabyte of RAM and tens of thousands of client connections and be clustered and scaled out to even bigger units. Sure, I could manage your own Redis in my own VM if I wanted to, but this is SAAS (Software as a Service) that I don't have to think about - I just use it and the rest is handled.

I blogged about Redis on Azure last year but wanted to try it in a new scenario now, using it as a cache for ASP.NET web apps. There's also an interesting open source Redis Desktop Manager I wanted to try out. Another great GUI for Redis is Redsmin.

For small apps and sites I can make a Basic Redis Cache and get 250 megs. I made a Redis instance in Azure. It takes a minute or two to create. It's SSL by default. I can talk to it programmatically with something like StackExchange.Redis or ServiceStack.Redis or any of a LOT of other great client libraries.

However, there's now great support for caching and Redis in ASP.NET. There's a library called Microsoft.Web.RedisSessionStateProvider that I can get from NuGet:

Install-Package Microsoft.Web.RedisSessionStateProvider 

It uses the StackExchange library under the covers, but it enables ASP.NET to use the Session object and store the results in Redis, rather than in memory on the web server. Add this to your web.config:

<sessionState mode="Custom" customProvider="FooFoo">
<providers>
<add name="MySessionStateStore"
type="Microsoft.Web.Redis.RedisSessionStateProvider"
host="hanselcache.redis.cache.windows.net"
accessKey="THEKEY"
ssl="true"
port="1234" />
</providers>
</sessionState>

Here's a string from ASP.NET Session stored in Redis as viewed in the Redis Desktop Manager. It's nice to use the provider as you don't need to change ANY code.

ASP.NET Session stored in a Redis Cache

You can turn off SSL and connect to Azure Redis Cache over the open internet but you really should use SSL. There's instructions for using Redis Desktop Manager with SSL and Azure Redis. Note the part where you need a .pem file which is the Azure Redis Cache SSL public key. You can get that SSL key here as of this writing.

Not only can you use Redis for Session State, but you can also use it for a lightning fast Output Cache. That means caching full HTTP responses. Setting it up in ASP.NET 4.x is very similar to the Session State Provider:

Install-Package Microsoft.Web.RedisOutputCacheProvider 

Now when you use [OutputCache] attributes in MVC Controllers or OutputCache directives in Web Forms like <%@ OutputCache Duration="60" VaryByParam="*" %> the responses will be handled by Redis. With a little thought about how your query strings and URLs work, you can quickly take an app like a Product Catalog, for example, and make it 4x or 10x faster with caching. It's LOW effort and HIGH upside. I am consistently surprised even in 2015 how often I see folks going to the database on EVERY HTTP request when the app's data freshness needs just doesn't require the perf hit.

You can work with Redis directly in code, of course. There's docs for .NET, Node.js, Java and Python on Azure. It's a pretty amazing project and having it be fully managed as a service is nice. From the Azure Redis site:

Perhaps you're interested in Redis but you don't want to run it on Azure, or perhaps even on Linux. You can run Redis via MSOpenTech's Redis on Windows fork. You can install it from NuGet, Chocolatey or download it directly from the project github repository. If you do get Redis for Windows (super easy with Chocolatey), you can use the redis-cli.exe at the command line to talk to the Azure Redis Cache as well (of course!).

It's easy to run a local Redis server with redis-server.exe, test it out in development, then change your app's Redis connection string when you deploy to Azure. Check it out. Within 30 min you may be able to configure your app to use a cache (Redis or otherwise) and see some really significant speed-up.


Sponsor: Big thanks to my friends at Octopus Deploy for sponsoring the feed this week. Build servers are great at compiling code and running tests, but not so great at deployment. When you find yourself knee-deep in custom scripts trying to make your build server do something it wasn't meant to, give Octopus Deploy a try.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.