ASP.NET 5 – Top Features

ASP.NET vNext is a new versatile framework that is compatible with Windows, Linux, or Mac OSX, with lots of new features. One of the most exciting features is that it’s open source (which Microsoft RARELY does) and available on GitHub.  Joydip Kanjilal did a great article on the top 10 features that are available in version 5 of ASP.Net on, and I’ve summarized the top 5 features below:

ASP.Net 5 feature No. 1: Cross-platform runtime
ASP.Net 5 applications can be executed on either the full .Net CLR (Common Language Runtime) or the the new cross-platform .Net Core CLR runtime engine. The full .Net CLR is the default runtime engine that can provide compatibility with legacy applications. It runs only on the Windows operating system.

The .Net Core CLR is a lean, modular, and completely self-contained runtime that can be used to build lightweight and cloud-optimized Web applications. The Core CLR is cross-platform and open source, with ports for Windows, Linux, Mac OS X, and FreeBSD in the works. In short, you will now be able to build your application on one platform and execute it on another or even on multiple platforms.

ASP.Net 5 feature No. 2: Cloud-ready deployment

Thanks to the self-contained Core runtime, which can be deployed with your app, ASP.Net 5 is ready for the cloud. Diagnostics, session state, cache, and configuration will now work seamlessly both on premise and in the cloud. Further, multiple ASP.Net 5 apps can now be deployed side by side on the same host but configured and updated separately, because they no longer must share the same runtime. With ASP.Net 5 we now have a minimalistic .Net stack that is optimized for cloud and server workloads.

ASP.Net 5 feature No. 3: Unified core framework

One of the most fascinating of the new ASP.Net 5 features is the inclusion of a unified programming model for ASP.Net MVC, ASP.Net Web API, and ASP.Net Web Pages applications. Before ASP.Net 5, the MVC, Web API, and NetWeb Pages frameworks were implemented separately and hence contained certain inconsistencies and even conflicts.

The unified programming model means you can build applications that leverage MVC, Web API, and Web Pages without the need to reconcile differences in the three frameworks. You now have only one type of a controller to handle requests that are common to MVC, Web API, and Web Pages applications. In essence, you now have a single routing framework, a single model binding framework, and a one-filter pipeline.

ASP.Net 5 feature No. 4: Host agnosticism
ASP.Net is now host agnostic. It includes a new modular HTTP request pipeline that is optimized and can be hosted on any of the following platforms:

Internet Information Services (IIS)
OWIN (Open Web Interface for .Net)
Self-hosted in a custom process
Host agnosticism is a great new feature that not only eliminates the dependencies on the legacy System.Web namespace, but boosts application responsiveness to a considerable extent.

ASP.Net 5 applications don’t talk directly to the Web server. Rather, host agnosticism is facilitated through “feature interfaces” provided by theIApplicationBuilder interface. This enables ASP.Net 5 applications to switch between hosts seamlessly.

The OWIN standard defines an interface between Web servers and Web clients or Web applications. Katana is Microsoft’s OWIN implementation that additionally incorporates some middleware components. In essence, Kestrel is a cross-platform Web server from Microsoft that can be used with ASP.Net 5.

ASP.Net 5 feature No. 5: Improved performance
The ASP.Net 5 framework incorporates an optimized, modular pipeline that allows you to plug in only the components that your application needs. This pipeline is based on OWIN standards and incorporates most of the learnings from the Katana project. This runtime is no longer dependent on the System.Web assembly, reducing the overhead involved in serving HTTP requests and hence improving application throughput.

All in all, ASP.Net 5 is a significant improvement over previous versions, allowing developers to build modern cloud-based web apps using the existing .NET framework. Designed to minimize overhead by using modular and flexible components, it’s pretty cool! And the fact that’s it’s open sourced on GitHub is a real game changer, IMO. Believe it or not, the first version of ASP.NET was released 15 years ago, and has evolved significantly since then (like the rest of the web and the frameworks used to build it). The documentation for ASP.NET 5 is straight forward and easy to understand, with many examples cited for different use cases.

Having built for the web using a variety of different frameworks, it’s great to see that ASP is continuing to evolve, and that it’s still relevant in 2016. Microsoft may have fallen off the map for some of its previous flagship products, but I’m happy to say that ASP.NET won’t be one of them.


Help! My Screen is Cracked

As an advocate of all things tech (cutting edge products, web based platforms, web development, etc.), I find Apple & their flagship iPhone product to be very interesting. Although this post is a bit of a departure from the norm, I had such a funny experience with my phone recently that I thought some of my readers might be interested.  I took a few days off from work recently to visit an old friend who lives in Cupertino, CA and catch up. As many of you know, Apple’s corporate headquarters is in Cupertino, CA, and the entire town is full of converts. Although Google’s headquarters is only a stone’s throw away in Mountain View, CA, I saw very few Android products while I was down there…. nearly all iPhones & Macbook Pros.

On the way out of the Uber from the airport, I dropped my phone on the cold cement. Since I’ve never dropped my phone before, I don’t keep a case on it, and I knew that as soon as I dropped it, I was in trouble. I knew that the screen was cracked before I even picked it up. Sure enough, I had a nice spiderweb pattern across the face of the phone… perfect.

Fortunately, the device still functioned, and I was able to get in contact with my friend and meet up. It was a rather uneventful trip from that point on, with lots of wine, good conversation, and walks down memory lane. As a nerd, I thought that it was my responsibility to at least try to repair my iPhone screen myself, so I read a few articles about the process, including one from Popular Mechanics. The author writes:

My first thought when my screen wouldn’t turn on: “What did I f*ck up?” I took the phone apart again and repeated the repair a dozen or so times. When that didn’t work, I posted about my predicament in iFixIt’s online forums. A few responses trickled in, and I chatted via email with a member of the iFixIt team. No matter what troubleshooting tip I tried, the screen still wouldn’t work. This being my first attempt at doing the repair, it was impossible to tell whether I had done something wrong or had just gotten a bad part.

After 20-plus attempts and no working screen, it was time for reinforcements. I took my phone to a Batteries+Bulbs location in San Francisco, where a tech who does frequent iPhone repairs kindly agreed to check my work. Turns out, I’d done everything correctly, but the original screen I’d gotten was faulty or had become damaged. He put on an extra screen the store had on hand, and voilà, my 5S was up and running.

Are you kidding me? The author bought the equipment (screw driver, replacement screen, etc.), repaired it herself, and when it didn’t work, she did it another 12 times? Not that my time is worth $1,000/hour, but honestly, I didn’t have the time or the patience for that. Another article on Cnet basically said the same thing: after replacing the screen himself, the author wrote that his screen had several ribbons cascading across it… he ended up giving up and getting it repaired by professionals.

I did a quick Google search for “Cupertino iPhone Repair” and found I dropped off my phone and walked around downtown Cupertino while it was being fixed. About 30 minutes later, I was on my way & back to the airport.

I hate to admit it, but I didn’t have the time or patience to replace my own cracked screen. I guess I’ll stick to ASP.NET 🙂