Archive for November 12th, 2009

C# Constants – Style – And a Good Pattern


This post come from a question on StackOverflow and question :

In C#, What’s the best way to store a group of constants that my program uses

Why?

There would seem to be a very good code pattern for the expression of constants in C# (or any OO programming language).

The Pattern

  • A static class,
  • with read-only properties,
  • these proprieties are also static

The Benefits

  • A static class can be accessed from anywhere (in the same namespace)
  • The namespace the class is in can be used to scope the visibility of the constants.
  • The properties achieve constant behaviour thru not having setter methods.
  • Aesthetically pleasing in an Object Oriented sense. The result is an OO expression of “what a constant is”.

An Example 

    public static class Constants
    {
        public static string SomeConstant
        {
            get
            {
                return "String Constant";
            }
        }
        public float someFloatConstant
        {
            get
            {
                return 3.5F;
            }
        }
    }

Digg This
Advertisements

, , ,

Leave a comment

TOGAF 9 Training – Completed


Definition of Terms

Term Definitions
TOGAF 9 Enterprise Architecture development methodology (ADM). Produced by The Open Group.
Acronym =
The Open Group Architecture Framework Version 9
ADM Architecture Development Method
Enterprise Architecture The “town planning” for IT in an enterprise. Enterprise Architecture in Wikipedia.
SOA Services Oriented Architecture
SDLC Systems Development Life Cycle
Change Management Change Management (ITSM)
ITSM IT Service Management

 

Introduction

I have just completed a 4 day training course on the TOGAF 9 ADM.  This was 4 very long days. The topic matter is “a bit dry”. What can you expect from a process which is designed to align the goals of the enterprise (not just IT) to the systems which which are delivered. But, very pertinent to the one of the many “hats I wear” at work.

The “brain full” light  started flashing this afternoon. Hardly surprising 4 days of 9:00 to 5:00 of Enterprise Architecture training is bound to "get to you after a while”.

Was It Worthwhile

YES. It was. I’ve gained a far better understanding of the “whys, and wherefores” of the whole “shooting match”.

I’ve still plenty of “dangling pointers”, which I hope to resolve over the coming weeks. Most of these “dangling pointers” are pointers into the 800 page pfd file which documents the process.

I’ve a fairly detailed set of notes from the course. The benefit of having the work notebook, and a copy of Word. I’ve taken the notes into word as an outline, which I could fill out into a book on TOGAF 9. If anyone (major publisher) out there wants to employ me (offer a publishing deal which would make it worthwhile for me to take the time out from work to write the book) to write a “not from the Open Group” TOGAF 9 book, leave a message.

External “Dangling Pointers”

The course has left me with a couple of other pointers to chase up. These include:

  • SOA information from the Open Group. This is a gap in the applications architecture which I’ll need to address (or start the correct wheels rolling to address). I’ll try and grab some of the SOA content from the Open Group Web Site.
  • SOA Training from ZapThink.
  • Some interesting diagramming styles which TOGAF used. I need to look up if they are from some other diagramming system, or unique to TOGAF.
  • Security Architecture from the Open Group. Another of the other threads in the group. I need to look up, and download some of the content. It is another gap in the architecture, and needs to be addressed (by me, or by me starting the wheels rolling – in the right direction).

Conclusion

The training was very worthwhile.

I has left me with plenty of work to be done (but I had that before the course as well). But, now I may have some real ideas as how to get some of it done in a TOGAF way, now.

Probably, leaves me with a number of “big projects” yet to “kick off”. The getting the SOA right, and getting a Security Architecture which ties into the right parts of the SDLC, and Change Management Processes, will be important.

 

Digg This

, , , , ,

Leave a comment

%d bloggers like this: