Wednesday, May 1, 2013

CDNs

I believe I understand the purpose of a CDN.

  • The network is distributed across the world and would be configured to reach a server closer to you.  
  • More websites would be likely to reference the same file and would not need to download itself again ...
  • The CDNs are designed to handle larger traffic than yours
Those are the ones that pop off the top of my head.

At my company, we decided to use CDNs for our internal intranet website.  I just don't understand it.  The server would be locally hosted.  The files are small.  We needed to white-list our files to get through the firewall.  The thin-client that they log into would not be accessing any external websites.


Sunday, December 25, 2011

Going to School

I'm an old school web developer. I've been on a bit of hiatus since I've last worked on web applications. The last time I was half-decent developing web applications: I was using some form of scripting language. Be it: PHP or ASP.

I think that developing applications back then was so much easier. It was fairly straightforward. I used to always create the same things though. There were boilerplate concepts that you could use to create a user, session ... how to use cookies ... hashing passwords. Coming back to create a web application under best practices is absolutely harder than I thought.

I wanted to use the NHibernate ORM. I didn't want to read (how silly of me) any books. I wanted to be able to Google / StackOverflow this. I have a policy about reading technical books. That policy is that I have to be familiar with the technology first. It sounds a bit backwards, but if I read a book first and then try it ... it will feel irrelevant or less valuable. If I struggle a bit and then read the book I can immediately form a link. It's just how my brain works.

Anyways, NHibernate, NuGet, ASP.NET MVC 3, Ninject, Log4Net. I also wanted to do things properly and follow some standard patterns. I read multiple arguments about the repository pattern versus unitofwork pattern. Arguments against each of them and all sorts of jazz. I read about RSignal. I felt as though I had too much to get off the ground to get a project up and running.

It took me three days to figure out how to use Dependency Injection properly. I'm also confused as to how Ninject figured out how to do constructor injection into my controllers without writing any sort of logic like is necessary for Castle Windsor.

I also had to use BCrypt to hash my user passwords to guard against rainbow attacks. Bloody hell, is all I say.

Also trying to make this thing localized properly has been a pain in the ass as well.

I'm not using any MembershipProvider BS either. I'm doing my own thing entirely. I have to write a wrapper for this entire thing.

What else do I have? I think TDD is awesome, but it's not good for exploratory coding. In my opinion, performing unit testing is awesome and should be done for ensure functionality works. However, if I knew exactly how to approach my design, I would be using TDD. Right now, I'm just guessing at what I'm doing, so I'm not going to use TDD. I don't want to rewrite the interface and subsequently, X number of tests.

Wednesday, May 25, 2011

Decisions Decisions

Here's a list of the following issues that I have ran into just deciding how to start my project:

jQuery or Prototype
ASP.NET MVC or ASP.NET Web Forms
Razor or Spark
NHibernate or Entity Framework 4
MS SQL Server or MySQL
Castle Windsor or Unity or ...
Mercurial or Git

Why did I choose jQuery over Prototype? I'm more familiar with it. jQuery is easily more popular as well. That doesn't really mean anything to be honest. Prototype could probably be just as capable. If not, more.

ASP.NET MVC over WebForms? That's quite simple. WebForms has the page lifecycle. I hate the page lifecycle mechanism. You either play with the web or you don't. Also, the fact that Ruby and Python follow this type of methodology: it just makes me think there's no going back. What's funny is that I've been doing WebForms for a while and things have just gravitated away from using .NET controls.

I chose Razor over Spark just because I went through a Razor tutorial. I don't think ViewEngines are particularly special. I'm sure I could swap and rewrite entire Views if there was a giant issue ... which I don't think is possible.

NHibernate VS EF4 ... this has been my biggest battle. I'm choosing NHibernate simply because it's more mature. I don't doubt that EF4 has its advantages but I've decided on what I've decided on.

MS SQL Server vs MySQL. For this stuff, it's quite obvious. I'm going with MS SQL ... it's a .NET Stack. It's an expensive option though. I would not want to get licenses for my servers for this stuff.

Castle Windor ... for the hell of it. There's also Ninject and a few others. I don't really care that much about IoC containers right now. Castle Windsor is easier to set-up so it wins.

Mercurial has BitBucket, so it wins. Otherwise I'll need to OpenSource my projects. TortoiseHg looks like an interesting product as well. Straying away from TFS now reminds me of the TortoiseSVN days.

My task list for tomorrow is to go through FluentHibernate / Hibernate and Mercurial tutorials. Also writing the scripts to set-up the database and then check-in the solution for the first time.

Joys.

Tuesday, May 24, 2011

Program Management Software

I am currently unemployed. We're attempting to undertake a fairly ambitious project. I've attempted to work on ambitious projects before. They've never went well.

In any case, here's the technology stack: ASP.NET MVC3, C#, MS SQL, NHibernate.

I found a website called S#arpArchitecture. It takes three technologies and builds up the information for you so that you can just easily get started with your application.

What's my problem with Sharp Arch right now? Two years ago I read a post about the need to separate controllers into a separate assembly. Without doing so it'd lead to code degradation and a higher probability of messing up.

Last month they put it back to restore IDE functionality and saying it's trivial to remove if that's your bag. Not much of a justification.

I went through the Orchard code and I'm not sure but I think they attempted to do authorization in a controller class. I'm sure they did it properly so that even if you add a Cache attribute that you won't get funny behaviour. My only issue is that there are Authorize attributes that facilitate everything you need.

I've also never use NHibernate before and I'm contemplating whether I should use EF4 or NHibernate. This is frustrating.

Saturday, February 14, 2009

Introduction

Hello, my name is Robert.

I've been coding for the better part of my life and this is my foray into web 2.0. I hate the term web 2.0 because it's totally devoid on content.

I've been coding in .NET for a short period of time but I've done a lot of classic ASP, JSP, and PHP 3-4 programming before that. Needless to say, things are different from the way that I've learnt how to code.

I'm mainly writing this blog to consolidate a lot of my thought processes when dealing with this stuff. There's too much tech out there now. Too many new frameworks and libraries. Just too much code.

Lately, I've been interested in dwelling into JQuery. Needless to say, at 2009, that JQuery is quite popular. Attempting to learn this has gotten my lead developer riled up. He's very pro-MS. He only wants to use Microsoft's AJAX solutions. He thinks that doing a lot of client-side coding is going back to the old classic ASP ways. His justifications are simple: Microsoft takes care of things like 'state' and whatnot for you. He also states that MS technologies are simple, insofar, as any developer is able to jump in.

My opinion is that writing software is meant to be hard. It's hard for anyone to jump in. What you should be doing is commenting your code. Writing code as simply as possible. Writing good documentation. Writing good tests. And also, helping people transition into your code.