15 Visual Studio Project Templates To Jump Start Your Code

https://visualstudiomagazine.com/Articles/2015/08/01/15-Visual-Studio-Project-Templates.aspx?Page=1

Next time you’re starting a new development project, skip the tedious configuration and setup with these handy templates.

In this space, I typically write about tools that help you build, manage, test or deploy software development projects. The one part of the project I’ve mostly ignored thus far is perhaps the most important: Getting started.

New work typically starts with an idea, then File | New | Project. Then what? Most IDEs, Visual Studio included, provide some basic project templates that include commonly used files, folders, libraries, and so on for various development tasks or targets. But if your needs lie beyond the boundaries of those few supported project scenarios, your next task is likely to involve some (and possibly a lot of …) dull configuration and scaffolding work before you type the first line of code.

Fortunately, enterprising folks in the development community created Visual Studio templates specially tuned for a staggering number of project types, target platforms, development stacks, and software frameworks. Here’s a look at a few of them.

Truly Blank
The most basic scenario is creating a bare-bones project with no added packages, but it turns out that the “Blank App” template in Visual Studio 2015 isn’t really blank after all. By default, it includes a number of NuGet packages you might not want in a simple project.

Weston Thayer thought this was weird, so he created a Truely Blank App template that has most of the NuGet packages removed and turns off the frame rate counter as well. You can read more about what Thayer is doing over at his blog Cryclops | sad cyclops.

NuGet Packager
Speaking of NuGet, Ove Andersen has written a NuGet Packager template that greatly simplifies the process of setting up, packaging, building and publishing NuGet projects.

 

Anderson’s template follows the “Creating and Publishing a Package” standard conventions in the NuGet documentation and just takes the dirty work out of the process. It supports Visual Studio 2013, 2012, and 2010. Visual Studio 2015 support has been added, too, but wasn’t in the project description when this article was posted.

Windows Internet of Things
Something I missed until looking these templates up: Microsoft is creating an Internet of Things (IoT) platform alongside Windows 10 and Microsoft Azure. Windows 10 IoT: Powering the Internet of Things explains some of the strategy here, including a version of Windows 10 for small devices!

Interested in building Windows 10 IoT projects? Well, just fire up Visual Studio 2015 along with the Windows IoT Core Project Templates and start coding. Microsoft is calling these “Universal Windows Platform (UWP) templates,” and they support writing headless Background Applications in C#, C++, JavaScript, and Visual Basic or console applications in C++. Target platforms include Raspberry Pi 2 and Minnowboard Max.

For further information, including documentation and sample projects, check out theWindows IoT Dev Center and the IoT videos on Channel 9.

Apache Cordova
Apache Cordova, formerly known as PhoneGap, is a popular framework for cross-platform application development in HTML, CSS, and JavaScript. Best known for writing mobile apps, Cordova has been extended into other realms.

Apache Cordova Template for Windows 10 is a project by Microsoft’s Kirupa Chinnathambithat takes advantage of new Apache Cordova features to create Visual Studio 2015 projects that target Windows 10 in addition to Android and iOS. To learn more about this new option for Windows app development see “Introducing the Windows 10 Apache Cordova Platform” on the Visual Studio Blog and “What’s New in Windows 10 for Cordova” over on GitHub.

For more typical mobile application Cordova projects targeting Android, iOS, and Windows Phone, take a look at the Cordova Multiplatform Template, which uses Gulp/Node, Ionic/Angular, SASS, and TypeScript. The template was created by Quique Fdez Guerra. You can learn more, find documentation, and play with a demo at the Cordova Multiplatform Template Web site and learn more on the CKGrafico blog (¡En español!).

Caliburn.Micro
Like using Caliburn.Micro as the base framework for your XAML MVC/MVVM applications? Bogdan Bujdea created a simple Caliburn.Micro Windows 10 Template for Visual Studio 2015. Now you don’t have to waste any time installing Caliburn.Micro for a new project. Just open the template and start coding.

Cool backstory here: Just getting started with developing for Windows 10, Bujdea was inspired by other community contributions that helped him learn. So he decided to create the Caliburn.Micro Windows 10 Template and share it right back. High five! Read the story over onBujdea’s blog.

SOLID Enterprise Apps
If you’re starting a new project and want to get it organized right from the start, take a look atAlexander Viken’s Enterprise Application SOLID Solution template, which sets up a boilerplate solution containing five projects in solution folders based on the SOLID principles. By default it sets up Documentation, Presentation, Business, Domain, Data, Cross-Cutting, and Deployment layer folders for your solution, and pre-configures the Business, Domain, Data, and Cross-Cutting layers with boilerplate code and test projects.

If you’re not familiar with the SOLID principles for object-oriented programming, definitely read Uncle Bob’s original “PrinciplesOfOOD” article, as well as Samuel Oloruntoba’s “S.O.L.I.D: The First 5 Principles of Object Oriented Design” (with handy code examples) and William Durand’s “From STUPID to SOLID Code!

Data-Driven Dynamic MVC
Here’s an interesting idea for building data-centric Web applications: Chis Perry’s Dynamic MVC template (also available as the Dynamic MVC NuGet package) lets you dynamically create Controller methods and routes based on metadata from your Model objects. Perry has a series of project-based tutorials on the Dynamic MVC Web site showing you how it works. I see a lot of potential for bad data-myopic implementation here, but also a lot of potential for building data-smart apps if used wisely.

Web Applications
Speaking of the World Wide Web, it probably wouldn’t surprise you to know that there are dozens of Visual Studio Web application templates covering almost every conceivable combination of technology stack and JavaScript framework. It looks to me like popular choices are converging on mash-ups with one or more of the following: Angular, Bootstrap, SASS, and LESS. Here are a few new choices and very popular old ones.

Let’s start out with Aby Mathew’s ASPNET MVC ANGULAR Project Template, which is configured up front with ASP.NET MVC 5.0, Angular, and Web API 2.0, along with Bootstrap and Angular’s ng-grid Data Grid (soon to be known as UI Grid).

Muhammad Rehan Saeed put together a very comprehensive ASP.NET MVC Boilerplatetemplate based on Microsoft’s default ASP.NET MVC template, but with a greater emphasis on security, performance, search engine optimization (SEO) and social media integration, accessibility, and browser compatibility, among other features, right out of the box. A key, unique feature added by Saeed: “liberal use of comments and even gives you a checklist of tasks which you need to perform to make it even better.”

The AngularJS SPA Template, by Konstantin Tarkus, is a port of the Angular Seed project optimized for creating single-page Web application (SPA) projects in Visual Studio. It includes AngularJS, Bootstrap 3, HTML5 Boilerplate, Razor, and the ASP.NET Web Optimization Framework. This looks like a really well thought out starting point for SPA apps.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s