Click here to Skip to main content
15,897,891 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: DAO Framework Pin
TylerMc0077-Feb-12 8:22
TylerMc0077-Feb-12 8:22 
GeneralRe: DAO Framework Pin
Rob Grainger12-Feb-12 14:21
Rob Grainger12-Feb-12 14:21 
GeneralRe: DAO Framework Pin
cpkilekofp7-Feb-12 8:36
cpkilekofp7-Feb-12 8:36 
GeneralRe: DAO Framework Pin
ClockMeister7-Feb-12 13:11
professionalClockMeister7-Feb-12 13:11 
GeneralRe: DAO Framework Pin
HuntrCkr7-Feb-12 17:36
HuntrCkr7-Feb-12 17:36 
GeneralRe: DAO Framework Pin
Florin Jurcovici7-Feb-12 21:46
Florin Jurcovici7-Feb-12 21:46 
GeneralRe: DAO Framework Pin
CDP18027-Feb-12 23:41
CDP18027-Feb-12 23:41 
GeneralRe: DAO Framework Pin
BobJanova8-Feb-12 4:28
BobJanova8-Feb-12 4:28 
I agree with you particularly in the case of entity modelling/persistence frameworks. The way someone else thought you should do something is almost never exactly how you have actually done it, particularly if you come in at the point where there already is a database (possibly many years old).

I've had fun fighting NHibernate on a previous project where the database predated the mappings, and in a couple of cases I gave up and just used a direct SQL query because it was much quicker and easier to do so.

In another recent project, which was very short, I wrote a simple entity persistence framework because it was much easier to do that than to work out how to make Entity Framework actually do what we wanted.

Frameworks work really well if you agree at the start that you're going to do things their way. Often that's not possible and, particularly with database mapping but to a lesser extent with every situation, the framework is too hard to adapt to a different situation.

There are a few hard problems out there for which a framework is a timesaver. UI is the obvious big one, and serving content over HTTP is another one. Web services would come in this category too. It's not worth rewriting these, because to do so, even for the limited scope of a single project, would take weeks. But in the case of entity mapping, implementing what you need for your project will probably take a few days, and that's likely to be less time than you'd waste trying to get an existing framework to play nicely with the rest of your code and with your database.
GeneralRe: DAO Framework Pin
CDP18028-Feb-12 7:58
CDP18028-Feb-12 7:58 
GeneralRe: DAO Framework Pin
BobJanova8-Feb-12 23:12
BobJanova8-Feb-12 23:12 
GeneralRe: DAO Framework Pin
CDP18029-Feb-12 0:36
CDP18029-Feb-12 0:36 
GeneralRe: DAO Framework Pin
BobJanova9-Feb-12 0:43
BobJanova9-Feb-12 0:43 
GeneralRe: DAO Framework Pin
CDP18029-Feb-12 1:55
CDP18029-Feb-12 1:55 
GeneralRe: DAO Framework Pin
Rob Grainger12-Feb-12 14:31
Rob Grainger12-Feb-12 14:31 
GeneralConnectivity test PinPopular
MatthysDT1-Feb-12 1:19
MatthysDT1-Feb-12 1:19 
GeneralRe: Connectivity test Pin
Albert Holguin1-Feb-12 3:25
professionalAlbert Holguin1-Feb-12 3:25 
GeneralRe: Connectivity test Pin
Ankit Maini1-Feb-12 20:42
Ankit Maini1-Feb-12 20:42 
GeneralRe: Connectivity test Pin
MatthysDT1-Feb-12 20:47
MatthysDT1-Feb-12 20:47 
GeneralRe: Connectivity test Pin
Dan Neely10-Feb-12 13:00
Dan Neely10-Feb-12 13:00 
GeneralRe: Connectivity test Pin
VallarasuS2-Feb-12 0:50
VallarasuS2-Feb-12 0:50 
GeneralRe: Connectivity test Pin
kmoorevs2-Feb-12 4:05
kmoorevs2-Feb-12 4:05 
GeneralRe: Connectivity test Pin
Gary Wheeler2-Feb-12 0:19
Gary Wheeler2-Feb-12 0:19 
GeneralRe: Connectivity test Pin
patbob2-Feb-12 6:13
patbob2-Feb-12 6:13 
GeneralRe: Connectivity test Pin
sergiogarcianinja2-Feb-12 2:12
sergiogarcianinja2-Feb-12 2:12 
GeneralRe: Connectivity test Pin
User 48350472-Feb-12 3:23
User 48350472-Feb-12 3:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.