Working through Pluralsight intro to Twitter's BootStrap:
"Sleek, intuitive, and powerful front-end framework for faster and easier web development."
So far, I'd agree with that description.
Pretty cool.
Totally smitten.
Listened to podcast about it about a month ago. Meant to check it out but things 'got crazy'.
Stumbled upon blog post referencing it. Thanks to my friend Alvin Ashcraft.
Signed up for a Pluralcast free trial as a result.
Thanks Alvin!
Wednesday, February 13, 2013
Friday, June 25, 2010
App Fabric on win srvr 2008/IIS7
An application server like JBOSS and WebSphere.
Btw, what's so good about IIS7?
Thursday, November 19, 2009
Using ASP.Net MVC Framework to build a highly RESTful Web Service
I dreamed this whole thing and implemented it on my own over a year ago.
Download and install ASP.Net MVC Framework.
See steps 7 -9 of previous post for tweaking IIS.
See the RegisterRoutes method below.
"EntryPoint" is a concrete action method on a abstract base class. It performs common parameter massaging, environment intialization and authentication stuff then routes the request to the appropriate abstract Get(), Put(), Post(), Delete() or Head() method implemented by the current Controller subclass. It does this via a switch block driven by the value of "httpMethod" obtained thusly: string httpMethod = HttpContext.Request.HttpMethod.ToUpper();
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
Route route;
route = new Route("Help", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { controller = "Help", action = "Index" });
RouteTable.Routes.Add(route);
route = new Route("{controller}/{id}.{format}", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { action = "EntryPoint" });
route.Constraints = new RouteValueDictionary(new { format = @"json|pox|xhtml" });
RouteTable.Routes.Add(route);
route = new Route("{controller}.{format}", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { action = "EntryPoint" });
route.Constraints = new RouteValueDictionary(new { format = @"json|pox|xhtml", id = "" });
RouteTable.Routes.Add(route);
route = new Route("{controller}/{id}", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { action = "EntryPoint", format = "xhtml" });
RouteTable.Routes.Add(route);
route = new Route("{controller}", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { action = "EntryPoint", format = "xhtml", id = "" });
RouteTable.Routes.Add(route);
route = new Route("", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { controller = "Home", action = "Index" });
RouteTable.Routes.Add(route);
}
Download and install ASP.Net MVC Framework.
See steps 7 -9 of previous post for tweaking IIS.
See the RegisterRoutes method below.
"EntryPoint" is a concrete action method on a abstract base class. It performs common parameter massaging, environment intialization and authentication stuff then routes the request to the appropriate abstract Get(), Put(), Post(), Delete() or Head() method implemented by the current Controller subclass. It does this via a switch block driven by the value of "httpMethod" obtained thusly: string httpMethod = HttpContext.Request.HttpMethod.ToUpper();
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
Route route;
route = new Route("Help", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { controller = "Help", action = "Index" });
RouteTable.Routes.Add(route);
route = new Route("{controller}/{id}.{format}", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { action = "EntryPoint" });
route.Constraints = new RouteValueDictionary(new { format = @"json|pox|xhtml" });
RouteTable.Routes.Add(route);
route = new Route("{controller}.{format}", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { action = "EntryPoint" });
route.Constraints = new RouteValueDictionary(new { format = @"json|pox|xhtml", id = "" });
RouteTable.Routes.Add(route);
route = new Route("{controller}/{id}", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { action = "EntryPoint", format = "xhtml" });
RouteTable.Routes.Add(route);
route = new Route("{controller}", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { action = "EntryPoint", format = "xhtml", id = "" });
RouteTable.Routes.Add(route);
route = new Route("", new MvcRouteHandler());
route.Defaults = new RouteValueDictionary(new { controller = "Home", action = "Index" });
RouteTable.Routes.Add(route);
}
Removing Services Without Using installutil /u
If you are unable to use intallutil /u assemblyName.exe becuase the assembly no longer exists or something like that, this is the EASY WAY :
sc delete SERVICENAME
I found this on "StackOverflow" derivative called "SuperUser" :
A collaboratively edited question and answer site for computer enthusiasts – on any platform. It's 100% free, no registration required.
http://superuser.com/questions/49185/how-to-remove-a-dead-service-in-windows-xp
sc delete SERVICENAME
I found this on "StackOverflow" derivative called "SuperUser" :
A collaboratively edited question and answer site for computer enthusiasts – on any platform. It's 100% free, no registration required.
http://superuser.com/questions/49185/how-to-remove-a-dead-service-in-windows-xp
Monday, November 17, 2008
Creating RESTful Web Service Using System.Web.Routing Part 1
- Created new ASP.NET web site using VS 2008
- Deleted default .aspx page
- Added Global Application File (Global.asax)
- Added following code to Application_Start() method in Global.asax
Route route = new Route("students", new StudentsRouteHandler());
RouteTable.Routes.Add(route); - Added following class:
public class StudentsRouteHandler : IRouteHandler, IHttpHandler {
public IHttpHandler GetHttpHandler(RequestContext requestContext) {
return (this);
}
public void ProcessRequest(HttpContext context) {
context.Response.Write("<h1>Hello World!</h1>");
}
public bool IsReusable { get; set; }
} - Added the following to the httpmodules section of the Web.config :
<add name="Routing" type="System.Web.Routing.UrlRoutingModule,
system.Web.Routing, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31BF3856AD364E35"> - Edited 'properties' of new web project on 'Web' tab configured it to use IIS server rather than visual studio development server. A new virtual directory is created as a side effect of this.
- In iis.msc edited properties of new site. On 'Directory Security' tab clicked on 'Configure' button and CHECKED the Integrated Windows Authentication check box all the way at the bottom
- Last but not least, in iis.msc edited properties of new site. On Virtual Directory tab clicked on 'Configuration' Button.
Added:
Executable: c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
Extension: .*
All Verbs
UN-CHECK 'Check that file exists'
While trying to get it to work I mixed in a superstitious IISReset. I'm not sure if its required but I think not.
Wednesday, November 12, 2008
Visual Studio Still Refuses to Eat Its Own Syntactic Candy
Its been available since VS 2005 but even as of VS 2008 the designer still generates:
When this will suffice:
_fooGrid.CurrentCellDirtyStateChanged += new System.EventHandler(this._fooGrid_CurrentCellDirtyStateChanged);
When this will suffice:
_fooGrid.CurrentCellDirtyStateChanged += _fooGrid_CurrentCellDirtyStateChanged;
Wednesday, October 29, 2008
How Grownups Debug Windows Service Startups
using System.ServiceProcess;
namespace MyService {
public partial class MyService : ServiceBase {
public MyService() {
InitializeComponent();
}
protected override void OnStart(string[] args) {
//This will launch a debugger
System.Diagnostics.Debugger.Launch();
//Do the real job
MyWorker.Start();
}
}
}
Perpetuating a Meme
So I was checking out Eric Evans' Blog today and I saw a post where he perpetuated this "Random CD Cover Creation" meme. Looked fun and easy.
So Here's Mine (The band's name is Denim not Mined I was just trying to be arty and cool and stuff):

... and Here's the Meme:
1. Use Wikipedia's random article page to find your band name.
2. Go to the Random Quotations Page. The last four words of the very last quote is your album name.
3. Visit Flickr's interesting photos page, the third image, no matter what, is your cover art.
So Here's Mine (The band's name is Denim not Mined I was just trying to be arty and cool and stuff):

... and Here's the Meme:
1. Use Wikipedia's random article page to find your band name.
2. Go to the Random Quotations Page. The last four words of the very last quote is your album name.
3. Visit Flickr's interesting photos page, the third image, no matter what, is your cover art.
Thursday, October 16, 2008
In a Nutshell, The Difference between an Event and a Delegate
An event simply adds a layer of protection over a delegate instance.
This protection prevents clients of the delegate from resetting the delegate and its invocation list, and only allows adding or removing targets from the invocation list.
Source: http://weblogs.asp.net/rosherove/archive/2004/03/28/100444.aspx
An esteemed colleague directed me to a post (can't recall) that further elaborates on the distinction. The main one that I remember is that in addition to the = restriction, invocations of an Event are restricted to the class that owns the event.
So if you want to allow other classes to raise an event you must expose a public method to that delegates the raising.
This protection prevents clients of the delegate from resetting the delegate and its invocation list, and only allows adding or removing targets from the invocation list.
Source: http://weblogs.asp.net/rosherove/archive/2004/03/28/100444.aspx
An esteemed colleague directed me to a post (can't recall) that further elaborates on the distinction. The main one that I remember is that in addition to the = restriction, invocations of an Event are restricted to the class that owns the event.
So if you want to allow other classes to raise an event you must expose a public method to that delegates the raising.
Thursday, November 29, 2007
How to capture the IP Address of the Oracle client making the data request
The key player is SYS_CONTEXT as in:
Select SYS_CONTEXT('USERENV','IP_ADDRESS') FROM dual
Here's a trigger that captures the ip addresses of clients deleting rows from a table:
CREATE OR REPLACE TRIGGER "MYSCHEMA"."SESSIONWATCHER" BEFORE
DELETE ON "MYSCHEMA"."CURRENTUSERSESSION" DECLARE
SInfo MYSCHEMA.SESSIONHISTORY.INFO%TYPE;
BEGIN
SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') INTO SInfo FROM dual;
INSERT INTO MYSCHEMA.SESSIONHISTORY VALUES (SInfo);
END SessionWatcher;
Select SYS_CONTEXT('USERENV','IP_ADDRESS') FROM dual
Here's a trigger that captures the ip addresses of clients deleting rows from a table:
CREATE OR REPLACE TRIGGER "MYSCHEMA"."SESSIONWATCHER" BEFORE
DELETE ON "MYSCHEMA"."CURRENTUSERSESSION" DECLARE
SInfo MYSCHEMA.SESSIONHISTORY.INFO%TYPE;
BEGIN
SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') INTO SInfo FROM dual;
INSERT INTO MYSCHEMA.SESSIONHISTORY VALUES (SInfo);
END SessionWatcher;
Wednesday, February 21, 2007
NCover and NCover Console
For a free code coverage solution NCover is pretty darn nifty and NCover Explorer Rocks on top of it:
NCover
NCover Explorer
NCover
NCover Explorer
Subscribe to:
Posts (Atom)
C# Sucks!
JK!! Seriously, though, somewhere around C#-3 we should have inculcated ourselves with the question: "Does 'CAN' == 'SHOULD...
-
Have now wasted several hours downloading and evaluating SQL Test Data Generators. The only one that actually 'worked' doesn't ...
-
Ran into a small head scratcher today. I'm getting ready for a demo which will have to run without an Oracle DB connection. To test ...