Well, you are not alone. Even the experts do not agree on which data technology you should use. However, you will find a common theme among each of the panelists in this lively video: The Data Access Menu: Making Intelligent Choices. (http://www.msteched.com/online/view.aspx?tid=fa50fd2a-05f3-41d9-aaa6-110daea9dce2)
Panelists include Rocky Lhotka, Stephen Forte, Paul Sheriff, Jeffrey Palermo, Kent Alstadt and Richard Campbell. Watch as these heavy weights in the industry talk about the various Microsoft Data Access technologies and how you should best approach each one.
This video is only about 35 minutes long, and is a lot of fun to listen to. I sure had a great time doing this panel!
Paul
OK all you folks at Tech Ed. Here is my special code for my "Race":
Paul
Hello All,
Are you looking to strike out on your own and create your own software consulting business? If you have ever thought about doing so, you might want to check out this panel entitled: "Let's Talk About Software Consulting as a Business". This panel was presented at Tech Ed on May 11, 2009. You can view this panel at: http://www.msteched.com/online/view.aspx?tid=bb81bae0-320a-4bda-9146-12f0b20a8733.
In this panel are panelists, myself included, that have had many years of experience running a consulting business. You are sure to pick up some wisdom from those of us that have "been there". The topics covered are managing client expectations, fixed price versus time and material and lots of other great tips and tricks.
Hope you enjoy.
Thanks,
Paul
I just had a situation where a potential client gave me a zip file of about 200 files. They wanted us to give them an estimate on how long it would take us to recreate each screen in ASP.NET 2.0. I did not relish the thought of typing in all those file names into an Excel spreadsheet so I could assign hours to each one. So I wrote a simple little utility to grab each file in the folder, and add that file name to a StringBuilder object. I separated each file name with a CRLF. Once I had all of the files in the StringBuilder object, I simply copied the text to the Clipboard. Then I opened up Excel and pasted the contents of the Clipboard into an Excel column. Bingo! I now had all those file names into Excel, ready for me to assign hours to!
C# Code
private void GetFiles()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder(1024);
System.IO.FileInfo fil;
foreach (string strFile in System.IO.Directory.GetFiles(@"D:\Customers\ASP"))
{
fil = new System.IO.FileInfo(strFile);
sb.Append(fil.Name.Replace(".asp", "") + Environment.NewLine);
}
Clipboard.SetText(sb.ToString());
}
VB.NET Code
Private Sub GetFiles()
Dim sb As New System.Text.StringBuilder(1024)
Dim fil As System.IO.FileInfo
For Each strFile As String In System.IO.Directory.GetFiles("D:\Customer\ASP")
fil = New System.IO.FileInfo(strFile)
sb.Append(fil.Name.Replace(".asp", "") & Environment.NewLine)
Next
Clipboard.SetText(sb.ToString())
End Sub
I hope this little tip helps you the next time you have to do something like this!
Paul
When is the last time you had one of your peers or an external consultant evaluate your coding? If you have not done this in awhile, you should seriously consider it. While I am sure you are a great programmer, different people have other ideas as well. In the IT business, it is all about learning. If you are not sharing ideas, or talking with others about your coding, then you are probably not learning as much as you could.
Now, I know reading articles and google-ing for code is a great way to learn as well, but everyone can bring fresh ideas to you. Never pass up a chance to "put yourself out there" and ask for some help.
At my company, PDSA, Inc. (www.pdsa.com) we actively encourage (actually, we enforce) code reviews on everyone. In fact, we have developed a set of checklists that we use to do a code review. For our security review, for example, we have over 144 points that we go over. This checklist not only covers code, but also security from an organizational standpoint. Our Application Design review covers about another 100 points and our SQL Server review also covers about 100 items.
I would encourage you to come up with your own checklist that you can use for doing reviews of code, organizational structure, databases and security. If you do not know where to start, you could join my Paul Sheriff's Inner Circle (www.PaulSheriffInnerCircle.com). IT Professional members on my Inner Circle have access to all of my checklists.
Just recently, I performed code and security audits at two separate companies. These were companies that thought they had developed secure, well-written and performant applications. However, they had never had anyone audit their code before. As a result, I wrote a 16 page report for one company and a 20 page report for the other of improvements that could be made in their applications. Just an example of what can be learned by having someone else look at your code. The next steps for these companies will be a training session to talk about the findings in these reports.
I hope this inspires you to come up with your own code review process at your company.
Paul
There are serious potential problems with the upcoming switch to Daylight Savings Time this Sunday. While MSFT is working on a fix, so far it is not perfect. Check out these entries.
http://support.microsoft.com/gp/cp_dst
http://support.microsoft.com/gp/dst_prodlist
http://support.microsoft.com/kb/933146
The network company we work with, CSI (www.csiteks.com), has discovered the following:
1.) If a client [like Outlook, entourage, palm or windows mobile] gets the update first, there will be a 1 hour disparity.
2.) If the workstation gets the update before the mobile device, it can hose and duplicate appointments!!!
3.) If the user changes his/her clock forward on Tuesday [instead of the system administrator changing the time on the server or applying the patches across all machines] that user will be locked out of Active Directory until someone logs on as a local administrator. This particular scenario we can almost count on as most of our users are local administrators of their machines!
Hopefully MSFT will give us a fix before this Sunday.
Paul
www.pdsa.com
www.PaulSheriffInnerCircle.com
Hi All,
Just wanted to let you know that my good friend, Deborah Kurata, has just released the updated version to her popular book "Doing Objects in VB" for VS.NET 2005. Check it out if you get a chance!
Title: Doing Objects in Visual Basic 2005
Author: Deborah Kurata
ISBN: 0321320492
More Info: http://www.insteptech.com/home/books.htm
Paul
OK, this is just a quick little tip. I need to be able to programmatically locate the Machine.Config file. Instead of hard-coding the path where I know it is, I used the new ConfigurationManager class in .NET 2.0 to perform this. Here is the code.
C#
using System.Configuration;
Configuration cnf;
cnf = ConfigurationManager.OpenMachineConfiguration();
MessageBox.Show(cnf.FilePath);
VB.NET
Imports System.Configuration
Dim cnf As Configuration
cnf = ConfigurationManager.OpenMachineConfiguration()
MessageBox.Show(cnf.FilePath)
You will need to add a reference to the System.Configuration.dll to be able to use this, but then you can use File IO or XmlDocument methods to open and affect the Machine.Config.
Hope this helps someone out.
Paul
Recently one of my programmers came to me after having visited with a PDSA client. He told me one of the programmers at this client was creating a new .NET application and had about 5 add, edit, delete screens created. He had spent, on average, about 7 hours creating, testing, debugging and tweaking the code on each screen. He wrote a little over 200 lines of code for each screen and at least 5 stored procedures for each screen as well. Even though he was able to copy and paste a lot of the code from one screen to another, he still had to fully debug and regression test all the add, edit and delete routines on each screen. This was in addition to the business rule logic that he had to test.
So, what is the point of all of this?
Why was this programmer (and maybe you?) not using some sort of code generator and Framework to generate all of this CRUD (Create/Read/Update/Delete) logic? If you are not using a code generator to create add, edit, delete and simple business rule logic for data, in my opinion, you are spending WAY TOO MUCH TIME CODING and NOT ENOUGH TIME SOLVING the business problem.
The problem with hand-written add, edit, delete code can be summed up fairly succinctly:
- It may not be standards based (give a CRUD screen to 10 developers and you will most likely get 10 different versions).
- It is difficult to reuse for the next application.
- When it needs updating, someone will have to search through all those lines of code looking for locations to update. Guess what? They won't find all of them, resulting in high error rates.
- This code will be harder to maintain over the life of the application, as new team members replace the original coding team.
- It has to be written and re-written any place you need to add, edit, delete the same table, even on different forms.
- If you change the table schema, you will need to find all the places where the add, edit, delete code for that table is and modify all those locations. This is a very error prone process.
You can eliminate every one of these consequences if you take advantage of a good Framework and Code Generator.
NOTE: Many frameworks are NOT worth the hassle. Microsoft's Enterprise Library, for example, has so many downsides (no support, high learning curve, bad documentation, no upgrade path, way over-engineered, hard to use just one block by itself), it is used at the peril of any developer.
So which Framework should you use? It depends! I know, not a very good answer, but there are so many different frameworks and code generators out there that it is hard to find a one-size-fits-all. As far as code generators go you can't go wrong with CodeSmith (www.codesmithtools.com). This will help you generate CRUD logic quickly and simply.
As far as Frameworks, some are good and some aren't. What you need to look for are the ones that do not lock you into their way of doing things:
- Once a Framework generates code how customizable is it?
- Can you inherit from their base classes?
- Can you override their methods?
- Can you add your own code to the generated code?
- Do they separate their business logic from their data access code so you can add on your own business logic and not have it wiped out when your database schema changes and you need to regenerate?
So many questions, and so few answers. You will need to ask these questions before purchasing a Framework.
Many people have asked me what we use here at my consulting company PDSA, Inc. (www.pdsa.com). We built our .NET Framework and Code Generator from scratch! I know, a lot of work, but it was worth it. We now have a process in place that is consistent from developer to developer. We have all CRUD logic generated in literally a few seconds. This includes all stored procedures. The code generated is also 100% bug free! This means we do not need to test any of this code. We only need to test the custom business logic we need for those particular screens that we are coding. This eliminates hours and hours of work. If the table schema changes, we simply regenerate, and since our business logic is separated from the CRUD logic, our custom code is preserved.
So, how does our Framework and Code Generator work? I do a monthly webcast that shows you our Framework. Sign up at www.pdsa.com/webcasts.
Please understand I am not on this blog to promote our stuff. I happen to believe in Frameworks, any Framework, and I believe you owe it to yourself to check out the myriad of Frameworks that are on the market. I have been developing and designing Frameworks since I worked on COBOL on the mainframe. When I was doing Clipper programming I designed a code generator, screen painter, and a process for creating CRUD logic. In VB 3.0 I created a code generator and starting with VB 4.0 I have had a more complete framework. That has then led into our PDSA .NET Productivity Framework that we sell today. So stop writing so much code and focus on the business problem at hand. This will make you a better developer and one that is more demand by employers.
Paul
Last month I recorded an episode of DNR TV on creating custom providers. Carl and I go through a lot of code showing how to create your own custom providers. Enjoy!
http://www.dnrtv.com
More Posts
Next page »