Posts tagged: ASP.NET

Provider Model is Win

The provider model’s goal is to allow for the abstraction of implementation to the nth degree by allowing for the choice between separate implementations of the same functionality. This design pattern is incredibly common in Microsoft’s ASP.NET, especially in the realm of security. Developers can choose between different providers for membership, roles and authentication for a single site. The point is that the core functionality of the site does not change, only the implementation. Below is a quick snapshot of how such a model is used in Vodka.

The driving force behind the provider model is the abstraction of the implementation. This is done via an interface.

1
2
3
public interface IAuthenticationProvider{
	bool Authenticate(string username, string password);
}

What gives the provider model its meat and bones is the different implementations of the above interface. The two implementations below represent two authentication backends: an ActiveDirectory installation and an Sql database. Although the meat has been stripped from these two classes, it is clear that their implementations would differ enough to have the two separate classes. Read more »

Frustrations…

Ugh. It frustrates me how some companies can leave out even the most basic of functionality, like disabling the editing engine so you can edit XML straight like the following shows:

FGDN

Senior Project

My senior project involves the study of highly extendible systems for the internet, mainly content management systems/solutions. I am building mine in ASP.NET 3.5 on WS2008, SQL2008 and .NET 3.5 (which includes WCF). The goal is to build a system that has plug-and-play services and is both quick and easy to use. Today I got the very first part of this system up and running and can be reached at jsedlak.homedns.org.

There is a lot of work to be done, but the base code (being built into FGF) is coming along very nicely. Once I can figure out security, the project should simply expand exponentially provided I have the time (ugh!). The two main [sub]projects here are FGDN (Focused Games Developer Network) and a simple CMS similar to that of WordPress, SharePoint, et al. The first is designed to allow users to submit bugs, feature requests, etc. easily much like Microsoft’s Connect. The latter is pretty self explanatory.

Because I am building this all as one interconnected solution, I have also started working on the idea that users that exist in Vodka [may] have access to many other parts of Focused Games. Primarily this means FGDN but also the SVN repositories. A user (you) can apply for access to one or more of the repositories I currently use for my source code. Once you are accepted, you are also connected to any other Vodka service I create. Pretty nifty, eh?

Hosting A Page Inside A SharePoint Page

One of the tasks I had recently was to get not only a web page into a SharePoint page but also pass in parameters from the Query String. Let’s say I am going to create the page at http://localhost/sharepoint/mypage.aspx in a normal way. In order to host a page inside that SharePoint page, we can use a Page Viewer Web Part, but this limits what can be done. Instead, we can create a custom web part to do the work…

Please excuse me if the code isn’t exactly correct. I do not have the code in front of me right now and will update it when I do.


1
2
3
4
5
6
7
8
9
10
11
12
13
public class CustomWebPart : WebPart {
    public override void Render(HtmlTextWriter writer){
        string rawUrl = Context.Request.Url.OriginalString;
        int index = rawUrl.IndexOf("?");
 
        string query = String.Empty;
        if(index != -1) query = rawUrl.Substring(index);
 
        writer.Write(
            "<iframe src='http://localhost/sharepoint/myOtherPage.aspx" + query + "' width='100%' height='765px'/>"
        );
    }
}

I Do Not Understand The Difference…

I do not understand why the difference between ASP.NET and PHP hosting is so gigantic. They are completely different beasts and I understand that most if not all hosts running ASP.NET are using Windows Server to do so, but why are the packages and reliability so different? It doesn’t make sense to me that on a PHP host you can get the same reliability as an ASP.NET host for the same price with one major difference: the PHP host gives you gobs of bandwidth and space. Here are some hosts and what I have experienced so far (from worst to best)…

WebHost4Life
ASP.NET, PHP, etc. and Unlimited Bandwidth
WebHost4Life was one of my first ASP.NET hosts and was used largely because I could run PHP alongside my normal web apps. This is a huge plus since I run a PHP-based forum and did not want to force my users to recreate their users, et cetera. So what was the problem with WebHost4Life? Daily downtime of an hour or more at roughly 2AM GMT -5 due to the AppPool being reset. This is completely unecessary and about the worse thing a host could ever do, especially when claiming 99% reliability.

BlueHost
PHP, unlimited everything
BlueHost was my first real host and I have had my account for over two years now. What can I say about them other than they are amazing, especially for Shared hosting. I am running three sites on them now and am having no problems so far with scalability. But because accounts are so cheap compared to ASP.NET hosts, I can easily buy a second or a third if need be. Only problem? The CEO has told me in a private e-mail that he will never support ASP.NET on BlueHost, ever. Saddening because they could do great things for the ASP.NET world.

Reliable Site
ASP.NET, PHP
Reliable Site has been a great host for me up until recently. They were always great on support and always willing to help me out. Reliability was top notch: I didn’t experience a single second of downtime on my Clustered account, even when hosting four sites. The problem? They expect you to pay $8 a month for a mere 40gb of extra bandwidth on a rolling schedule. That means that bandwidth isn’t calculated per month but per last 30 days. This may be nice if you have consistent days, but spikes can ruin your bandwidth for 30 days. You have no chance of timing a release for the last 2-3 days of a month because it won’t matter.

I have experienced other hosts but they really aren’t worth mentioning. I just wish I could find a host that did what ReliableSite does but was easier on the bandwidth pricing. Especially when DreamHost, BlueHost and several others offer 5tb and more of bandwidth per month for less money.

WordPress Themes