Archive for June, 2007
Connecting to various subsystems by flipping a switch
by bryan on Jun.28, 2007, under Programming
I’ve been working on a massive project for a client, and found my application having to connect to more and more subsystems as the days went by. Each subsystem, of course, had their own interfaces. Some could be updated through web services; others, like SAP, accepted flat-files. Due to manpower constraints, we couldn’t be on site all the time to develop and integrate our application with theirs’. All we could do was to ask for web service specifications, SAP specifications, etc. We did all our development in-house, testing as thoroughly as we could. We realised that we needed the application to behave one way when we were testing in-house, and a completely different way when the application was installed in the client’s office. This led us to add isXXXXXServiceConnected = true/false settings in our application config. In this case, we were using ASP.NET, so it was in Web.config. When we were doing testing back at our office, we’d set these values to false. When we were at the client’s office and had access to all their subsystems, we turned those same settings on. This had an unexpected benefit: We could selectively test individual components so isolate errors which would significantly speed up troubleshooting.
For complex systems, it is extremely useful to be able to turn on and off various parts of your application. In .NET, make use of the App.config or Web.config files to store these settings. For example:
<appSettings>
<add key=”isSapConnected” value=”false”/>
</appSettings>
And then from your code (C#), you can easily access this by using:
System.Configuration.ConfigurationManager.AppSettings["isSapConnected"];
That’s all there is to it!
ponder…
by bryan on Jun.25, 2007, under Happenings
Ever wonder why something doesn’t become a problem unless it’s in a restrictive environment? Like how drugs are not a problem in Holland because it’s legal… like how my stomachaches are not as bad when I’m at home than if I were on the bus.. ponder ponder….
student life vs working life
by bryan on Jun.23, 2007, under Commentary, Happenings
After working for so long, I’ve realised I’ve gained a certain degree of independence and initiative. This directly means that when school starts, someone who has worked for awhile would possess a higher level of responsibility and an intuitive ability to better discern problems and develop more creative solutions. I have found this to be very true, in fact. Perhaps too, the long rest since I last attended a school served me well.. Maybe it’s also the fact that computing is my favourite course of study. Yes.. all this combined, I’m extremely passionate about my school. It’s time to have fun. The next four years will have its ups and downs, but I know at the end of it, I’ll look back and reminisce all the moments happily, and contentedly.