Monday, August 23, 2004

.Net 2.0

Last tuesday we moved the latest version of OES to production & given the time constraints I *think* we have done an ok job(yeah, it could have been lot better but after nearly working myself to death I don't want to complain!), the commendable thing is that so far client hasn't come with any major far, so good. Now that I have some time I have started work on my old personal project: adding POP support for Indiatimes email. I've got it to a point where I can retrieve the list of unread messages, message body but I am stuck with getting the To and CC list, the guys at Indiatimes render the HTML so badly that atleast I can't think of any proper regular expression to parse them out of the message body! The other problem is getting the attachments but am not thinking about them as of now, will get to it once I am done with getting the To & CC list.
Apart from that I also downloaded FCast library( but somehow could not get it to work, since there is no documentation available, guess I'll have grope in the dark. Also downloaded the Visual C# Express 2005 beta version, I liked some of the features that are available in the .net 2.0 like partial classes, anonymous methods, different access modifiers for properties etc. Yeah, there is too much of hype around generics so guess I gotta look at that too. Also IDE has some cool features like basic Refactoring support, if you change a variable name, the IDE prompts you if you want that variable name to be changed throughout the solution etc.
Another thing that I liked in 2.0 is that they have finally added a IDictionary: Data property to the base exception class. So basically, you can use this property to add parameter name + the value passed to the method which crashed. I was looking for something similar in 1.1 but could not find anything which gives you the parameter value back.
The research on 2.0 has just started so watch out...

Friday, August 06, 2004

Reports suck!

Its been some time since I blogged, off late life has been a little hectic..have got lotsa work in the office & things haven't been going all that well at personal front either. anywez, just yesterday got work to do on 8 reports, these are basically existing reports done in ASP & COM, my job is to port them to .net as the db schema has changed so most of the existing reports don't run properly anyway. The current architecture is that the report output is sent to the user via email & the report is never shown on the web. So basically a user selects the criteria & hits submit, the ASP page creates a row in a database table & another component polls that table(this component is not running off the web server) & invokes a com component based on the report that the user selected & executes a particular method on that component(all the reports implement one interface). Since most of the reports have nearly the same search criteria, what I did was that I created a user control for the filter criteria & all the reports include this user control. The user control exposes some public properties which can be set by the hosting page to enable/disable validation controls, show/hide controls etc. as there is slight differences between the reports' filter criteria, for e.g. reportA defines controlA to be mandatory but for reportB, controlA is not mandatory etc. The other thing that I have done is that every report inherits from a custom class called Reports which inherit from UI.Page, the base class has a method called SaveReport which iterates through all the controls on the page & creates a XML parameter list. Every report calls SaveReport which after serializing the controls, saves it to the report table. This way I avoided having to write logic/code for all the reports to insert into the DB. I know this is not the best solution but given the time lines, this is the best that I could think off!!