2005-11-24

Automated application configuration with XML and .NET 2.0

Have you tried classes from System.Configuration namespace in you Visual Studio 2005 project? Well you should. If you haven't simply start a new Windows Application Project and see what is hidden in "Properties" branch in you solution tree window. Double click on Settings entry and using UI tool for binding configuration entries you'll notice how easy is to add a new application/user scope configuration keys for your new application.

How to use them in your project from code side?

Well, simply see how Settings.Designer.cs class looks like to comprehend some basics.

You did? Perfect. Now in sample form you just got add some controls to show your configuration entries. For example TextBox for a string entry and how to fill it with real data you might ask.
Simply! Following code fragment should help you how to figure it out:

[
textboxSample.Text = Properties.Settings.Default.YourKeyEntry;
]

If you want to save a modified (in runtime) value of that configuration key simply reverse the order and add a line of code like below:

[
Properties.Settings.Default.YourKeyEntry = textboxSample.Text;
Properties.Settings.Default.Save();
]

It will save all the "User" scope entries to the XML file. "Application" scope entries are read only as static values in definitions (see MSDN for more details).

As you see building application wide configurations is very easy with .NET and Visual Studio .NET right?

2005-11-18

Driven by Design

Security driven design
Architecture driven design
Goal driven design/architecture

How many X driven Ys do you have at your development processes. Do you make some methodologies matrix just to map it all into a single yet complex process that gives you a confidence that your software is reliable, components reusable, process well established and product secured?

Singularity news

I've found that a lot of you already figured out that Microsoft's Research works on something quite different to Windows in area of operating systems. Micro kernel codenamed "Singularity" is already described in one technological report at MSR, and if you still missed that information just start looking from this URL:

http://www.microsoft-watch.com/article2/0,2180,1882174,00.asp

Intrigued?

Hope to finally break up this period of silence and reactivate this blog again

Hello again.

I'm glad to see that some persons enjoyed this little stuff gathered within blog. Regardless of promises I gave here and to myself mostly I was in total failure to keep it up to date to this period but now it seems that it's going to change, but let's summarize it a little bit:

PAST:
This blog's initial purpose was to show up a living process of learning latest Visual Studio .NET (2005), which is as a status not actuall anymore because to master it as quickly as possible and being fascinated as much as possible every day with every core namespace I could touch I forgot somehow on this status. I forgot to feedback my own learning experiences here. Second reason of that failure was that my little bit off-topic daily job related to Axapta implementations took me busy enough to forget for some period about this site and my own ambitions to find my way with similar developers who want to share some even basic experiences just in common sense of improovement.

PRESENTS:
Well, my current state of art is that I'm more familiar with the complete toolset and beyond. I just started cooperating closely with Polish Microsoft in area of TSC (Technical Support Coordination) in my own EMEA area and this responsibility puts me into a different position. There is still place to learning as every new day can me a real chellenge but actually it's is a real-life chellenge with real-life development processes and technological problems that're slowly becoming my everyday's world. It's even more fascinating and enthusiastic and that idea I'd like somehow (filtering of course all what's confidental) share here as a new basic status of this site. So...

FUTURE:

I'd like of course continue blogging but (at least I hope it becomes like that and your feedback only can tell me that) a level up in context of professionalism. I'd like to discuss development contexts, application blocks and areas of common programming in latest Windows enviroment that you can find problemous and intriguing in your everyday's jobs, homebrew and other hobbistic approach toward programming. With that I'd like to keep your feedback as active as I'd like to keep this site with new postings just to start some unique relationship of developers who's got a tremendous software solutions for their development cycles that can enable a new level of imagination according to what you do at your own desk with a PC set up and keyboard ready to code another line. :)

FEEDBACK REQUEST:

Well I'm currently planning to build up some agenda or my inner subjects list to post on here. If you have anything on mind that can be interesting for you related to what's been already written hear and what can I cover in relation to MS development related technologies, I'd like to read it in your comments ASAP.

take care

2005-08-17

Came back after holiday

Two weeks of holiday period just ended to me. Funny and strange experience is to see computer keyboard after a little pause ;-)

2005-07-22

Misunderstanding

This day got a name of "Misunderstanding" because of two things.
First was final testing of one project on customer side and it's likely from the stress of both sides where bug reports were shown where no bug was just bad configuration but I always hate the moment when each side tries to move the responsibility to oppositite team just not willing to check anything. I did it today and same did my customer and we stucked for a moment because intuitively I didn't see problem on my side and he didn't want to check his settings but blamed for illusionary bugs. Finally proved what's wrong but I'll get hearth attack someday.
Second reason for that name of the day is a conversation with one development team leader who tried to prove me that his players should know everything by memory and handling problems like name of an object or whole API coverage instantiously and I tried to tell him my statement that there is no shame in looking for documentation and help at "every needed moment" basis because the problem is not the function name that is gone from memory for a moment but the business problem we try to solve by our software solution. Seeh.. it's sad still to see so many persons who keep themselves at position where people should be just a memory with neverending memory and type their stupid programs without real knowledge what are they doing but how to add another line simply. Not my way buddies.. not my way ;P

2005-07-20

functional (business) and development specification confict on flexible systems

Well.. Again I've got strong focus on specification verification I get from functional consutants who usually think that the business functionality they want is always as easy to modificate as system looks like from user interface perspective. Mostly and most terrible thing is that they imagine it's just copy&paste task to do which makes me really mad if with that their approach I have to modificate strongly ledger posting engine in so complex system like Axapta is. Verification, verification and close fight to help them realize how some elements are frigile and how aware they should be while inventing new "super-hiper-duper" enhancements to the modules. Arghh... glad I won one battle here and still can keep responsibility on the stable status of the implementation. Grr.. funny is that ppl with deep experience and expertice in the system so easily forget what problems with similar approach they had in the past, but yes that's where programmers belong to build the bridge between "impossible" and "infinite". Hah! Continual dwelling deep in Axapta 3.0 SP4 so sadly not much time to continue my research at .NET 2.0 areas which irritates me slowly.

2005-07-11

back to the basics

Well I found Visual Studio.Net very intuitive since my first contact with it. I'm amazed that some basics still are troublemaking so here is one tutorial just to enhance curiosity of my friends asking questions. Let's pick up custom controls, for example a TextBox which has value change triggered by an event notifier handler by another object. Problem silly because TextBox has such an event itself but this little tutorial can show how simple you can handle custom controls basing on the Forms rich framework and delegative communication model between objects.

First we open up a new windows application object and draw on it a simple TextBox Control we want to use as a base. It works without any problem so let customize it a little bit.

Lets create a new empty class and name it CustomTextbox. After it we should add simple inheritance to System.Windows.Forms.TextBox. Then Add a Notifier class as a property like I did in below screenshot:


As you see to that notifier we add a local method handling it's base Notify event. That handler gets value stored by notifier and puts to a textbox Text property. To make it fully working we have to precise how does really our notifier look like. This can be explained by below screenshots:




as you see changing the value triggers event from interface. Now the only thing that left to us is to design our testing form with two textboxes. First is original one and second bases on our inherited version. It is same simple to place both controls as far as we can notice our customized control on toolbox like in below screenshot:


Final thing is to use Basic Text Box eventhandler for TextChanged event and rewrite its Text value to our notifier class to see that second control with have the same Text Property filled automatically. The only code to see it working is:


and here is fully functional Visual Studio 2005 project covering this tutorial: [download]

2005-07-05

great article about power point presentations

whoah, I started dwelling for interesting technical/business oriented blogs over net and found one really cool. Here is must_be read article about presentations I found there:
FIVE RULES FOR POWER POINT PRESENTATIONS
Author explains simple rules but as I remind my office and people who usually are responsible for presentations so often forget the real point indeed. Read it!

Axapta SP4 released <- reason that makes me busy

Well, I promised to put a little outlook for the below diagram about the n-tier architecture but first I have to handle the latest Service Pack for Microsoft Business Solutions Axapta with EE (eastern europe) localization for my current customer for implementation and that's keeping me little busy these days. I have to admit that Axapta is a great application but polish localization if far to be awesome. I can undestand that global product development is an important thing, but with the revolution of SP3 now it comes SP4 where I have to look for specific business solution I want to use in Poland in Czech Republic configuration keys. That's kinda confusing, but as promised soon N-tier architecture design tutorial - part one.