Author’s Archive: long2know

Home / long2know
245 Posts

Over the weekend, I attended Codestock. One of the sessions that I attended dealt with a subject I had wrestled with myself: eliminating string literals.

While the session focused on HtmlHelper extensions for MVC, I have used the same techniques for building general LINQ expressions, queries, and other useful aspects.

More Link

Earlier today, I was messing with displaying forms within a dialog.

The basic view was split into a 2-column layout with some information on the left and then the actual form elements on the right. My form happens to have a textarea in it. Additionally, the left-hand column can expand to some predefined max-height with a scroll-bar applied. This works well, but it creates a visual problem in that the left-hand column can be taller than the right-hand column and its form elements.

More Link

After my brief primer (Part 1) of the things I’m looking to accomplish with Angular in what I consider a large-scale application, I’ve had a week or so to toss around ideas and get a solid foundation.

To recap, I want this application to avoid becoming an unruly, behemoth that is unmanageable. I want core, reusable components to be separated from core functionality. That is to say, I want loose coupling. The application should have hooks, navigation, and what not that is self-aware while allowing multiple developers to create their own discrete set of functional areas. In that vein, or to that end, I want “areas” to be independent for the most part and, as such, developers should be able to work on the individual functional areas without stepping all over each other’s code, or worrying much about breaking other parts of the application.

More Link

Earlier today, I was playing around with a web application that I’m working on, and I was reminded that it needs to play nicely with mobile platforms.

So, a colleague of mine reminded me of a handy feature in the Chrome dev tools that I had somehow missed previously, and thought it was worth sharing.

More Link

This week, my team and I have embarked on a new large scale application.  It’s predominately your typical web multi-tier web application with business logic, security, CRUD, and what not.

However, it’s also going to be an Angular Single Page App (SPA). Thinking about the structure of this application, in terms functional blocks and project/solution layout is pivotal in the design and engineering process.

More Link

Over the weekend, yesterday specifically, I competed in the Double Dip Triathlon. This was my first triathlon, and it was good to get this experience under my belt.

The Double Dip Triathlon is a sprint distance triathlon with distances of 300 yards / 16.5 miles / 5k for the swim/bike/run.

More Link

After creating a redistributal package for a custom OWIN AuthenticationHandler that handles logins to an internally hosted Oauth2/SSO provider, I found something a little annoying.

When OWIN detects a 401 response and the AuthenticationMode is “Active,” it doesn’t capture the URL hash from the request.

More Link

Being able to decrypt the OWIN AuthenticationTicket can be very useful. In the cases where the cookie/tickets are shared across applications, this is especially true.

Interestingly, if you’re using OWIN for both cookie-based authentication and access tokens, the Ticket is stored in both mediums.

With that in mind, the easiest method to decrypt a ticket to access claims, etc is to simply stand up a protected Resource server with a single Api endpoint to display the contents of the ticket. Going this route, the decryption is automatically handled by OWIN with very little code. The endpoint can be accessed by a user’s browser (decrypting the cookie) or by a server passing in a Bearer token.

More Link

With my previous endeavors using OWIN Middleware for an SSO Authentication system, I used DotNetOpenAuth as the client to make the OAuth Authorization Code grant flow. However, after a bit of research, I’ve learned that hooking into the OWIN Middleware can completely eliminate the need to use DotNetOpenAuth.

Additionally, eliminating DotNetOpenAuth and its dependencies makes creating a Nuget reusable package for the applications that I intended to use with the SSO/OAuth2 mechanism much simpler.

More Link

Earlier today, I started looking at Angular 2.0 and the differences with Angular 1.x. The primary difference, aside from API changes, is that Angular 2.0 uses ECMAScript 6 (ES6 JavaScript).

ES6 is quite different from ES5. To be honest, I am still wrapping my head around the differences between ES6 and ES5. From a cursory perspective, many components/modules/elements that previously required JavaScript libraries are now native. Additionally, ES6 is more class driven than ES5 and supports observables.

More Link