For any blog discussions, questions, or comments, I’ve started a Slack channel. Feel free to pop in and start up a conversation.
Ramblings of a software developer..
posted on July 17, 2015 by long2know in Uncategorized
For any blog discussions, questions, or comments, I’ve started a Slack channel. Feel free to pop in and start up a conversation.
posted on July 16, 2015 by long2know in angular, JavaScript, jsfiddle
Earlier today, I helped a colleague on a small issue. That issue was giving focus to an element in a modal once the modal is loaded.
This seems trivial, but it’s actually not entirely straight-forward due to Angular’s digest cycle.
As usual, I wanted to wrap this into a reusable directive.
posted on July 16, 2015 by long2know in angular, ASP.NET, JavaScript, jsfiddle
In many of my latest applications, it’s necessary to have data drive what a form-element actually lets the user enter. For example, I may have a drop-down to select a property, and then, based on that property, a common text-box is used for its entry.
Sometimes its nice to have the data-type of the property drive a user-friendly experience.
posted on July 13, 2015 by long2know in ASP.NET, Web
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.
posted on July 7, 2015 by long2know in Web
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.
posted on June 22, 2015 by long2know in angular, ASP.NET, MVC, Web
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.
posted on June 16, 2015 by long2know in Web
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.
posted on May 28, 2015 by long2know in ASP.NET, OWIN, Security
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.
posted on May 27, 2015 by long2know in ASP.NET, OWIN, Security, Web
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.
posted on May 15, 2015 by long2know in Microsoft, Testing, Web
Earlier today, after a system outage, I was sent a W3C IIS Log to take a look at.
After staring at this log for a few minutes in Notepad2, my eyes started to glaze over. Basically, staring at system or IIS logs with a text editor is useless if there are tons of events or requests.
I knew there are plenty of parsing tools out there for log analysis, and I had used some before. Unfortunately, I had none of these tools installed on my laptop. Googling quick lead me to a Microsoft tool called ‘LogParser’ that I had never heard of before.