Mauro 的个人资料Taming the Jungle照片日志列表 工具 帮助

日志


3月28日

ORM vs DAL

I was recently involved in many discussions about “ORM vs DAL”.
 
“ORM” tools/philosophy starts from a class definition and then the go to the database; Hybernate and NHybernate are the most famous tools for that. “DAL” tools/philosophy starts from the database and go to a high-language layer to call the database.
 
It’s interesting to see that ORM tools tend to attract a very particular crowd: Java lovers, academia and big enterprises. Rational/IBM and its “ecosystem” are heavily represented here.
 
Microsoft camp tends to favor DAL. There’s the “Vietnam ORM” controversy some time ago that involved people from Microsoft (Don Box, for instance). ObjectSpaces, a .NET ORM library was killed before being released. Visual Studio comes with DAL tools (DataTable/DataAdapter editors). Now Microsoft has the “Entity Framework” in beta phase; from what I can see it cuts both ways and can be used as both ORM and DAL.
 
I myself am considerably in favor of the DAL approach: it’s simple, effective and recognizes the value of good database modeling. I particularly like Visual Studio DataTables/DataAdapters for the DAL layer.  Most of my costumers are small/medium software houses that tend to perceive ORM’s dogma-full world as folly (expensive and non-performant) when compared to the familiar “SQL at your fingertips” DAL.
 
Yet, I still want to know what people find so attractive about the ORM world. I have a tendency to put it down as an “excellent looking idea that doesn’t work” – people is attracted by the beauty of it without realizing that it is impossible to make it work. But Java has a lot of traction with Enterprises, so maybe I am missing something.
3月6日

IE 8 First Impressions

The Beta 1 for Internet Explorer 8 is now publicly available for download at http://www.microsoft.com/windows/products/winfamily/ie/ie8/getitnow.mspx.

At first I was excited because they implemented one of my formal requests: the possibility of turning on and off add-ins on a site-by-site basis. Now I could switch “Adumb Flash” off for most sites and save myself from annoying adds but at the same time turn it on so I can watch videos on Youtube. My enthusiasm was short lived, however: this is not implemented on the beta, although the dialog box looks promising:



My other request, to treat stored cookies as if they were temporary cookies so I can login on sites that demand it (such as mail.google.com) without giving them tracking information is not there. Firefox has it though (“Allow for Session”):

Now some other new stuff:

  • “Activities” are sort of “smart tags” that pop pup when you select contents so as you can call another service such as displaying a map over an address.
  • “WebSlices” allow you to visually integrate several RSS feeds and also display “small pages”. There is such an example at http://ie8.ebay.com/.
  • Highlights the domain on the address bar so as to prevent some phishing  attacks (like WWW.microsoft.com.hacker.com)
  • Additional and well organized information for developers such as CSS, HTML and scripts details
  • Debug for CSS and scripts
  • More compatibility with W3C Standards such as CSS 2.1
  • Better crash recovery (whatever that means...)
  • Better zoom
  • Better performance through the use of six simultaneous TCP/IP connections instead of two
This is a WebSlice example:



You can check for yourself by downloading and installing it.
3月3日

Dual Booting Vista and XP

After one year running only Windows Vista in my desktop computer I decided to install Windows XP too. I did have several partitions in my 500GB hard disk so installing XP on drive D: was quite easy.

Unfortunately Vista uses yet another partitioning mechanism. After you install XP, Vista seems to be gone. The files are there at drive C: but it doesn’t show up during the boot process.

The structure that controls booting in Vista is called the “BCD”. Vista does come with a command line utility (bcdedit.exe) that manages the BCD. However, you must boot Vista before using it. This is not a solution if you are “locked out”.

So I needed to install Vista’s partition mechanism *and* make it “see” both OSs, preferably from Windows XP itself. Fortunately I found a free piece of software that does just that. It’s called VistaBootPro from http://www.vistabootpro.org/. You run it from Windows XP and it allows you to resurrect Vista’s boot manager and to manage the partitions, like changing the priority and the timeout.