Ivan Porto Carrero

Placeholder.Add("Really Cool Stuff");

  Home  |   Contact  |   Syndication    |   Login
  49 Posts | 6 Stories | 170 Comments | 81 Trackbacks

News

Article Categories

Archives

Post Categories

Personal Links

Sunday, June 25, 2006 #

I use guids as PK in my databases.

I like guids :) But The asp.net 2.0 atlas framework shows them as Object and that gives me some trouble using them in my The asp.net 2.0 atlas framework pages.

But to implement your own converter is not so difficult you just inherit from the JavaScriptConverter and override those methods.

And afterwards you have to register it in the converters section of the web.config

The web.config

   21 <microsoft.web>

   22         <converters>

   23             <add type="Microsoft.Web.Script.Serialization.Converters.DataSetConverter"/>

   24             <add type="Microsoft.Web.Script.Serialization.Converters.DataRowConverter"/>

   25             <add type="Microsoft.Web.Script.Serialization.Converters.DataTableConverter"/>

   26             <add type="Flanders.Library.AtlasControls.GuidConverter" />

   27         converters>

 

The Converter Class:

    1 using System;

    2 using Microsoft.Web.Script.Serialization;

    3 

    4 namespace Flanders.Library.AtlasControls

    5 {

    6     public class GuidConverter : JavaScriptConverter

    7     {

    8         public override string Serialize(object o)

    9         {

   10             Guid guid = Guid.Empty;

   11             if(o is Guid)

   12                 guid = (Guid)o;

   13             return "'"+guid.ToString()+"'";

   14         }

   15         protected override string GetClientTypeName(Type serverType)

   16         {

   17             return "Guid";

   18         }

   19         public override object Deserialize(string s, Type t)

   20         {

   21             throw new NotSupportedException();

   22         }

   23         protected override Type[] SupportedTypes

   24         {

   25             get

   26             {

   27                 return new Type[] { typeof(System.Guid) };

   28             }

   29         }

   30     }

   31 }

 

The type in javascript :

Guid = function(){
   this._typeName = 'Guid';
}

 


Ruby looks to me like a hack. I'm not the only one with problems there :)

http://tabo.aurealsys.com/archives/2005/10/11/django-or-why-i-chose-it-over-turbogears-and-ruby-on-rails/

The following is from his blog post :

I  decided to ignore Ruby for the moment and focus on Rails. What i noted:

  • Very simple to install and set up new projects
  • You create a database and it’s tables, and Rails will handle them
  • Things get messy when you want to write SQL instead of using the framework to access the data model
  • URL generation is simple but not flexible
  • Rails templates looked ASPish, horrible, almost cthulhian. I couldn’t stand the sight of them. There is too much code in them and worst of all, I couldn’t find a way to change the template system (Clearsilver in Rails anyone?)

My friend Miel found this site from poisoned minds.

They have a nice breakdow on how time is really spent when developing a website. Of course this is good for a laugh :)

Poisoned mind webdesign piechart

I think they do have a point with the pure css lay-out. I for one am a dropshadow fan because if I put 2 divs on top of each other they need to look like there is some distance between them. I like the depth af the whole idea.  Up till now I haven't found a way to create a rectangle with rounded corners and a dropshadow (like in photoshop or fireworks dropshadow) using only divs. I can do it easily using tables tho.

But IE users must die. People love to attack microsoft stuff and I think those that complain about the quirks in IE start developing their site for other browsers than IE and that's where those people make a thinking mistake. The logic behind it is : if 95% of the users use IE why would you start developing a site that does not target this browser primarily.