CodeGen, Tech-Ed

A week after I released my templating code generator on GotDotNet it has been downloaded over 500 times (altho no-body has left any feedback or given it a rating…). I’m starting to use it more and more myself in conjunction with my other code-gen tools. The on feature that I would have liked to have added was to make Alt+Tab move between the tab pages (as it does in most applications). I got an email just after I released it from Joel Pobar, a PM on the CLR team (working on the SSCLI). Joel was having some problems getting my code generator to work. He didn’t specify which version of the framework he was using, and from his job I suspect it was not one that us mere mortals could get our hands on. Anyway Joel if you’re reading this I hope you got it working, and if anyone else who has downloaded it has problems send me an e-mail or leave a comment in my blog. Joel is a friend of my brother Dominic, so I suspect he was having a look at my generator for that reason, not because it is any good.

I spent most of my “spare time” this week listening/watching the tech-ed 2003 presentations which I recently got on 4 DVDs (yes, 4 DVDs == a lot of content). There is SO much in there it is hard to know where to start. So far I’ve really liked Clemens Vasters presentations (altho the audio for one of them was a bit sckrewy). His WEB404 class (the one where every time I read the name I think “not found”) had some interesting codegen stuff with Soap Reflectors (for generating the WSDL) and Soap Importers (for generating proxy classes using CodeDom from the WSDL). I was Somewhat horified that Doug Purdy in his Web400 presentation advocated editing the abstract class generated by the wsdl.exe /s. Why not just subclass? That is presumably why the generated class is defined as abstract. Otherwise Doug’s talk was quite good. The DAT305 talk by Pascal Belaud was very interesting. Pascal is the person responsible for Olymars, a SQL Server centric code generator for .NET. I played around with it 1 or 1.5 years ago. I wish I had been able to look past the (somewhat confusing) user interface. It seems like a very powerful tool. It’s also good to hear someone else with the same sort of “code generation world view” that I have. I never knew OlyMars used extended properties to extend the SQL Server Meta-Data (which my codegen tools also use extensively). I think the SchemaExplorer in CodeSmith also hooks into SQL Server extended properties. I also noticed that Ken Spencer and Kate Gregory’s DEV386 talk had a small code-gen part, although the tools were fairly rudimentary when compared to the likes of OlyMars. They also seemed to be suggesting that you edit the output. Yikes.

It’s interesting to see how the focus of the developer community seems to have changed between tech-ed and the PDC. If you’re building solutions that need to ship before Whidbey/Longhorn does (that’s probably everyone, right) then check out the tech-ed sessions.

Comments

Roy Osherove
How do you know how many times has it been downloaded? Can I find such into on releases on gotdotnet workspaces?
24/11/2003 7:41:00 PM
Peter van Ooijen
hi Joseph,
608 at this moment. Everybody can read that :>
It’s good to read feedback. One of my main reasons to publish something, be it software or writings, is to get my own thoughts organized. If I can’t write it down or code it, I don’t inderstand it. A fresh view on the stuff in a feedback allways gives me more insight. I’m not that sure about ratings, in my experience they can get spammed and give a wrong impression on the likes of the raters. Ratings using a histogram, like MSDN, are far more informatoive than just one average number.

And now I have to give you feedback on CodeGen… Here’s 1 : do you speak C# :?
24/11/2003 9:31:00 PM
JosephCooney
Hi Peter. Going through the process of writing something that I know is going to have a wide audience helps me write better code (I hope) because I know I could be called to account for any transgressions I make. The thing is I’m sure there ARE plenty of things that could be better in this sample (for example I rolled my own XML serialization code because I didn’t want to change my object model to suit the XML Serializer. Maybe someone out there who has more patience/understanding of how to "make things work" with the Xml Serializer could educate me on this), and would like to hear from people. As far as C# goes, yes I speak it (the app is all written in C#).
25/11/2003 2:32:00 AM
Joel Pobar
Turns out it was runtime problem - got it running under Everett. Very interesting stuff! Keep up the good work, and keep me posted on the changes.
25/11/2003 3:22:00 PM
Blue
I downloaded it and don’t even know what is it. it should generate something is that so? but nothing happens when i push that green key,the yellow star icon is cool but green one didn’t work. that would be nice if plays mp3 in next version.
[well, worked perfectly and tbh i deeply disappointed when compared your skill with myself not only in programming part… the idea was great as well. at least i should learn how to build that impressive interface. good job].
25/11/2003 10:19:00 PM
JosephCooney
Hi Blue - if you read through the demo that accompanies the download you should get better idea of what it does and how it works. It walks you through building some simple ASP.NET pages based on a SQL Server database schema.
26/11/2003 7:31:00 AM
Salman
Hey,

Have a look at my C# Class Generator here:

http://www.csharpfriends.com/demos/csharp_class_generator.aspx

Input the private members, and it outputs private members with prefixes, constructor and public accessors.

Hope you like it!
26/11/2003 12:58:00 PM
Fabrice
Hi Joseph, m3rlin and Evolve seem very promising. I have to take some time to play with them :-)
28/11/2003 11:45:00 PM
douglasp
Why not using subclassing? Because it doesn’t work for this scenario. Create concrete subclass, implement the abstract Webmethod and then look at the WSDL – what do you thing you will see? Nothing. You have to put the attributes on the subclass – so you could just as well edit the generated abstract class.
6/02/2004 6:54:00 PM