The State of Affairs

Its been a busy couple of weeks at work, working on weekends and dangerously veering on the verge of full-blown Carpal Tunnel Syndrome.But the dividends were enormous, in terms of learning and a reasonable comfort level with WDK. I was planning to write something about DataBound Controls , but that will have to wait till I can write some example code for that.So here are some really small tidbits . Pretty basic ,but useful all the same:

1. Call a WDK component directly by calling the following URL : http://{myserver}:{myport}/MyApp/component/{componentid}?{param1}={param1’s value}&{param2}={param2’s value} where the part : http://{myserver}:{myport}/MyApp is commonly referred to as your Virtual Root and param1 and param2 are parameters that your component contract specifies. Great for quickly testing code changes.
— But can an action be called this way?

2. If you get a java.lang.outOfMemory error on application startup, x times out of 10 it will be a problem with one of your config xmls : missing tags, tags left open etc. (x in my case was 10 :-) ).

3. Usually retrieving and reading a value, which has a single quote in it, through DQL will work, but its when inserting that it goes down with a bang.Quote-safe your values by escaping ‘ with ”’ (2 single quotes around it).Escaping wild cards in a LIKE clause are a different story, and you can read it in your friendly neighborhood DQL reference manual.

4.Ok this one is dumb and should be common knowledge : Refresh your config files without restarting the server by calling http://{myserver}:{myport}/MyApp/wdk/refresh.jsp

6. Wrap some sequence of statements that you are going to be writing a lot of times again and again in your code, like closing collections and executing queries and getting IDfCollection objects , in some utility methods of your own, so that you can close those pesky collections by calling MyUtil.closeIDfCollection() instead of repeatedly writing

try{
dfColl.close();
}catch(DfException e){
//Your catch you decide, what to do with it.
}

5. D6 is coming and D5 still manages to kick my behind in my moments of vulnerability ;-) .Sorry state of affairs, I know. Head over to Word of Pie to know more.Lets wish for better api docs this time.

No comments yet

Leave a reply