Technology

Web Apps

Web Development

Picking a Stack for the .Net Framework

January 29, 2015

Sometimes when working with a new client at Fresh, they know they want to use the .Net Framework for their site or web application, but they are not sure exactly which configuration or “stack” would work best. While the .Net framework started out with a small set of options, it has grown enormously over the past 10+ years. I’ve been fortunate enough to dabble in most of its offerings for both web and desktop apps. Through it all, I’ve pieced together my favorite “stack” for my application development, which I like to call the ZANS Stack.

The ZANS Stack (named somewhat in honor of Dr. Seuss) contains the following components:

ZA – Zurb Foundation for Applications

Zurb Foundation for Applications (or ZFA) is a newly released front-end application framework. It was built using a “mobile first” approach to responsive design and has been constantly improving itself. ZFA gives you lots of controls out of the box for developing your interface and can easily be extended and customized to fit your needs. ZFA is also built using AngularJS as it’s scripting base. I’ve been amazed at how AngularJS is structured to easily bind application data from APIs (and other sources) and update the display with little work. A lot of the “visual candy” that you get through jQuery (and plugins) can be implemented using AngularJS as well. Tasks that often took me a couple of days to implement and verify can now be done in one. Both ZFA and AngularJS are relatively new in the development world, but they are built by solid companies who are committed to their continued development.

One particular benefit of using ZFA in a .Net environment is that ZFA is built using a standard bower/gulp model for building and managing it’s resources. .Net resource development relies upon NuGet for its package management. While this is helpful for resource and back-end libraries, this has caused problems with managing front-end/display libraries. By leveraging the new Task Runner extension available in Visual Studio 2013, you can truly separate your front-end development from your back-end development, and still do all of your work within Visual Studio in a single project file. A great example of setting up Task Runner can be found here.

N – .Net WebAPI Model

Web-based applications are rapidly evolving more into an API type model. By making your application API-based, you remove a lot of the additional work needed to create a mobile or desktop versions of your application. You can simply build your front-end code and have the API perform most of the “heavy lifting” operations. The .Net WebAPI platform allows you to quickly build an API for your application that is REST compliant and can easily handle token-based authorization when you need to protect certain portions of your application. Visual Studio also provides some wonderful scaffolding for WebAPI controllers, including scaffolding against Entity Framework models or to query/output using the OData standard. This will save you even more time when getting a new app off the ground.

S – SQL Server

SQL Server is the most readily supported back-end database for the .Net framework. It easily handles 99% of your application needs, until you get into a scenario where a document database (such as RavenDB) will be more beneficial for your application. I prefer to use the Entity Framework – Code First library to map my database tables to objects within my code. This exposes the LINQ query model that allows me to build out queries in a “code readable” format and leverage lambdas, enumerable types, and other .Net features on top of my standard SQL queries. It also enables database migrations, which allows me to automate database changes and upgrade/downgrade the database on demand.

Beautiful Modularity 

By having the stack built out this way, you can easily separate all pieces within the application within your typical MVC (model, view, controller) architecture. Your designers can create a fabulous layout with the Zurb framework. Your front-end developer can use the power of AngularJS to make the application fast and functional. Your back-end developer can build the WebAPI to service the application and allow it to easily expand to mobile apps or third party applications as needed. Your data designer can model out the database and make changes whenever necessary, since data migrations can be upgraded (or downgraded) on demand. Naturally, you can mix and match these duties as your team size demands.

This approach also allows you to swap out technologies in the future if the needs demand. Entity Framework can interface with a MySQL or RavenDB database with minor changes. You can change your front end to a standard Razor front-end syntax and still interface with the WebAPI. While it would take a little more work, you could also change out your middle tier to use PHP, as long as your WebAPI methods retain the same name and you have the proper drivers to interface with your database.

There you have it, a .Net stack that is powerful, elegant, and easily interchangeable to meet your needs.

Sean Patterson

Software Development Director

Sean Patterson is a Software Development Director at Fresh Consulting. By day he develops applications at Fresh with the motto "If you can dream it, I can build it." By night he's a java overlord (of the coffee persuasion), aspiring running junkie, spider killer for his wife, and silly daddy to his twin daughters.

Post A Comment

You might also like...

7

Feb.

10 Factors for Choosing a CMS

There are dozens of Content Management System (CMS) platforms available to to help you manage the content, marketing, and SEO on your website. But with all the good options out there, how do you know how to choose the right CMS? Consider the following 10 factors when choosing your CMS. #1 Price Some CMS licenses start … Continued

4

Jan.

You’ve Beaten B.O.C.O. – Now, Deliver Your Product to the World

Over the course of 2018, Fresh’s designers and developers created an interactive digital journey to educate companies and teams on the UX Design Process. In the research, design, and test worlds, users undertook an adventure to beat B.O.C.O., or “The Beast of Conflicting Opinions.” The beginning of 2019 sees B.O.C.O. defeated at last. Now, you … Continued

2

Oct.

How Will the Oracle Java Licensing Changes Affect You?

Earlier this year, Oracle announced that beginning January 1, 2019, it will no longer provide support and updates to Java SE 8. Instead, the support and updates that have been included as part of the Java license will now be available only through a separate subscription support service. As we are now well into the … Continued