Tuesday, October 03, 2006

Suggestion: Windows Update Foundation

So I have a bunch of gunk in my tray area - Most of them are * update - Java update,windows update , Norton update even some kind of drawing program trial I downloaded - they are all sitting there taken up varying amount of CPU periodically "Calling home" to see if there are "NEW!! CRITICAL!!" updates etc... I as the user do not know what they are and where they are and how to disable them.

It is obviously important that applications be able to update themselves on the fly especially in today's internet environment with security patches etc... But I believe that software developers should focus on what they (think) they do best - developing their actual program and not worrying about creating little updater icons - they usually leave it to the end and throw together some thing that is usually not very well behaved etc...

Therefore I suggest that Microsoft take a large part of the burden off the regular developers like this.

Microsoft already has the whole windows update infrastructure - They should extend it a bit to support 3rd party applications - this is the scenario I imagine.

3rd Party Developers would create their applications.
They would log in to a special (free) Microsoft portal
They submit there company name. Application name - exe name etc..
They receive a special unique GUID for their application
In the install for their application they register that unique GUID for their application with the "Windows Update Foundation".
The vendor logs onto the Microsoft portal and indicates that the latest version for this application is lets say
When the regular windows update runs it sends the uniqueid and the current version of the app to the windows update service - Windows will notify the user that updates - either windows or third party applications.

The user can then decide what to update and what not.

WUF would then kick off the applications BITS downloader from the vendors site.

Obviously there are security implications -
but I think it would make the whole windows experience more seamless for the user and for the software developer

Wednesday, September 20, 2006

Case Sensitivity in VB.net

As a C# developer I am used to the usual case sensitivity issues. However recently I have been involved a project in vb.net that is being worked on by a couple of devs.

While we try to strive for consistency in casing (mostly for code readability). this is  VB.net and the compiler does not look over our shoulder and warn us of case mismatches we sometimes miss these miscasses and things work just fine.

But we have been bitten by 2 scenarios in this project where case sensitivity was a issue - had this project been in c# we would have realized the mismatches right away  - but since we were debugging using a vb.net mindset the case mismatches didn't appear to be the cause of the problem which led to some head scratching.

These were the 2 issues we came up with:

  1. Viewstate: Viewstate indexes must be case sensitive which is the opposite of the Session list (go figure)
  2. In form/user control declarations the inherits (at least in v1.1 must be case sensitive)

Thursday, August 24, 2006

Connection String Values # 2


At here http://aim48.blogspot.com/2006/06/suggestion-sql-c... I was wodering if the SQL team could add connection scope variables to the connection string to allow web app level user logging - it seems that there already is one that you can use. In your connection string you can hijack the "application name" setting and pass in the user id and then in TSQL you can retreive that value using the APP_NAME() function.


Application name isn't really ever used anymore (in fact by default .net applications send "SQL Native client etc....."  So I don't think there would be a major problem using it

Monday, June 26, 2006

Suggestion: SQL Connection Scope Properties

The easiest and most common way of keeping a audit trail on tables in SQL server is thru a trigger - the trigger records what the old and new values. Simple fast, efficient. The problem is that currently with web app's there is no way to log who the user that did the change is ,because SQL can only detect who the current windows or SQL user is not who the user is as identified by your webapp login system. So triggers have gotten to be "not so useful" instead we have either had to fall back to manual explicit logging calls to the logging tables (which is error prone) or some have resorted to adding a lastchanged user filed to the database that the trigger would use. I think it would be a good idea if we could allow a property (Either a specific username or perhaps even a keyvalue pair type of thing) to e passed on the connection string and available as a function in SQL statements thruout that connection. This may cause problems with connection pooling ???

Wednesday, May 17, 2006

Suggestion: Add Reqired to all ASP.Net validators

ASP.Net has a very nice feature called validators - you assign a validtor to a control and you specify what has the control must contain before the page is posted back and or vaildated at the server.

Nice... The only problem is that (as I see it) there are 2 kinds of validators the RequiredFieldValidator and the rest of them

Requiredfiledvaildator makes sure that the field is filled in in general - while the others make sure that what was filled in follows a specified format - So I have a form with a bunch of fill in boxes , now I have to add 2 validators to each item , a reqed and a data format.

While I can underatand that there are times that the data does not have to be there but if it does it needs to be valid - many other times (if not most) both are needed.

So my suggestion - Add a property to all validators (via BaseValidator) called ??IsRequired?? - so that one validator can do everything needed.

Sunday, April 02, 2006

Suggestion: Search Engines - "Context Sensitive" punctuation Inclusion

I was searching over the internet looking for information on using VS.net as a javascript debugger. This is possible by adding "debugger;" in your JavaScript code - however it took me quite some time to find this info because whenever I typed "JavaScript debugger;" into a search box (both msn and google) they stripped the ; and returned pages that have the word JavaScript and debugger on the page - most of these pages point to the venkman debugger for firefox but that was not what I wanted I wanted "debugger;".

So my suggestion to the search engines - use the context of the search request to filter out the punctuation for example if the request has a programming language name in it for example JavaScript or c# then do not strip ; and give more weight to pages that contain the exact text I requested because we can assume the if I am asking for a programming concept - while at the same time if I type some thing like "VB.net is the new vb;" then the ; would be stripped because the VB "context" does not contain a ;

This can work in areas outside of software development where punctuation is used as part of actual wording (scientific notation etc...)

Sunday, February 19, 2006

Suggestion: Desktop Search Shell Command Extension

I was looking for a phrase some where on my hard drive - so naturally I used MSN Desktop Search - and I found the file that contains the phrase. A word document with > 5000 words.

So these are the steps that I had to go thru to find the phrase I wanted.
1. Type the search phrase into the msn bar at the bottom of the screen
2. Wait for the result window to open
3. Find the right file from all of the returned files
4. Double click the file to open it.
5. hit ctrl f in Microsoft word
6. Retype the search phrase into Microsoft word
7. Click Find to find the item.

7 Steps to find something from the command line. What if we could smoothen things out so that we could stop the process at 4.

So the process is now only :
1. Type the search phrase into the msn bar at the bottom of the screen
2. Wait for the result window to open
3. Find the right file from all of the returned files
4. Double click the file to open it.

at this point Word would open and immediately search for the search phase and highlight it.

How do I suggest this happening? Like thus.
Applications can define commands to run against their associated document types so for example if you right click on a word document you would have Open,Edit,New,Print etc...

My suggestion - apps would define another command type called "Search". When a user clicks on a document in the windows desktop search window then search will open the app passing the command line defined in the registry key and the name of the document and the search term.

When the app (any app - I was using word as an example) - received the search command it will load the specified file and immediately do a search for the appropriate phrase.

Thursday, February 09, 2006

Suggestion: Built in factories

Factory patterns are very useful - they allow you to switch around the object types you want to create without a user having to have any knowledge on the actual implementation.

The problem with the actual factories are that they are hard to implement and thus are usually not implemented unless you see a clear need in the future for abstraction. The rest of the time you just new up objects and use them.

What happens in the future when you realize that things are not that simple and you are going to require a factory to decide which object to create - then you must replace all of the news all over the place.

My suggestion: repurpose the new keyword to call a static method that will allow the method to choose the object to create. If that method is not implemented (or returns null?) then new will actually create the new object - else it will pass along the object created by the static method.

So for example - if I had a car object that had calls to create a car and it was called like this until now

car c = new car("Camry")


but eventually we realize that hybrids have a totally separate engine process - so we create a new called Hybrid car and we leave Car as is but we override the hybrids BuildEngine() method to create a hybrid.
Now all that has to be changed is that we add a new static method to the class
(perhaps something like this)
public static Car Car(string CarType)
if (CarType="Hybrid")
{return new HybridCar();}
return null;

Saturday, November 26, 2005

Suggestion: RAD Ajax

I have been looking at many of the AJAX solutions out there and they all seem to be very powefull, versitilte etc... etc... , However they are wayyyy complex.

In most of them you need to define client side javascript etc.... blecch....

My suggestion for MS re ASP.net. Make it simple.
This is how it would work:

When the page is first generated the value of RenderControl should be sent for the defualt settings (or settings that were set before the rendercontrol is called.
Each control should receive it's own little viewstate on the page wrapped in a

Then the user presses a button. A XMLHTTP message is sent to the server contining the postpack values of the page - THE PAGE ITSELF IS NOT CHANGED - just a postbak is simulated.
The developer responds to the On.... events by setting properties on the controls
A quick pool of the page is made to see which controls have had properties changed.
These properties are then JSONed out to the page again

Friday, November 25, 2005

Suggestion: Validation Framework

I once had a need to mimic the functionality in the validation control framework – I had to validate values coming off of the querystring in asp.net. I initially thought of reusing part of the existing validation framework but after playing around and researching it a bit I realized that the framework is built on and too tightly coupled with the web form controls structure.

That got me thinking that you are limiting a very useful and powerful piece of functionality to one small piece of the .net framework.

There are many situations where a developer would need to validate values (not necessarily input) and once you have the basic structure – why not extend it.

Here is a suggestion that I had.

Rebuild the entire validation structure totally separated from the web control process. You can have web validation controls implement this feature – however so can others.

For example a programmer would be able to do something like this

If (Validator.Range(someInt,20,300))
// good

Or this would be great for parsing data types before you try to run a convert. (although the new TryPArse does help)

However I think one of the most interesting features can be from settting up a attribute system. A developer would be able to write something like this


Int I;

If a value out of range is assigned to I then a exception gets thrown (this can be thought of as built in Unit Testing)

Thursday, November 24, 2005

Sugggestion: "Secure Unicode" drawing function

A couple of months ago - I sent this suggestion to Mitch Kaplan at Microsoft. He posted it here

Hi. I actualy tried finding the correct blog post to submit this response too - but I couldn't

Anyways - A while ago you had a couple of posts on internationalized text esspecially in the browser however you also mentioned how it can be used to cloak a bad file in explorer etc...

Would this make any sense at all?

In vista- Create a "Secure Unicode" Rendering function - Sort of a "overriden" implemetation of drawText that will draw a little squiglly under any unicode charecter that is deemed suspious (You linked to a RFC that had some good ideas there) - this suiglly would be draw in the sane pen as the font and it would look similiar to the squiggly that word draws under misspelled words.

In any situtation where a unicode char might be used to fool the user into doing something he probablyu does not want to do Windows ,(and third party apps0 can use this version to ensure that the user is notified when a charecter might not be exactly what it looks like.

I can see this being used in windows explorer for file listings - or perhpas in login text boxes etc, email address boxes (I can send yo a link asking you to send sensitive info to a email address that looks similiar to an address you trust) etc....

Just a thought (obvioussly..)

Suggestion: SecureWebString

Everybody knows that you should NEVER! NEVER EVER! NEVER EVER EVER, use the values coming off the Querystring or cookies collection without validating them. Yet we forget - It is so easy to do an assignment like this

string s = Request.QueryString["ItemID"];

Yes we forget. And now Microsoft has introduced the ObjectDataSource - which allows you to specify a querystring parameter or a cookie to automaticlly pass to the databinding routine. Where is that going to get validated if the databinding happens automaticlly

Introducing the (suggested) SecureWebString class:

My suggestion is that all web collections/Property bags get rewritten to return a SecureWebString. The secureWebString will encapsulate the actula string containing the parameter and will cry foul (A security exception) if you try to access the value without having validated it.

How do we validate?

The collection or page or global class will have a validateSecureString event that will fire whenver the string is first accessed - this event will receive a non secured version of the string to validate - if the string is valid or it can be corrected by the handler then the string is marked as validated so that it can be acessed by the page code.

This adds a noninvasive auto validation regimin to all the "dangerous" strings out there. So the new objectdatasource will be vey welcome going ahead and reading a querystring parameter - because validation will take place..

A certain level of backwards compatibiliy can be acheveid by overing the = operator to retrurn the string.


Suggestion: WBF - Windows (Vista) Backup Foundation

Yicky!! I am in middle of trying to setup a remote backup type of thing (over the internet). The backup/file selection interface is terible. This isn't the first one I have tried and the other ones were just as bad - that's what happens when many different companys have to implement the same thing - they hardly do it well. This interface isn't a selling point for the companies anyways - they do it because they need to provide a interface so they throw something together

On the other hand the windows backup interface is useable - but just barely - definatly more then the internet backup stuff I am trying to set up.

So , My suggestion - Seperate the backup interface from the backup engine. Make a central windows backup information store from which any backup application can read. Then all these companies whould not have to reimplement the same functionality every time. You would also be able to reuse the info between apps ( a tape backup and a remote backup)

On the other side you can now have a third party come out with an even better backup interface then the one built into windows and have that replace the windows one.

An added benifit is that since you now have a single point of backup information - application developers can now plug into that and specify the file extensions that do need to be backed up for that extension type and you can now specify the applications to backup rather then directories. Apps can also provide a backup export type of functionality

Monday, November 14, 2005

Krypton Toolkit

The Krypton Toolkit has been released.
It provides user interface controls for Windows Forms.
It is targeted at Visual Studio 2005 and .NET Framework 2.0.
It is free for commercial use

Sunday, April 10, 2005

Presenting: ME - An AJAX Pioneer!!!!

Latly there has been a lot of talk about something called AJAX. The basic ideas behind it are not new - what is new is that it has now been identified as an appropriate patern for building web applications. Anyways around the 1999-2000 timeframe I came up with a design for a toolkit that accomplished pretty much the same thing. The difference betwwen current implenentations and my design is that the current stuff uses standard browsers and controls etc... while my design called for a custom built browser or a plugin to an actuall browser.

I actually went as far as builidng a rudimentry browser that could load a chat, shop cart or stock quote page. I also worked a bit on a server based framework that allowed a developer to respond to events fired from the client (similiar to the way ASP.Net does it). But then someone pointed me to "asp+" (the precursor to ASP.NET) and while it did not have the out of band communication features it did have a robust RAD tpe development model that was way better then what I had envisioned (I had envisioned the developer hand writting the HTML (or APML as I called it) with the APML controls inline with event handling attributs (i.e. HandleOnClick = "true" etc...) as if they were regular controls - then the deveoper would run this file thru a pre processer and the pre processer would output a delphi source code file with stubs for the developer to fill in. The end result would be similiar to asp.net in basic functionality (you would set the text property by saying label.text = etc...).

Here is a simple introduction that I wrote describing my ideas in Dec 2000.
Active Markup Application/Application Presentation Markup Language

What is AMAP
AMAP is a method of delivering and executing a browser based client server application over a Internet type network connections. AMAP applications have 2 parts (1) The Server (2) The Client.

The Server:
The Server software is a CGI or ISAPI DLL that runs behind a standard Internet HTTP Server and provides APML pages to clients that request it using standard http URL requests. Once the client has loaded the APML page the server then stands by to service any events transmitted by the client. These events also arrive in standard HTTP requests and the server responds to them by passing any property changes or procedure calls

The Client:

There are 2 possible client types:

Special Browser:
An AMAP client is a specially equipped web browser that requests APML pages from a AMAP Server and displays the formatting and control layout described in it. The client starts a session in which it monitors the controls on the page for any events that would be transmitted back to the server. When such an event takes place the event is transmitted to the server together with any other properties of objects that were specified (Probably using XML). When the call is returned the client updates any control property changes that may have been sent by the server and executes any script code returned. This data stream is separate from the stream used to originally download the page.

Standard browser
Controls are embedded in the HTML file as plugin objects. The plugins communicate with a background DLL that keeps all the controls together, and will do the actual communication.

What is APML
APML is a SGML type markup language that describes an applications look and behavior. It contains standard HTML markup to describe the text formatting of the page and any html Links. It also describes where and how APML controls should be created and what their properties are. AN APML control can respond to many unique events. For Example a button can respond to a click event while a TextBox can respond to a change event. Etc… Controls declerations are similar to HTML input declarations except that the tag is used. Unless the plugin method is used in which case the embed tag is used.

Differences between HTML and AMAP/APML
HTML uses a static connection to the server. When the user enters the web address a web page is retrieved and displayed by the browser. The connection is then cut off. In order to transmit the form data back to the server the user must submit the information in a HTTP Post (or similar) event. There is no connection between the client and the server during the time that the user is actually entering the information into the controls and the web page. If the information on the web page needs validation then that has to be done either in the actual webpage using a scripting language or on the server after the whole page has been submited. If some data was not entered correctly then the webpage has to be downloaded all over again and filled out.
APML on the other hand provides feedback to the server on every action the user takes. Once the APML browser downloads a webpage it can restart a connection to the server any time a specified event takes place. The server can then change a controls property or take other action that will be reflected on the webbrowser. This allows for instant data validation. This connection is in the background and does not affect the current page as a whole.

Take for example a case in which the user enters an invalid credit card number and clicks the submit button. In standard HTML the whole page is transmitted to the server and then validated. If the number was invalid then a new web page would be transmitted back to the user with a message that the number was incorrect and a input box to type the new information. In a typical APML session when the user clicks the submit button – only the credit card information is sent and validated. If the credit card is incorrect then the server sends the client a set of commands – this could include a command that a message box be displayed notifying the user that the number was incorrect and that the text box with the incorrect information be blanked out and have the focus. (alternately the color of the box can be changed to indicate error). All this is done without the page reloading.

The apml page can also specify a interval where the client will contact the server for any updates to apply to the page.

Differences between a Java Applet and AMAP/APML

A JAVA applet is a self contained program that is downloaded and run in the browser. APML is an enhanced webbrowser that contains enhanced standard controls. (there is no need to download extra controls (as in ActiveX)). If plugin controls are used then they have to be downloaded only once. Their behavior changes based on the properties and javascript embeded in the control declaration and on the code and properties sent during events. ActiveX and Java require that you download a separate control for each webpage containing the specified behavior for that page.

An Analogy
Suppose you were applying for a passport or other document. When you approach the counter there are 2 ways to do it. The HTML or the APML way.
In the HTML scenario you would ask the clerk for the required application then you would go to one of the tables at the side and fill out the form. After you had completed filling out the form you would line up again at the counter. When it was your turn to see the clerk you would give the clerk your application and the clerk would scan it for any mistakes. If there were mistakes the clerk would hand you a new form to fill out and send back to the tables to fill it out again. This process would continue until you had satisfactorily filled out the form and the clerk accepts it.
In the APML scenario you would approach the counter and fill out the form there, under the clerks watchful eye. The clerk can notify you of your mistakes as you write them and correct them for you or inform you of the need to correct them.

A Sample Use
Lets take a typical session On-line shopping and explore how it would be executed with HTML and how it would execute with APML.
Typically an on line shopping session requires you to add items to your “Shopping Cart”. Using HTML every time you would hit the “Buy This” button the entire web page would clear and be sent back to the server. A new and updated webpage (including all of the advertisements and formatting information) would then be downloaded with an updated shopping cart and price line. To remove something from the shopping cart you would have to click on the link next to that item and again the whole process would repeat itself, the webpage would be sent to the server where the processing would take place and then an entire new webpage would be downloaded.
Using APML , when a user hits the “Buy This” button an invisible message is sent to the web server and the webserver instructs the webbrowser to add that item to the “Shopping Cart” part of the site and update the price line. No new page downloads are needed. The same applies for removing an item from the shopping cart ,the user clicks the remove button and that item gets removed from the shopping cart.
those were the days - I actually thought about patenting this thing :-) )

Thursday, March 03, 2005

EasyCare2 Architecture Guidelines? - Any Good.

Here are the guidelines - if you have any comments please let me know

General Development Plan

This document will serve as a guide to the process used for developing EasyFrame.

General Overview:

Easyframe is developed as a SOA (Service Oriented Architecture). All application parts are free standing and do not require any other part of the system to work. Rather messages are passed around via wbservices or database updates.

Each module/application specializes in its tasks and that is the only task it does.

Each application itself is going to be built on a loosely coupled object structure in which different layers are used to separate functionality on a common level.

A layer can only communicate with the layer below it. Not with the layer above it or with a layer 2 levels below it. This ensures that functionality is implemented in the appropriate areas. The dataaccess layer does not need to know what the interface looks like. Because the data access layer will be used by several different process. Vice versa the Presentation layer must not access the database directly rather it must call the layer below (UIP if applicable and then the BLS etc…) This will allow us the freedom to switch datasources in and out (i.e. we might decide that MS access is enough for the facility database or that data should be accessed directly thru a webservice ) then we just have to recode the data access layer or add another layer with a well defined interface in between the BLS and DAL

The following is a diagram of the Data Layer interactions

Here is a greatly expanded view of the layers to be used.

In the physical DataBase
DSL – Data storage layer:
This is the actual data tables. Table triggers are also considered as being at this layer. Triggers should be limited only to data maintenance operations such as row level logging and basic data cleaning

DSAL – Data Storage Access Layer
The DSAL has 2 components
DSPL (data storage procedure layer) – These are the CRUD (create , retrieve , update , delete) stored procedures generated by the O/R Mapping tool used – these (and the DDAL) should be the only access points to the data. NO DIRECT SQL STATEMENTS into the database, they lead to unmanageable code as you cannot easily determine where data is retrieved from etc…

DDAL (data direct access layer) – Specialized stored procedures to retrieve specialized queries from the data base that cannot be easily retrieved via the DSAL. All specialized queries have to go thru a stored procedure – exceptions can be made for rare circumstances. May also modify database data (for example a bulk data update).

DAL – Data Access Layer
The DAL has 2 components
OAL – Object Access Layer. This layer is generated by LLBLGen Tool. This creates a object type for each table in the database. The object contains a property for each column in the table. You load a row into a object by setting the primary key on the object and calling the selectOne() method. You can update a datarow by changing the property values and calling the update() method. Adding a new record is done by calling the Add function and Deleting by calling Delete(). These functions call stored procedures in the DSPL to do their work. NOTE: DO NOT INSTANSIATE ANY OBJECTS FROM THIS CLASS. The tool does not declare them as abstract however they should be. Rather use BRL classes that inherit directly from these.

PAL – Procedure Access Layer. Contains method to access stored procedures in the DDAL layer. These are customized stored procedures. These methods are generated by DALHelperPlus and pasted into the code files. The DALHelperPlus tool takes care of all the SPROC calling code including parameter assignments. The tool allows you to specify a wide range of return types including DataReaders and integers,strings etc…

BRL – Business Rules Layer
The business rule layer is where all the actual work is done. Each data type inherites from the OAL and extends it to provide specific logic for that object. In order to work with a data row you would create an object of this type and manipulate its properties. Logic for working on this object is contained in here. For example suppose we wanted to add a item to a shopping cart – there are several logic steps involved. We must detect for example if this item is available for this customer, or if the user already has one of these in his shopping cart then we just combine the order. It does not matter – the calling code (probably directly from the GUI) calls ShopCart.AddProduct(new Product(12121)) and the shop cart takes care of all logic required.

PL – Presentation layer.
The presentation layer is the actual application face as the end user sees it. The UI works either with a BRL instance or with a DataReader to bind with.

UIPL – When we are doing a long process (such as shopping cart checkout) – we can insert another layer in betwwn the gui and the BRL. This layer will allow us to control the process flow.

Tuesday, November 23, 2004

I am not a geek - Update

It seems that I might have cemented my non-geek status forever!!!

I use Tables in my HTML pages (extensively)

Tyranny of the geeks

Sunday, October 31, 2004

My. Wrapper for C# et. All

VB.Net 2005 has a new feature called "MY". My provides a quick access path to a lot of useful parts of the .net frame work. C# does not implement this feature however you can import the VB.Net dll and expose these capabilities (most of them) to your c# application.

OurSharp is an My. wrapper in c#. It is a small class that does some basic wrapping of some of the My. Objects. I named it our "Our" because in contrast to VB.net's "MY" this is accessible to all .net languages.

1. Add a reference to Microsoft.VisualBasic.Dll
2. Add "Using Our;" to the top of all source files you want to use this in.
3. To use the My/Our functionality type Our. and select a object from the codecompletion window

The following My classes have been implemented:


The other classes in VB.net MY are dynamically generated as you code - so a VS.Net addin would be required to get that done --- Maybe in the future.

The Source file is posted here

Sunday, October 24, 2004

DALHelperPlus - New

I recently posted DALHelperPlus.
This is a rebuild of the original DALHelper.aspx developed by Alex Lowe.

The original was appealing in its simple ness - it was a simple aspx page that would list all available stored procedures and it would put together a method that you would just have to paste into your DAL module. No external libraries needed (if you wanted you could choose an option to attach a parameter builder library but it was not the default and not required) All you did was choose your procedure – choose your return type (Dataset/DataReader) – Choose your language (C#/VB) and hit generate – you were done.

I looked at several other generators; most of them required other moving parts for example the stored procedure application block etc… This however was fast efficient and easy to use.

I used to have an instance of ASP.NET web matrix with the page open running in the background and I would just have to alt-tab to get access to it. However my webmatrix install recently got corrupted – and I could not (easily) run it in VS.net. So I decided to port the code over to a (always available) win forms based app.

I started playing with the code and I kept all of the database retrieval and parameter parsing from the original. However the code generation part I redid using the .net CodeDOM. The CodeDOM is a real pain in the neck to program against. It is very verbose and long winded; I almost gave up after 2 or 3 days. But then I found Refly a codeDom wrapper by Jonathan de Halleux that makes codedom programming much easier.

Using the CodeDOM brought another benefit. Where as the original used string building to build 2 different versions for vb.net and c# - here I only had to implement it once using a codedom tree. Further more, the app checks the machine.config file for all available .net compilers and allows you to generate the code for any one of them (you select the language from a drop down). On my machine I have c#,vb.net,javascript.net,J# I am also planning on playing around with Delphi 2005 (Diamodback) when it comes out and I will have a ready made Delphi code generator.

Another key feature of this app is the ability to control where DB connections come from - they can be built from connection strings (global/Local/Embeded/Resource Files) or from code snippets or from connection parameters passed on the command line - this all can be chosen from a drop down box.

You can also specify how you want the return values. Of course there is DataReader and DataSet - but there is also DataTable ,ArrayList (the first column of the resultset), HashTable ( First Column = second column) and primitive types such as int,float bool, (string) which return the first column of the first row typecasted as the appropriate type.

At first the app did not support OUTPUT parameters - that was because Refly did not support ByRef/Ref parameter calling - However a quick email to Jonathan got that fixed and OUTPUT parameters are now supported.

Besides for a desktop application I have also integrated the generation engine as a VS.NET plugin (VS.NET makes it so easy) and the generated code will get written directly to where the caret is in the open document.

You can download the current version (1.1) here.

I am also thinking about opening up a got dot net workspace for this.

Friday, September 03, 2004

I am not a geek

I am a programmer by trade and hobby. I spend my work and spare time programming and playing with different software architectures. Because of that some people call me a geek. I really don't think that I merit the geek title. After all I don't have a laptop,cellphone,beeper,palm top,electronic organizer etc... (I don't even have an electronic wrist watch).

But what really knocks me out of the running for geekhood is ........... I don't even have a GMAIL account!!!

Update - I now do have a gmail account.

Monday, July 12, 2004

About Me:

I am a Delphi, Java, C#, SQL, XML, etc..... Developer / architect / administrator etc.....
I have approx 7 years experience in Software Development.

I am not the best programmer around. Furthermore %50 of what I say - I know what I am talking about and the other %50 I do not - The problem is that I don't know what belongs in each 50 - So, Reader beware...

This page is powered by Blogger. Isn't yours?