Friday, August 26, 2005

Im back

I’m back
So after a long break due to getting married, and business I am back on the blog.

Sunday, April 24, 2005

ASP.NET 2.0 ~ A Winner

Week 1
Well, week one developing with ASP.NET 2.0 Beta 2 is in the books. So far, I am extremely impressed. It is finally possible to separate code from content; to develop in an object oriented manner on a web application.

Let's face it, developing web applications thus far has looked as much like developing an application, as developing in Apple Basic resembles developing in C#. Up until now, despite the best efforts of ASP, ASP.NET 1.1 and PHP, it has had more to do with scripting that objects.

With the aforementioned languages, it was most definitely possible to create robust web applications and even to do it in an object oriented manner, but when you got down to the brass tax it was still a scripted language.

I have been coding for 15+ years and I can tell you it has been exciting to watch the emergence of each one of the languages I have learned. I like many developers enjoy learning new languages, especially languages that allow you write elegant code. Of course, elegance is in the eye of the beholder but the language must still allow it.

ASP.NET has all but bridged that gap between writing a Windows Forms application and a Web Application. Extensive event handling, rich UI elements, a strong security model, great database connectivity, Master Pages for consistency, and the new adaptive rendering model guarantee ASP.NET's opponents will reconsider using this formidable platform.

I should mention, that the .NET Framework 2.0 (Whidbey) in generally is as vastly improved as ASP.NET is in this release. I am impressed with the changes made to this wonderful language. I know that many developers are not happy with some of the new coding semantics introduced by generics and some of the other changes. To those persons, obviously more C# developers thought the benefits outweighed any akwardness related to familiarizing oneself with these new constructs.

To the C# team, great job!

Tuesday, April 19, 2005

Arena Wars || Official Website

C# Game Development

There has been continual debate as to whether or not C# could be used effectively and efficiently to develop a AAA game on top of the .NET platform. The C/C++ die-hards are convinced that it is not possible because of the fact that C# is a managed language.



Well, C/C++ eat your hearts out. A consortium of German developers has created a game called ArenaWars. It is a RTS (Real Time Strategy) game and it totally kicks ass. Below is the link to the official web site, where you can download a fully playable demo. The demo features on-line multiplayer gameplay, as well as tutorials, and single player missions.



Good job guys!

Arena Wars || Official Website

Saturday, April 09, 2005

Uggh! Major Computer Issues!

So today started out like any other day. My computer, which is by no means new, starts freezing up intermittently. The old mouse stops moving scenario. At first, it's just a few seconds. A few minutes later its 20 seconds... An hour passes it's 30 seconds. By 3:00pm the computer decided that it had had enough hours of Tribes 2, Visual Studo, MX Studio, and of course DVD movies. It made a sound unlike any I've ever heard one of my computers make. Kind of a woosh mixed with a buzz. I have tried demonstrating the sound for some of my friends and either they aren't impressed or I am just not doing it right.

With the work-load on my plate right now, I couldn't just sit there. I called my business partner Aaron, and we talked it over. First was to repair the computer. Was it worth it? It's been on the path of slow demise for awhile, and it's 2 or 3 years old. With the price of computers these days, we decided to get a new one.

I found myself an open-box (bought and returned) Sony Vaio Widescreen. 3.06GHz. This thing kicks ass. 802.11b/g built in. I am sitting on my couch writing this blog entry. How cool is that?







Wednesday, April 06, 2005

I speak! Yet again...

Web site updates
I am currenly migrating my entire I/T Infrastructure for Webglimmer to a Windows 2003 Server. As such, my entire Seth Webster web site is down since I host my web site on the business box.

I will be using this blog as my soap box for the next month or so, until I have time to put the site back up. I've had this blog for awhile, but haven't really used it.

Thanks for stopping by!

~ Seth

Saturday, January 22, 2005

C# Plugin In Architecture

Introduction
I have recently started developing an application for a client that allows them to manage various parts of the database that we built for them.

I am developing the system so that it is auto-updating and also completely plug-in based, in that the application is basically only a stub that loads the plugins.

I developed it this way for the obvious reason, that since the database and the requirements will be quite fluid, and changing all of the time, I wanted an easy way to roll out changes to them without compromising the original intent.

Interfaces
I developed the plugin system using a base of interfaces to define the contract between the plugins and the host application. In this manner, we can create a concrete definition of what the application expects from the plug in, and what the plug in can expect from the application.

1. IPlugin

namespace NPIMSPI
{
///


/// Summary description for IPlugin.
///

public interface IPlugin
{
void Initialize(IPluginHost host);
string Name
{
get;
set;
}
PluginTypes Type
{
get;
set;
}

IPluginHost Host
{
get;
set;
}

string Author
{
get;
set;
}

string Version
{
get;
set;
}

void Show();

System.Windows.Forms.UserControl MainInterface
{
get;
set;
}
}
}

This interface defines the base interface from which all plugins will inherit. You can see that it provides a method for Initializing the plugin (Initialize()), a method to Show the plugin (Show()), and 6 get/set definitions for various properties.

One notable get/set definition is the MainInterface definition. This is the get/set method that will tell the host application what component to add to the plugin container (in this case a tab control). More on that later.

2. IPluginHost


public interface IPluginHost
{
void Register(IPlugin Plugin);
void SwitchMenu(System.Windows.Forms.MainMenu Menu);
string Request(string Method,NameValueCollection Arguments);
string Request(string Method,string Argument);
string Request(string Method,string Argument,bool CloseOnComplete);
string Request(string Method,NameValueCollection Arguments,bool CloseOnComplete);
void Stop();
void Stop(string Message);
PluginCollection AvailablePlugins
{
get;
set;
}
void CloseWebServiceForm();
}


This interface is inherited by the host application. It defines the methods and properties accessible by the plugins. The request methods are there since the plugins communicate through that application to a web service which provides XML results to queries by the plugins. Again, we'll cover this a bit more later.

Enum - PluginTypes
This enum is simply allows for the plugin to tell the host application what type it is. This is used for when the host application registers the plugin. There are three types at this time; Menuitem, Tabitem, ButtonItem.


namespace NPIMSPI
{
///
/// Summary description for EnumPluginTypes.
///

public enum PluginTypes
{
Menuitem,
Tabitem,
ButtonItem
}
}

PluginBase
I decided that since most plugins will require much of the same functionality, that I would build a base class from which plugins would inherit. Appropriately named, PluginBase.
namespace NPIMSPI
{
///
/// Summary description for PluginBase.
///

public class PluginBase : IPlugin
{
#region Private Members
string name;
PluginTypes type;
System.Windows.Forms.UserControl mainInterface;
IPluginHost host;
string version="0.0.0.0";
string author = "undefined";
#endregion
public PluginBase()
{
//
// TODO: Add constructor logic here
//
}
#region IPlugin Members
public virtual void Initialize(IPluginHost host)
{
Console.WriteLine("Init "+this.GetType().ToString());
this.host = host;
}
public string Name
{
get
{
// TODO: Add PluginBase.Name getter implementation
return this.name;
}
set
{
this.name = value;
}
}
public NPIMSPI.PluginTypes Type
{
get
{
// TODO: Add PluginBase.Type getter implementation
return this.type;
}
set
{
this.type = value;
}
}
public virtual void Show()
{
this.Show();
}

public IPluginHost Host
{
get
{
return this.host;
}
set
{
this.host = value;
}
}

public string Author
{
get
{
return this.author;
}
set
{
this.author = value;
}
}
public string Version
{
get
{
return this.version;
}
set
{
this.version = value;
}
}
public System.Windows.Forms.UserControl MainInterface
{
get
{
return this.mainInterface;
}
set
{
this.mainInterface = value;
}
}
#endregion
}
}


The PluginBase is the base class for most plugins, and as you can see inherits from IPlugin. I've implemented the IPlugin members, and created private members to store the information. I've also left the Show(), and Initialize(IPluginHost host); members virtual so that they may easily be overridden.

method Initialize(IPluginHost host)
This method is called as the host application loads the plugin. It passes a IPlugin host to the plugin, so that 2 way communication can be implemented.


Tuesday, December 14, 2004

PC Christmas (Comedy)

And Joseph went up from Galilee to Bethlehem with Mary, his espoused
wife, who was great with child. And she brought forth a son and wrapped
him in swaddling clothes and laid him in a manger because there was no
room for them in the inn.
And the angel of the Lord spoke to the shepherds and said, "I bring you
tidings of great joy. Unto you is born a Savior, which is Christ the
Lord.
"There's a problem with the angel," said a Pharisee who happened to be
strolling by. As he explained to Joseph, angels are widely regarded as
religious symbols, and the stable was on public property where such
symbols were not allowed to land or even hover.
"And I have to tell you, this whole thing looks to me very much like a
Nativity scene," he said sadly. "That's a no-no, too."
Joseph had a bright idea. "What if I put a couple of reindeer over there
near the ox and donkey?" he said, eager to avoid sectarian strife.
"That would definitely help," said the Pharisee, who knew as well as
anyone that whenever a savior appeared, judges usually liked to be on
the safe side and surround it with deer or woodland creatures of some
sort.
"Just to clinch it, throw in a candy cane and a couple of elves and
snowmen, too," he said. "No court can resist that."
Mary asked, "What does my son's birth have to do with snowmen?"
"Snowpersons," cried a young woman, changing the subject before it
veered dangerously toward religion.
Off to the side of the crowd, a Philistine was painting the Nativity
scene.
Mary complained that she and Joseph looked too tattered and worn in the
picture.
"Artistic license," he said. "I've got to show the plight of the haggard
homeless in a greedy, uncaring society in winter," he quipped.
"We're not haggard or homeless. The inn was just full," said Mary.
"Whatever," said the painter.
Two women began to argue fiercely. One said she objected to Jesus' birth
"because it privileged motherhood." The other scoffed at virgin births,
but said that if they encouraged more attention to diversity in family
forms and the rights of single mothers, well, then, she was all for
them.
"I'm not a single mother," Mary started to say, but she was cut off by a
third woman who insisted that swaddling clothes are a form of child
abuse, since they restrict the natural movement of babies.
With the arrival of 10 child advocates, all trained to spot infant abuse
and manger rash, Mary and Joseph were pushed to the edge of the crowd,
where arguments were breaking out over how many reindeer (or what mix of
reindeer and seasonal sprites) had to be installed to compensate for the
infant's unfortunate religious character.
An older man bustled up, bowling over two merchants, who had been busy
debating whether an elf is the same as a fairy and whether the elf/fairy
should be shaking hands with Jesus in the crib or merely standing to the
side, jumping around likes a sports mascot.
"I'd hold off on the reindeer," the man said, explaining that the use of
donkeys and oxen as picturesque backdrops for Nativity scenes carries
the subliminal message of human dominance. He passed out two leaflets,
one denouncing manger births as invasions of animal space, the other
arguing that stables are "penned environments" where animals are
incarcerated against their will. He had no opinion about elves or candy
canes.
Signs declaring "Free the Bethlehem 2" began to appear, referring to the
obviously exploited donkey and ox. Someone said the halo on Jesus' head
was elitist.
Mary was exasperated. "And what about you, old mother?" she said sharply
to an elderly woman. "Are you here to attack the shepherds as prison
guards for excluded species, maybe to complain that singing in Latin
identifies us with our Roman oppressors, or just to say that I should
have skipped patriarchal religiosity and joined some dumb new-age
goddess religion?"
"None of the above," said the woman, "I just wanted to tell you that the
Magi are here." Sure enough, the three wise men rode up. The crowd
gasped, "They're all male!" And "Not very multicultural!" "Balthasar
here is black," said one of the Magi. "Yes, but how many of you are gay
or disabled?" someone shouted. A committee was quickly formed to find an
impoverished lesbian wise-person among the halt and lame of Bethlehem.
A calm voice said, "Be of good cheer, Mary, you have done well and your
son will change the world." At last, a sane person, Mary thought. She
turned to see a radiant and confident female face. The woman spoke
again: "There is one thing, though. Religious holidays are important,
but can't we learn to celebrate them in ways that unite, not divide? For
instance, instead of all this business about 'Gloria in excelsis Deo,'
why not just 'Season's Greetings'?"
Mary said, "You mean my son has entered human history to deliver the
message, 'Hello, it's winter'?"
"That's harsh, Mary," said the woman.
"Remember, your son could make it big in midwinter festivals, if he
doesn't push the religion thing too far. Centuries from now, in nations
yet born, people will give each other pricey gifts and have big office
parties on his birthday. That's not chopped liver."
"Let me get back to you," Mary said.

Monday, December 13, 2004

Welcome to my blog!

Welcome to my new Blog!