Fortsätt till huvudinnehåll

Inlägg

Visar inlägg från juni, 2018

Client package manager for Visual Studio

While following the examples in the Pro ASP.NET Core MVC 2 book I realized that currently it doesn't exist a package manager for JavaScript packages with good integration with Visual Studio. Prior to version 15.5 a package manager named Bower was integrated with Visual Studio. This support was however removed and the plan is to add support for a new package manager, called Library Manager, or LibMan for short in version 15.8 of Visual Studio. But the current version 15.7.4 have no good integration with any JS package manager. So, what can you do about it? Well you can use the Node Package Manager, npm. This has some integration with Visual Studio and adding a package.json to the root of your project lets you specify packages that is downloaded for you. But, the downloaded files are not included in your project, instead they are just downloaded to a folder named node_modules in your project directory. So, how do you add the files you need to your project? Well first of all, be

Hurt

I have to take a week off from coding 😢. Today I accidentally cut myself in the hand quite bad while cooking and had to go to the emergency to get stitched back together. Lesson learned, nerds should stay away from sharp objects.

Making some changes to the ASP.NET learning plan

After some thought I have decided to put some more time into the "learning by doing" parts of my focused ASP.NET learning. Even though the Little ASP.NET Core Book is a great resource for getting started quickly with ASP.NET Core it relies heavily on the MVC and Identity templates. Using templates is a nice way to get started quickly, but it also encourages developers to treat important features, such as authentication, as black boxes. I really want to learn things in depth so I will spend some more time on actually writing a couple of sample sites using a Empty template. To help me on my way I have decided to go with the book  Pro ASP.NET Core MVC 2 by Adam Freeman.

ASP.NET Core sample site done

Following the hands-on tutorial in The little ASP.NET Core book I was able to put together a sample ASP.NET site in just a couple of days. The book is targeting ASP.NET Core 2.0 but I attempted to use the latest official release, which at the time of writing is ASP.NET Core 2.1.300. I didn't expect any breaking changes between a version 2.0 and 2.1 but there actually are some things that do not work exactly as they did in 2.0. I have written them down on my GitHub page and there is also a feature request available on the book's GitHub page to change it so it is compatible with version 2.1 of ASP.NET Core. The author of the book, Nate Barbettini, has made a great work and I can really recommend having a look at the book. It is available for free at his website. However, if you want every sample in the book to work without any modifications you should probably use ASP.NET Core 2.0 for now.

Git repository for ASP.NET focused learning

I set up a Git repository on GitHub for the ASP.NET focused learning project, see https://github.com/Backhage/LearnASP.NET . Thanks to the Creative Common licensed book "The little ASP.NET Core book" things are progressing a lot faster than I initially planned. The book is a step-by-step guide that takes you through the details on creating a SQLite backed site with ASP.NET Core MVC. It shows you how to do it and explains why. If you, like me, have a couple of years of C# coding behind you most of the things will be quite easy to grasp. Entity Framework is used to work with the database making it easy to use LINQ queries to access data. The things that are a bit unfamiliar is the front end stuff. I created my first website in 1997 and wrote quite a lot of HTML and even some ASP (the old kind, not the ASP.NET kind), PHP and JavaScript during the years following that. However, I haven't been writing much front end stuff since then. But at least some if it is still fami

Focused learning, ASP.NET

I have decided that it is time to really broaden my knowledge on a specific topic. With all the things I have going on beside learning new, coding related stuff, stuff (full time work, family with two kids, and marathon training) I need to set up a study plan, goals and set off time for focused learning. The topic I have in mind is Web-based applications. I am thinking ASP.NET, Typescript, and Entity Framework. The application can be my good old friend "The Record Collector". Here's a quick plan, may have to be revised. Weeks Reading material. Collect links, books, etc on the topic. Tooling. Ensure all required tools and resources for developing and hosting a database backed ASP.NET web application are available. Sample site. Follow guide/tutorial to set up a sample site. Domain Model. Design the core domain model for the Record Collector application. Core implementation. Implement core functionality. Focus should not be on UI and persistence. Finish up core

Android Studio Impressions

I have some previous experience with Jetbrains IDE for Java development, IntelliJ. And I have a couple of years of experience using their Visual Studio plugin ReSharper. I think both of the products are great and therefore I was happily surprised to see that Android Studio is built on the IntelliJ Platform . If you know IntelliJ you will feel right at home using Android Studio. Of course there are several Android specific features, like automatic install of the Android SDK and support for starting and running your app directly on an Android emulator or on your own Android device. You also have access to a built in layout editor that you can use to design the UI for your app. It has some similarities to the layout view in Visual Studio that you use when designing UIs for WPF applications (like drag and drop of visual components, properties listing, etc). Overall it is pretty neat and easy to understand and work in. Of course you still have the possibility to edit the underlying XM