The Philly Dot Net user group pulled off another successful code camp. This time around over 350 people showed up to get their free training on a variety of subjects. I would like to thank everyone involved and all participants for making this such a success! I would also like to thank everyone that attended my session on Developing the Blueprint for Enterprise Architecture. You guys had some good questions!!! I hope you liked the exercises and I hope you gained more insight to the process of designing data architectures.

Our www.Phillydotnet.org second installment of the 2008 Code Camp series will be held at the DeVry University campus in Fort Washington, PA on Saturday, May 17 from 8:30-5:00. Detailed directions are on the DeVry web site.

  • Lots of code, just say no to slides!
  • 8+ hours
  • 40+ sessions (8:30, 10:00, 12:30, 2:00, 3:30)
  • 8 tracks + lunchtime entertainment
  • 500 seats with tables (laptops welcome)
  • Free breakfast, lunch, and afternoon snack (expanded menu!)
  • Raffles and prizes at 5:00
  • Easy parking
  • Limited wireless

All of this is made possible by our Gold partners (HostMySite, MicroEndeavors, Perficient, RDA Corporation, RJB Technical Consulting), Silver partners (Neudesic, Telerik, Ted Pattison Group, Culminis) and our Platinum site sponsors (DeVry University, Microsoft).

Here is the tentative agenda, room assignments and times are subject to change:

8:00 Registration, continental breakfast
Alt.NET - 141
8:30 Brian Donahue - Behavior Driven Development
10:00 Steve Eichert - IronRuby
12:30 David Laribee - Strategic Domain-Driven Design
2:00 Sebastian Meine - TDD w/SQL
3:30 Erik Peterson - Model-View-Presenter w/WebForms
Architecture - 104
8:30 Max Zilberman - Using Enterprise Library 3.1 and What is Coming in Ent Lib 4.0
10:00 Ken Lovely - Developing the Blueprint for Enterprise Data Architecture
12:30 Sam Gentile - Advanced WCF: Asynchronous Messaging and Event-Driven Architectures
2:00 Mitch Ruebush - Architect's Toolkit: What an Architect Needs to Know and Do
3:30 Steven Andrews - Automation with MSBuild 3.5 and Team Build 2008
Business Intelligence - 109
8:30 Jim Pletscher - Getting Immediate Value from PerformancePoint Server 2007
10:00 Mark Scott - What's new in Analysis Services for SQL Server 2008
12:30 Joe Toscano - Using the PerformancePoint Server 2007 Planning Components to Build Budget/Forecasting
2:00 Andy Leonard - Change Data Capture, Incremental ETL, and SSIS 2008
3:30 Steve Mann - PerformancePoint Monitoring - A Behind the Scenes Look
MIX - 111
8:30 Jess Chadwick - The ASP.NET MVC Framework
10:00 Dani Diaz - Building Rich Internet Applications Using Microsoft Silverlight
12:30 Todd Snyder - UI Frameworks & Patterns: Applying Patterns to Build Applications
2:00 Bill Wolff - Silverlight Design for Developers
3:30 Milan Negovan - Usability
Framework - 105
8:30 John Baird - Winforms to WPF: Making the Switch
10:00 Kevin Goff - Crash Course on Windows Communication Foundation
12:30 Edwin Ames - Dot Net Basics
2:00 Chuck Urwiler - Using LINQ to SQL
3:30 Rachel Appel - Using ASP.NET Dynamic Data in Web Applications
SharePoint - 113
8:30 David Mann - Making SP Development Quick and Painless using Tools
10:00 Jim Kane - Putting SharePoint to Work - Enabling Communities of Users
12:30 Gary Blatt - Integrating Legacy Apps with SharePoint
2:00 Tony Testa - The SharePoint front-end is for wimps, real men use the SharePoint API's
3:30 Gary Blatt - Using Features to Modify the SharePoint Environment
SQL Database - 108
8:30 Sharon Dooley - New SQL 2008 DBA Toys
10:00 Josh Lynn - T-SQL Development Techniques for Performance
12:30 Mike Welsh - Cursors vs. Set Logic: Alternatives to Cursors
2:00 Dan Hartshorn - What DBAs need to know about BI
3:30 Greg Brozovich - SQL Server Physical Database Design Strategies for Performance
Toolbox - 106
8:30 Al Nyveldt - Learning the ASP.NET provider model with BlogEngine.NET
10:00 Jonathan Newell - Source Code Analysis (SCA)
12:30 Travis Laborde - SRP/DI/IOC: Don't Leave Sub Main Without Them!
2:00 Don Demsak - Introduction to the Web Service Software Factory: Modeling Edition
3:30 Rob Keiser - ADO.NET Data Services
11:30 Social networking in the break room, Primo hoagies, drinks and snacks
5:00 evals, lots of raffle prizes

 

 

You have to love the xml type in SQL Server 2005.  Here's a simple way I found to make use of it: You can audit all the object/schema changes to the database with a simple database-level trigger.

First, create a very simple table (inside a schema I name 'Audit'):

CREATE TABLE [Audit].[Objects](

[EventID] [int] IDENTITY(1,1) NOT NULL,
[EventData] [xml] NULL,

PRIMARY KEY CLUSTERED
(
   [EventID] ASC
) WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

Then, the trigger:

CREATE TRIGGER [Trig_AuditObjects]
ON DATABASE
FOR DDL_DATABASE_LEVEL_EVENTS
AS
INSERT INTO Audit.Objects(EventData)
SELECT EVENTDATA()
GO
ENABLE TRIGGER [Trig_AuditObjects] ON DATABASE

That's it.. now get a nice neat little xml entry in my table every time a DDL database level event happens;

<EVENT_INSTANCE>
    <EventType>ALTER_TABLE</EventType>
    <PostTime>2008-05-01T18:06:01.722</PostTime>
    <SPID>55</SPID>
    <ServerName>TestServ</ServerName>
    <LoginName>domain\username</LoginName>
    <UserName>dbo</UserName>
    <DatabaseName>Test2</DatabaseName>
    <SchemaName>dbo</SchemaName>
    <ObjectName>Table1</ObjectName>
    <ObjectType>TABLE</ObjectType>
    <TSQLCommand>
        <SetOptions ANSI_NULLS="ON" ANSI_NULL_DEFAULT="ON" ANSI_PADDING="ON"      QUOTED_IDENTIFIER="ON" ENCRYPTED="FALSE" />
        <CommandText>ALTER TABLE dbo.Table1
    DROP COLUMN testremove
       </CommandText>
  </TSQLCommand>
</EVENT_INSTANCE>

The EVENTDATA() function is provided by SQL Server inside a DDL trigger and provides all the data you see above as an xml document.

Having this during development is like a poor man's source control for schema changes.  It could come in very handy for forensic purposes when diagnosing post-rollout issues or accidental schema changes. 

I wish I could take credit for developing this cool little find. I found it surfing some time ago. I copied and never got around to testing it. I was pretty happy when I did. Thanks to the unknown coder of this one!

 

The definition of service is ‘an act of helpful activity’. We Information System workers are in the service industry. We supply a service; we design, we develop, we program and we maintain computer and networking systems. Since the very core of our duties is supplying a service why is it so many people in our industry seemingly know nothing about supplying good customer service? Why is it instead of helping our users/clients so many IT people act like they are being bothered?
If you brought your car in for repair and the service manager said, yeah just leave the keys, I will get to your car when I’m good and ready. Or if you went out to dinner and the server said, yeah you food on the counter, but I have to go take my break first – would you take it? Would you just sit there and allow someone to treat you like this? No you would not!!!
What makes us think users should be any different than we are? Users are consumers of our goods and services. Users are our customers and our clients. Without them we would not have a job.
Dale Carnegie said: There is only one way... to get anybody to do anything. And that is by making the other person want to do it. If we take this simple idea and use it next time we are thinking “this guy’s an idiot” as we are explaining to him how to click on the icon, both that user and ourselves will have a better experience.
There is only one road to success – the positive road. All of us should check our negativity at the door and start treating our users, our customers and everyone we work with; with outstanding positive attitude.
Let’s together put the service back in customer service!
 
 
 
 
SDLC – something everyone one of us System Architects/Developers talk about or at least should be talking about.  From my reading and discussion with others there are a lot of different idealisms. For sure everyone seems to agree the starting point is conceptualization. But in actuality where does the concept come from? 95% of the things I develop are business needs. Thus for me the idea is derived from a need. Generally someone comes to me and says we need a system that can do this. Then through a series of meetings generally the requirements, costs, benefit analysis and detailed specifications are defined. Somewhere in here is proof of concept, then development, testing, training and finally maintenance.
The true Software Development Life Cycle follows a designed track with predefined objectives, steps and results. Software developers like to think they are in control of SDLC but in reality they are rarely best suited for the job. A project manager is better suited for managing the SDLC.
As I said most everyone I talked with agreed that Concept is the first step. The next step is generally proof of concept for some and requirements/business-analysis for others. We all work for business. The money from business is what makes the world go around. Therefore from a business standpoint requirements, costs and benefit analysis is the next step. But from a development standpoint proof of concept comes next. What comes next for you?
Before the architect can design and before the developer can develop, detailed specifications are needed. Many people think this should come before the cost analysis. How can any projections be made without knowing the specs?
Now the preliminaries are out of the way it is time for the development team to take over. As we all know this part of the process is now becoming a giant process in itself. There are so many ways to design, develop, test and deliver that one could go crazy!
My point with SDLC is YOU – the developer/architect. You know that you can deliver the product, you know the technologies that are needed and you know how much time it is going to take you to get it production ready. There for YOU need to play a larger role in the first few steps of the development life cycle. OR do you? 
A good team would have someone that knows how to get all the information you need to know, all the things you would ask and suggest and be able to interact with the client in a better method than you would.
My SDLC suggestion:
Client:
                Business need / idea
Technical Marketing Team:
                Meet with client; define needs, specs, cost/business analysis
Architect/Development Team:
                Provide proof of concept
                Design/program/test
Technical Marketing Team:
                Continue to meet with client
                Training
System Administrators
                Maintenance
 
It is all about cost of ownership. The development team is probably the highest paid in the group of teams. It makes since to keep them doing what they do best. Technical marketers are best dealing with clients issues. They are people persons. Although most of us Architects and developers are capable of dealing with client issues, we are better suited designing and developing the product.
 
The meeting started out with our own Marc Ziss telling us everything he learned at the MIX conference. He had video’s, examples and a lot of stories. The one thing that really stood out in my mind was what Microsoft and NBC are doing for the 2008 Olympics. You just wait! Never before has any company taken on such an undertaking! MS is going to supply 22,000 hours of streaming video via Silverlight. Viewers will be able to watch live streams, taped events, be able to pause during an event and come back, be able to jump around through different events and best of all it is FREE! This is the event that will change our lives. We developers better start learning SilverLight because once the CEO’s see what is available, they WILL demand it!
 
Our main speaker of the night was supplied by INETA. Ambrose Little gave a great discussion on User Experience; aka UX. Ambrose works for Infragistics. He talked about the development team, the process and how the end user feels about your software. One of the questions he asked was about how many people program things that work but the heck with how well the users like it. Surprisingly a couple of people said, as long as it works the user’s have to deal with it.
The idea behind UX is why would the end user work with your software if it is awkward or difficult to work with what makes you think the users are going to keep using it. In today’s business world there are thousands of us all working with the same toolset, getting the same ideas and programming basically the same functionality. So you need to stand out in the crowd! One way of doing that is develop with the user experience in mind.
One of the users asked where you should start; should we start with data design or should we start with the UI. Obviously there is no clear answer. Most of us do both, we make the data match our UI and we make the UI match our data.
The UX idealism is;
User centered design
Ux friendly methodology
Personas
Usability testing
Patterns
Refactoring
 
Add free Pizza, the ability to talk with other top developers and of course talk with my buddies from the Mothership (Microsoft) and this was just another great meeting at Philly.net (www.phillydotnet.org).
Don't forget our next Code Camp is May 17, 2008 - 450+ geeks, 50+ sessions and lots knowledge sharing

I have been a proud SUV and 4x4 driver for the past 20 years or so. Most recently I have had 2 Durango's and a 4x4 pickup. Now that gas is $3.30 a gallon and the news says it is only going to go up. I decided I need to change my ways. But like an old country boy, I still have one Durango - A man has to have a truck for hauling stuff...

My new mode of transportation is a 2008 Toyota Prius. In the couple of days I have had it I have been averaging 53 miles to the gallon; a BIG difference from my Durango with it's13 miles to the gallon. I encourage all of you to take a look at your vehicle and seriously think about how much it is costing you and our environment!.

Here are some numbers;

Current Gas price - $3.30 a gallon  times 15,000 average miles a year at 13 miles per gallon - $3808 a year in just gas!

This summer gas price is predicted to be $4.25 a gallon; which is $4904 a year.

And the big one!

In 1979 the polar ice caps were 20% larger than they are now. Scientists estimate that mean global temperatures have increased by 0.5 to 1.0 °F (0.3 to 0.6 °C) in the last 100 years. Basically this tells us that man has had the biggest impact on the Earth. 1900 was the start of the industrial revolution. We need to make this turn of the century become the global revolution; where everyone does their part to ensure our Earth has a future worth living!

Develop Green!

 

I’ve been working on a project that was supposed to be a pretty quick windows service that simply extracted some images and matched up those images in an index file. We (the company I work for) are doing this for a client of ours to aide them in their billing process.
We have an application that scans checks and payment stubs. It’s my job to create something that can extract the images from the scanned documents and supply a all the payment information associated with that check/stub. The company that we are doing this for made changes to the specifications every meeting we had. We started back in November, Now I am ready to deliver the final product. Oh yeah, we had a change today - J
There are many interesting things with this application. The first thing I had figure out was how to parse through a comma delimited file to get the image name, and the accounting/payment info. My text reader was fairly simply; I just read one line at a time, putting each comma-ed item in an array.
public static string[][] Dissasemble(string input, char[] seperator)
        {
            List<string> rows = new List<string>(input.Split('\n'));
            List<List<string>> xmlItems = new List<List<string>>(rows.Count);
            List<string[]> result = new List<string[]>(rows.Count);
 
            foreach (string str in rows)
                if (!String.IsNullOrEmpty(str))
                    xmlItems.Add(new List<string>(str.Split(seperator)));
 
            // figure out how many items we should expect on each line
            int count = xmlItems[0].Count;
 
            for (int i = 0; i < rows.Count; i++)
            {
                if (count != xmlItems[i].Count)
                    throw new ArgumentException("input is not correctly formatted -- all rows should have the same number of items");
 
                result.Add(xmlItems[i].ToArray());
            }
 
            return result.ToArray();
 
One of the items in the string array is the name of the image. Working with images was much easier than I anticipated. Some of the images needed to return the front side of the check, some needed to send both the front and the back. Luckily the application that scans and stores the images, has a web interface to extract the image.
First I have to create the uri line;
string webreq = "http://" + Properties.Settings.Default.ImageServerIPAddress + "/imgreq/imgreqis.dll?IC&Date=" + MainClass.fixdate(ItemDate, "reg") + "&Item=" + ItemID + "side=" + Side;
Once I have the line built, I read and write to the html file stream. The interesting thing I found out is the image application returns a png. But the client wants a tiff. Converting a png to a tiff as simple!
WriteBytesToFile(Properties.Settings.Default.Images + @"\" + ItemID + ".png", GetBytesFromUrl(webreq));
                    img = Image.FromFile(Properties.Settings.Default.Images + @"\" + ItemID + ".png");
                    string fullname = Properties.Settings.Default.Images + @"\tempimages" + @"\IMG" + ItemID + Side + ".tif";
                    img.Save(fullname, ImageFormat.Tiff);
                    img.Dispose();
The WriteBytesToFile method:
FileStream fs = new FileStream(fileName, FileMode.Create);
            BinaryWriter w = new BinaryWriter(fs);
            try
            {
                w.Write(content);
            }
            finally
            {
                fs.Close();
                w.Close();
            }
 
The next thing the client wanted was all the images in a zip file. Unless you use one of the paid or free zip classes, C# and zip is difficult but not impossible. To create an empty zip file;
byte[] emptyzip = new byte[] { 80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 
                FileStream fs1 = File.Create(Properties.Settings.Default.FileSaveLocation + @"\" + zipname());
                fs1.Write(emptyzip, 0, emptyzip.Length);
                fs1.Flush();
                fs1.Close();
                fs1 = null;
 
To copy the images to the zip file I had to use shell commands;
Shell32.ShellClass sc = new Shell32.ShellClass();
                Shell32.Folder SrcFlder = sc.NameSpace(Properties.Settings.Default.Images + @"\tempimages");
                Shell32.FolderItems fi = SrcFlder.Items(); //..Item(OriginalFileName);
                Shell32.Folder DestFlder = sc.NameSpace(Properties.Settings.Default.FileSaveLocation + @"\" + ZipClass.zipname());
                DestFlder.CopyHere(fi, 1024);
               
                Thread.Sleep(SrcFlder.Items().Count * 1000);
 
Of course there are other parts, for example I had to supply separate text files in particular formats for the client – boring stuff. Up until today, I was under the impression I could simply copy the files to a folder for the client extract through their FTP connection. Today I found out our FTP server cannot be reached through a file share. Thus I had to learn a thing or two about programming a FTP client.
FTP is .net sockets, user names, passwords and all the regular IO commands. But everything is done via a stream. This was a pretty big class. I had to both write to the stream and read from the stream. Some of the highlights are;
Sending commands
if (Responses)
                        log.WriteLine("---> " + command);
                 
                  // send it
                  writer.Write(command + "\r\n");
                  writer.Flush();
                 
                  // and read the result
                  return Reply();
 
Uploading files:
if (TransferType == FTPTransferType.ASCII)
                  {
                        Stream srcStream =
                        new FileStream(localPath, FileMode.Open, FileAccess.Read);
                 
                  }
                  else
                  {
                        Stream srcStream =
                        new FileStream(localPath, FileMode.Open, FileAccess.Read);
                  PutBinary(srcStream, remoteFile, append);            
}
 
                  Validate();
 
Tomorrow, I’m hoping to have some real data to test with. If all goes well, I can release this week!
 
 
Another great meeting!!! Tonight I walked in with Bill; I got to help push the mounds of food and drinks in. As usual the meeting was held at the Microsoft Malvern campus. The meeting started with Dani Diaz our local MS rep. His course was named VS c# Tips and Tricks for the MS Visual Studio 2008 IDE.
Dani started out with showing us around VS 2008, key commands, explaining the versioning and how it works, etc. Some of the key commands that he showed were pretty cool, ones I never saw before. Then he went into some of the code changes, things like how we no longer need to add local variables to properties and not having to type new for objects where you are adding the properties when instantiate the values. Name Object initializers (also collection initializers).  He obviously talked about LINQ, and how to write code using it.
Tonight Devon Consulting sponsored the event. They supplied all the food – lots of food – 90 people or so!!! One of the leaders of Devon spoke about how they get jobs… And they gave away a GPS unit.
Our main speaker of the night was David Solivan, another MS evangelist. His subject was the magic of Application Life Cycle. He started off speaking about how many projects fail and how many succeed. How we manage requirement changes and quality. The problem is it takes more than developers to produce a solution. The new focus is People, process, tools. (The Team System).  
We had a discussion on Team Foundation Server and the advances MS made compared to Source Safe. Dave showed how much better the team editions are over the ole individual versions. He showed how much more useful the Team Editions are. Showed the entire life cycle of a development project and how each person’s role is just as important as the others. Microsoft is shifting from selling to just developers. They realize there is an entire team of people that are required to properly get a development project completed.
The night as most of the meetings was a 10! Meaning GREAT!
If you are not in a user group you are missing out!
I came across a couple of cool things that I want to share with everyone.
First one is Microsoft Enterprise Search. The second one is True Hybrid Hosting.
Microsoft is offering Microsoft Search Server Express for Free!!! Both the RC and the RTM will be free of charge. Pretty cool! http://www.microsoft.com/enterprisesearch/serverproducts/searchserverexpress/try-1.aspx
True Hybrid Hosting is unbelievable!! Within a single domain you can have .Net, classic ASP, PHP, JAVA, Javascript, MySQL, MS SQL 2005, CGI, PERL, Python and the list goes on ALL working in harmony as one big happy family. This impressive balancing act of Windows and Linux hosting is truly going to revolutionize the web. ALT.Net no problem with this platform! You have to check this out for yourself at http://www.dotnetplushosting.com.