A Bone to pick with whoever invented the SQL Server licensing model

February 27, 2007 on 11:37 am | In .NET Coding | No Comments

I’m trying to figure out exactly how many copies of what edition of what version of SQL Server we have in the enterprise. Normally I just use the inventory tools in Altiris for this sort of thing, because I have product names and version numbers and all that. The only trouble is, THERE IS NO MARKED DIFFERENCE in the version numbers, product names, or EXE names between editions of SQL Server. So, what it looks like is that I have a couple hundred SQL Servers when about 20 are only actually servers. The rest are MSDE installations. The same goes with SQL 2k5 and SQL Express. What is the idea here? Does Microsoft actually collect on people mistaking the free personal editions for enterprise servers? Even if they do, that’s total crap, and if they don’t, STILL total crap. Microsoft, if you’re reading this, (and I know at least some of you are because I get email from you about my blog) add this voice to the teeming millions of unhappy Enterprise Agreement customers trying to figure out exactly how many instances of which kind of SQL are installed, and DO SOMETHING ABOUT IT! We’re paying a lot more than the mom and pop shops who can ‘inventory’ their office by counting machines in the rack, and we deserve a little break on this one.

Wow, did I read that right?

February 26, 2007 on 2:27 pm | In .NET Coding | 2 Comments

One of the most annoying, and most unnervingly frustrating things about dealing with web-applications in real life is dealing with printed documents. In my opinion printed documents are obsolete, but customers might disagree. You can’t rely at all on the browser to print using the File menu for you, because you can’t guarantee that everyone has the same settings. For me, this means that if I want to print real documents that are conforming to the standard, then I have to go PDF. Now, there are a ton of good PDF libraries out there to help you programmatically generate PDFs, just go search Sourceforge for them… There is a catch though, most of them are very adept at throwing out text and generated graphics, but if you are trying to replace an existing process which has a form already in existence, like something from the US Government, then you’re going to spend a LOT of time figuring out how to generate the document.

I have a solution which I used for this, but it cost me about 500 bucks. Not really a step-by-step HOWTO, but I’ll give you the long and short of how I handled it. I had to buy a copy of Adobe, which is OK. The Adobe Acrobat Pro software is worth the money (before you say anything, read the rest of this,) but the free Adobe Reader isn’t worth the time it takes to download it — get some other PDF reader because it won’t try to take over your web-browser, and eat all your CPU time like the adobe plugin does.
The trick is to leverage FDF - the Adobe forms components, to manipulate the annotations on the PDF document to ‘fill out’ data on the fly from your database. First, convert the document raw to PDF, you don’t need Adobe for that, most of the clone ‘PDF printer’ components you can download freely will do that, but for this next part you do need the real deal… You can design the form document in Acrobat, and place your form fields a la visio. Then, you can acquire some library (right now, they all cost about $200 - $500, Aspose PDFKit seems to be the standard, but pdftron’s PDF library is much more cost effective, and works well even under high load.) I created my own domain specific language to map from an XML configuration file the fields and properties of an object to the fields on the PDF form, but you can do it by hand, meaning hard code it, if you like. Either way, it’s still better than trying to machine the graphics out coordinate by coordinate in code alone, and even quite a bit simpler than XSL:FO (which to date is still a little sketchy in all of it’s current implementations: read Apache NFOP.)

Side note: If you have money to burn you can of course buy the Adobe FDF SDK, which will cost you just short of an arm, a leg, and a sizable portion of your reproductive organs, but there is a large set of available documentation if you go that route. Lets not lose site of what we’re actually trying to do here, we are filling out forms, not creating a clearing house for PDFs for their own sake, so the cheaper, more sparsely documented libraries will do the trick.

So there is a complete, cheap, and legal way to accomplish standardized printing from a web page. The neat thing, which actually prompts me to write here, is that a sourceforge project called PDFClown just popped up recently, and one of their goals is to support form filling. What this means is that eventually, you’ll just have to buy Adobe, or if we’re lucky, someone will use that library to make a PDF editor that can do all of the same things without the purchase. I’m checking into it to see if there is any way I can help, but at the moment, I don’t feel technically savvy enough with PDF format to try and do anything, and I’m not in possession of the time to learn, at least not right now. I will keep my eyes open though, because I don’t expect people just to write free stuff for me, and not consider the possibility that I might be able to help. I am, however, painfully aware of my current limitations, and on that note, it might be a while before I’d have anything of value to contribute.

Here’s to the future… and hoping that one day printing goes the way of the buggy whip anyway so all of this becomes obsolete.

My new Powershell project

February 20, 2007 on 12:33 pm | In .NET Coding | 2 Comments

Ok, here’s what I’m going to do… Before I had written a compiler for my own query language that is designed to do object persistence on an associative database… I have found now that it would be nice if I could write full fledged ’stored procedures’ and shell scripts that would allow me to encapsulate all of my data code entirely within the realm of a script, including all of the turing complete features of a programing language, like looping constructs, if statements, block level variable scoping etc. As a result, I had first considered implementing a full language from the bootstraps, but instead, I’ve decided that since the Data access business is what I really need, then I’m just going to extend an existing one. I’ve looked at IronPython, and Ruby.CLR, both of which are good candidates, but they are totally different syntactically from anything C based, so I’ve decided to go with something of the C language lineage. Enter Powershell. Powershell is great here, it’s dynamic typed, it allows me to use multiple hash structures to represent object graphs, and it allows me to write new commands that integrate directly into scripts without being first ‘reparsed’ by something else.

I want to do object persistence, and the majority of my objects aren’t two dimensional, and I don’t like ORMapping to represent them, because it’s a ton of unnecessary overhead, and really it will have to flatten, and unflatten them — for what?! ORMapping is for relational data anyway, and this is Associative data, which is natively n-dimensional, and can represent graph structures without requiring silly things like JOINs… so I’m going to go all out on JSON, which also can represent graph structures in its normal format. I will have to either a) find a JSON parser for powershell, or B) write one. I may be able to use the stuff from the new asp.net ajax framework fed into a cmdlet but maybe not… we’ll see about that one. I might be able to use Newtonsoft, and possibly Jayrock, but neither one works exactly how I’d like, for example in the way they handle date parsing, and neither is aware of the structure of existing objects. I’m pretty sure that the ASP.NET ajax JavascriptSerializer IS aware of objects in real life, so I’m hoping all I have to do is wrap that up as a component.

Wish me luck?

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^