Full service digital agency.

Wij ontwikkelen digital experiences die een glimlach op je gezicht toveren

Leer ons kennen

NL slash EN

TamTam launches its first ASP.NET Core 1.0 website

A complete rewrite of .Net, that’s ASP.Net Core. As geeks and technology addicts as we are, the release of the ASP.NET Core 1.0 was just too exciting. We just couldn’t wait any longer to get our hands on it, so we decided to convert deptagency.com website to ASP.NET Core 1.0. Wanna know our thoughts about it? Just keep on reading!

 

 

The first version of ASP.NET 1.0 came out almost 14 years ago. Since then developers of TamTam (part of Dept) have used it to build and run great apps. On the 27th of June the new ASP.NET Core 1.0 was released with the promise of being leaner, more modular, cross-platform, open source, and cloud optimized. For the first time ever ASP.NET is officially supported on Windows as well as on Mac and Linux!!

Main features

  • the System.Web.dll monster is gone! ASP.NET Core is no longer based on System.Web.dll
  • Modular — a bit like Node.js (for those who know it), you only add the modules you need. If you need to serve static files, you’ll need to add it to the pipeline (yes, even for static files!)
  • Performance improvements
  • Cross platform — builds and runs on Windows, MacOs and Linux
  • Web API and MVC stacks have been unified into a single one (MVC)
  • Tag Helpers — no more @html.labelfor or stuff like this
  • In built Dependency Injection and logging (you can still opt to use your the ones of your own preference)
  • IIS independence (although advised in Windows). You’d rather host your application with nginx? feel free to do it
  • Visual Studio is no longer required. You can do everything through the command line
  • Open source

What have we exactly done?

Exciting new features, right? We were so excited that we felt the need to try it immediately!
The DEPT website is a simple static website and a perfect candidate to start trying out ASP.NET Core. As this is all new for us and we didn’t have any experience with it (yes, we felt like junior developers!), we decided to start small and simply convert the website to MVC and render the vacancies in the backend instead of doing it in the browser using javascript. We know this is not rocket science but we had start somewhere and further ahead add more features like translations, events, etc…

Frontend wise we changed our development setup by making it watch the .NET files and listen for any changes made to those files. This enabled us to implement templates directly into the backend without the need of a test server to test if a change is working. Now, when you save a ASP.NET razor template file it will instantly reload the page, by using BrowserSync and a script that will run a shell command to recompile the .NET code. Altering the frontend setup was a minimum effort but should be able to save a lot of time in the future. All in all we were amazed in how easy it was to setup ASP.NET core.

Oh, did I forgot to mention that we are hosting it in a Linux server? Yes, we are hosting it in Linux! We felt the need to try out this new possibility!

Check out the ASP.NET Core version of the website here!

What have we experienced?

We did this conversion/porting of the website in an hackathon style (group of geeks gathered after work to play around with tech) with three of our developers (one frontend and two .NET backend developers). Wanna know how we felt? You can either read the whole text or simply read the text in the screenshot! 🙂

Adrian’s first time with ASP.NET Core or .NET at all

(frontend developer/non-.NET developer)

Starting off this project as a Frontender I was sceptical about setting ASP.NET Core on a non-windows machine. However I’ve got proven wrong whilst setting everything up. Microsoft has done a great job providing the installation instructions for all operating systems. It literally took less than 5 minutes to download, install and get the project up and running.

Adrian's first

Jorge’s first time with ASP.NET Core

(backend .NET developer)

Using ASP.NET Core for the first time was exciting. First you’ll start looking at your project folder and be like “What are all these json files? and what happened to my usual “huge and complex” web.config?”. Well, it’s not completely gone but, unless you are using IIS, you don’t need it! Your application settings have been moved to appsettings.json file, where you can organize and structure them in a better way. Also, nuget packages are managed in a project.json file and guess what, it has intellisense! NuGet packages can be easily added or changed in the project.json file and Visual Studio monitors the file so that every time it is changed, it will update your packages under the hood (don’t worry, you can keep using the Nuget package manager to search and manage your application nuget packages as well).
Code wise, You will find some differences compared with the libraries you are used to. Some method names changed, others don’t exist or there are new ones.
Overall it was an exciting experience to see all the new changes and how easy it was to work with them and get used to.

Miguel’s first time with ASP.NET Core

(backend .NET developer)

As a curious developer that I am, I had already read a few things here and there about ASP.NET Core (back then still ASP.NET 5 and then ASP.NET Core RC1 and RC2) but I had never done anything with it. Even though I had read a few things, I really felt like a junior developer starting his career and learning everything from scratch. I was like “how can I set my MVC routes?”, “where is everything that I’m used to?”. Simple things like creating an error page took me one hour and I also had some trouble understanding how errors are handled (because… no one reads programming manuals, right?). Resuming… I have a lot to learn here!

Should you use it for your new projects?

Although Microsoft advises its use for new projects, we’d advise you to wait a bit unless you have special needs like running it in a Linux server. One of the reasons to hold back for now is that some of the third party libraries we use in most projects are probably not available yet for ASP.NET Core 1.0.

If you want to port an existing MVC/Web API application you can but keep in mind that it will take you some time and you might also miss some libraries. Porting old Web Forms applications is definitely a NO GO. There is no such thing as Web forms in ASP.NET Core and it is probably easier to start the project from scratch than porting web forms to MVC.

Problems/Downsides you might face at the moment

  • The tooling (read Visual Studio) is still in preview.
  • Most libraries we currently use are probably still not available for .Net Core
  • Does not have all the functionality of ASP.NET 4.x stack (for example, SignalR and Web Pages are not yet available)

This is an exciting moment for the .NET world and it’s just the start of a new era. More/new features will be coming in the future (the next release is planned for Q3 2016).

To all developers out there, I can only say TRY IT (download it here) even if you are not really into .NET!

Questions?

We’re not (yet) ASP.NET Core experts but if you have questions feel free to contact us. You can also check this page about the announcement or just follow this MS blog about webdev to get the latest news regarding ASP.NET.


Miguel Pinto, Developer

miguel@tamtam.nl

+31(6) 1588 0269

Connect