Monday, November 28, 2005

Centered DIV

{

I'm used to the align attribute, but my recent CSS conversion has me doing things a bit different. Instead of table align="center" I've discovered the same affect with:

margin-left: auto;
margin-right: auto;


}

Tuesday, November 22, 2005

WinFX horizon

{

What does WinFX bode for smallfolk like me? At this point I'm given to think of Visual Studio 2005 and what sort of placement it will have in the product. I haven't done deep digging, but something tells me a WinFX designer is not going to be a part of Visual Studio 2005.

It goes back to my wariness of the concept of a "release cycle." Microsoft will reap another set of good earnings from a forthcoming release of a Visual Studio 2006 (or whatever) that has a WinFX designer for Vista's windowing system.

If you're designing a desktop application on .NET 2.0, what does this bode? Think hard about your strategy, and look over your shoulder at those slick COM applications.

I've posted on Joel on Software, hopefully someone will have a good response.

}

Get Executable Directory with .NET

{

What directory am I in again?

string dir = System.IO.Path.GetDirectoryName(Application.ExecutablePath);

}

Strip Time Off SQL Server Date Variable

{

DECLARE @DOUT DATETIME
SET @DOUT = CONVERT(DATETIME, CONVERT(CHAR(10), GETDATE(), 101))
PRINT CONVERT(DATETIME, @DOUT)

}

Wednesday, November 09, 2005

Technology or Tools, Visual Studio 2005

{

The big release is upon us. But it begs a question that I think those of us who use commercial development tools have to ask ourselves, something our Open Source brothers and sisters do not to the same degree. The question is whether we are driven by technology first, or whether we are led by tools.

Microsoft is driven to release products on a cycle that will earn them a consistent amount of revenue; sometimes the "new" product is hardly new at all.

Visual Studio 2005 looks good from my very preliminary browsing about, but I'm still approaching it with some caution. It's really cool to do "push button" refactoring, but is refactoring something we need to really think deeply about? A part of an underlying structure that must be designed carefully? Something that can't fix code that is already structurally defunct?

The class designer and snippets are cool too, but when I see the IDE eating up 800MB of memory on "Hello World" type projects, it makes me nervous.

My first stop is going to be new language features. After that I'm going to delve a little bit more heavily into the IDE. The ASP.NET features look good and somewhat different. But I'm a skeptic until I see the power for myself.

It's such a contrast to other worlds - to return to the idea of Open Source - technology there is more likely to evolve because of a need that must be met or a new idea. It is independent of the goons in sales & marketing.


}

Thursday, November 03, 2005

ASP.NET Control Trees

{

Debugging a problem today I wrote this, which may be useful to someone. It displays all the controls on an ASP.NET Page in a tree structure. You can actually call it from any control, it will recursively traverse the heirarchy below it. I tested it on ASP.NET 2.0, and it works fine:

Call it with the following:

DisplayControlTree(this.Controls, 1, 30);

Incidentally, the problem I had (and still have) comes from dynamically loading User Controls. Once they've been loaded using LoadControl("... path") they don't seem to persist themselves in the ViewState. I think my best hope for now is to save entries made to the User Controls by parsing the Querystring or Form collection manually.


}

Wednesday, November 02, 2005

Buzz Watch: Ruby on Rails

{

Ruby on Rails is getting more and more buzz each time I open my browser. This time it was Bruce Tate claiming that Java is dead ("like COBOL, not Elvis") and that he was turning to Ruby on Rails as his framework for application development.

A few days ago I also noticed a define/tutorial on Ruby on Rails over at O'Reilly. More and more of these seem to be popping up of late.

The most interesting thing about this buzz, however, seems to be the shift in the pendulum swing to a language that is light and airy, one which isn't belabored by the stiffness of strong types.

I remember the process of learning Java - there seemed to be a lot of people coming from a C/C++ background who perpetually scowled at the VB/Microsoft/Webby/Scripter types like me. Now many of this camp are turning away from that rigidity and heading back to the land of "dynamic" typing.

Pendulum swing... a few days ago I met with a prospective client and they showed me an app they were using that was written in PowerBuilder. I don't know much about PowerBuilder but the app seemed quick, flexible, and tightly coupled with the database. What's most ironic is that the reason I was there was to help with stored procedures and triggers that would let them add business logic to the otherwise light and airy environment in which their application came into being.

Deja vu, all over again.

I've got Ruby on Rails on my watch list. Go to the official website and there's even a movie amongst the tutorials.

}

Tuesday, November 01, 2005

Remedial CSS

{

I've been doing web development for a long time. Long enough to have developed lots of patterns and habits for how I'd approach putting together a website. Because most of my work is done with server side code, I've also yielded most layout thinking to the Panels, Grids, and User Controls I create in ASP.NET.

So it's a bit of a surprise now that I find that my habits are wrong, horrid even when it comes to web development. My effortlessly thinking in tables goes against the grain of any CSS ideologies out there. Having just redesigned my personal site, this is a bit of a drag.

As I read up on layouts with CSS, it's funny to see things turned back on themselves:
  • Absolute Positioning - I used to tell everyone to avoid this because of different screen resolutions
  • ul/li tags - Which were so passe, and used as an example of the obscure tags one didn't need anymore.
  • Tables - frown upon for anything other than displaying tabular data. Read: no layouts, thank you.
So I'm beefing up again. I need to learn the particular advantages of these newer layout strategies - after messing around today a bit I don't seem to gain anything over my older methods. I'm sure this will change.

I did some surfing and checked out various sites... most of them are using DIVs and CSS for layout, not tables. Curiously, Yahoo! Picks is one site that seems to have kept things the way they were.

}