share
Stack OverflowCareer Killer? Nhibernate, OOP, Design Patterns, Domain Driven Design, Test Driven Development, IoC, MVC
[+62] [13] fregas
[2009-10-18 22:11:19]
[ c# nhibernate oop tdd domain-driven-design ]
[ http://stackoverflow.com/questions/1586166/career-killer-nhibernate-oop-design-patterns-domain-driven-design-test-driv ] [DELETED]

I have a fairly slick approach to doing C# development using the above tools/methodologies. Specifically i follow the "Jeffrey Palermo Agile Bootcamp" onion architecture. I feel like I'm a strong developer/architect using these tools and that these make me more productive and help make more maintainable code. I think these are all important things for any senior developer to know. I have been writing code for over 10 years, mostly in MS technology.

What i am finding though, is that Microsoft shops don't really care about any of this stuff. All they care about is you know C#, sql server, stored procs and often some WCF. Its not that I don't think its valuable to know how to write hand coded stored procs on occasion or that wcf is not useful technology. Its just that most .NET shops think that is the way you should always build applications using MS technology. Code up some stored procs, write a hand-coded DAL to talk to it, MAYBE use some dumb anemic data objects to pass around to and from WCF. Put all behavior in the stored procs or some sort of service like classes. Very procedural stuff. OOP, DDD, TDD, O/R mapping are either downplayed or non-existent at most of these shops. Certainly my last job was like this. Everything was stored procs to WCF. Not an object or unit test to be found.

Should I be looking to switch my skills over to java, ruby or some other technology to do the style of development that I like and think produces the best quality? I feel like the .NET community has matured quite a bit but still i feel undervalued in the marketplace for what i know. I feel like .NET shops place great value on WCF and SOA but ignore OOP/DDD and design patterns. Everything is data centric. I'm not even thinking about the hordes of "drag and drop" coders out there...

Maybe this is just due to the economy or the part of the country i'm in (fort worth, tx). Should I bail on microsoft development, and if so, what could I move to that has the same pay and this style of development is more accepted or expected?

Thanks.

UPDATE. I'm closing this. The .NET community has gotten a bit better, although there are still lots of corporate jobs and developers that do things the old crappy way. My choice has been to switch to Ruby, regardless of the consequences to my career. It doesn't mean I won't do .NET/C# where appropriate, but I find the community, code, and tools better in Ruby overall. No offense to any .NET people, but this has been a hard, well thought out decision over the source of a couple of years. Thanks for everyone's input.

(7) This question ought to be CW - Xencor
(7) @Xencor, no it should not! - Ashley Henderson
It's a question whose answers will be voted on according to the readers personal opinion, it has no "correct" answer. Which all says to me that this should be CW (not that I'm going to vote to close it or anything, it's a good question) . . . P.S. The argument that "there are plenty of other questions out there like this that aren't CW" doesn't hold water for me. If I could I'd make all of those CW too. Thanks :) - Binary Worrier
loC = "lines of code" or ??? - steamer25
(2) Ioc=inversion of control - pirho
If you can show that your way is faster, your supervisors will go along with it. Unfortunately, most MS shops hire people in lower salary grades that could probably not understand half of the architectural tools you've mentioned ... so they stay mostly procedural and get the job done in half the time (and leave it to QA to find the problems). - Jess
[+30] [2009-10-19 06:14:20] Pavel Minaev [ACCEPTED]

The thing about .NET - as well as virtually every other Microsoft platform - is that there's One Way To Do Things, which is described in MSDN and various books, and that's how most MS shops do it. For .NET in particular, this meant datasets not long ago. Now, the tide is turning - unit testing is promoted more and more, EF2 comes with POCO support, ASP.NET MVC specifically lists TDD as design rationale, and so on. It's already at the tipping point: my wife works in a .NET shop where most of the code is written just as you describe. Their next project is going to be done using ASP.NET MVC and L2S, with unit tests all the way. Why? Because Microsoft says it's the Next Big Thing.

With that in mind, you might want to stick around for a little longer, and see how that works out.


Good answer! I could not agree more - Daniel Melo
1
[+24] [2009-10-18 22:20:20] Alun Harford

You don't need the majority of jobs - you only need one.

If you can't change your company, change your company!


I'm using these at my current contract, but as I mentioned above, i'm thinking long-term. I don't want to be locked in only at the job i'm at now. Eventually, I'll need another job. - fregas
(2) I can only talk about where I work, but I've never worked on a stored proc + hand-coded DAL + procedural hell project and I've never had a problem getting another contract. I've worked on some horrible NHibernate projects, but that just proves that you can write terrible code with any technology. MSFT's push towards unit testing in 2010 and the next version of EF perhaps supporting POCO-style ORM is not likely to hurt you either. - Alun Harford
@fregas: And what makes you thing that knowing and applying best practices means you cannot get a job elsewhere. If you know how to do things the right way, you certainly can do them worse. - Vinko Vrsalovic
@vinko. I guess thats a fair question. My issue is that i feel like i'm focusing in an area that makes the most sense technically, but that in the Microsoft world, my value as a programmer will decrease because i'm not doing it "the microsoft way." - fregas
2
[+24] [2009-10-18 22:22:42] Paul Sasik

I think that the technologies you espouse are a great way to approach software development but from my own experience I feel that they're seen as an "Ivory Tower" in most development groups. I do agree that .NET shops are probably more likely to not follow best practices (again from my experience) but going Java will be no panacea. Deadline is king everywhere you'll go and most shops will skip past "Ivory Tower" ideals in hopes of meeting a deadline.

P.S. You're fairly new to SO. If you keep reading the posts here for a while you'll see that MS shops are definitely coming around to best practices development by the kinds of questions that are being asked and answered on a daily basis.

Also, there's a competitive challenge to MS from the open source community. For instance, I'm fairly sure that ASP.NET MVC was created by MS as a direct competitor to Ruby on Rails development, and that's a good thing. It will force the issue with a lot of shops. E.g. You have to do MVC to do ASP.NET MVC. You can't put biz logic into your UI, it's just not practical.


(1) +1 The 'real world' of programming, at least in my experience, is much different than you read in books. TDD, Design Patterns, ORM's, etc, etc are wonderful but deadlines dictate management and programming decisions, not best practices. - Beavis
(1) And yet programmers choose to work there! It's not like there is a massive oversupply of good developers out there - if there were recruitment wouldn't be so hard. And people can write business logic in the UI in ASP.NET MVC. I've seen plenty in Monorail views! - Alun Harford
@beavis. Thats so short-sited...but sadly often true. - fregas
(3) Strangely enough, I have no degree, but through practical experience have come to be a strong believer in TDD and a whole bunch of other "ivory tower" stuff. Eventually you realize that those principles exist for practical reasons. - kyoryu
@Beavis almost any shop that will cut corners on software design to meet deadlines will be one that is releasing a dead product or will turn into a zombie in the maintenance stage. - Chris Marisic
3
[+13] [2009-10-18 22:29:10] Beavis

This is why I like small shops. If you're a big fish in a small pond you can become a catalyst for change. It's much harder to do this with an army of developers and tons of bureaucracy in the way. This isn't a technology issue, it's the culture of the company that's the problem.


4
[+6] [2009-10-19 12:28:45] Mark

I used to work at a company that was very deadline centric. Whichever client was screaming the most would be top priority and it would result in compromise in code quality and design. This would happen every day resulting in a gigantic mess of unmaintainable code, builds that were not usable, and numerous other problems. A few of us at the old company tried our hardest to inject some of the design patterns you mentioned but it would always result in arguments with the lead developers saying it couldn't work, how can this fit our needs, what about time frames, and the best one yet, "If this causes me more work, you should watch out for your job" After many months of tring we realized that company was a lost cause and I decided to go elsewhere.

Like another commenter mentioned finding a new development shop or a small group can really help get some of these ideas in the main line from the beginning. At my new job I am trying to really push these ideals to help out the company as a whole and i am slowly winning them over. With Team City, Nunit, NCover, and a slew of other tools. Trying to get the people to work smarter not harder. It is an up hill battle but finding the right company is the best thing where you can feel that you are rewarded at the end of the day.

Places are out there just need to not jump ship immediately to another platform just because you think the grass is greener on the other side.

Good Luck!


5
[+6] [2009-10-22 12:30:51] Quibblesome

The killer in my experience is that you learn on the cool tools: NHibernate and NUnit but then have to professionally work with the tools that are a poor substitute: EF and MSTest 2005.

This makes me a sad panda.


6
[+5] [2009-10-18 22:28:38] strickland

I'm at a company who uses .NET as the main platform. The project I'm developing is one where we are using C#, Silverlight, NHibernate, Spring, and SQL Server. I think it is a matter of the company you are with. If you have the ability to change the culture then go for it.


(2) Ditto - was going to write a similar post, .Net != "must use bad methodology". There's always a choice. - Binary Worrier
(1) Just to follow up now that we're about 2 years ahead of where my comment was originally added. We've since moved to MongoDB away from NHibernate and SQL Server. So once again it's just about being flexible and making sure that you are building a great and maintainable product. The tools you use are mainly there to make you happy and allow you to get your work done in a timely manner. - strickland
7
[+5] [2009-10-19 05:57:52] Derek Greer

There is probably a higher percentage of Java shops which practice/value these skills due to the fact that these ideas have had much longer to bake in the java community, because Java developers are more likely to have had experience with older OO-technologies (C++, Smalltalk, etc.) and because many of the pioneers, thought leaders, and everyday aspiring software craftsman developing in the 90's and early 2000's migrated to the Java platform and haven't seen the .Net platform offer a compelling enough reason to change.

That said, the .Net community is starting to mature, and those who have a firm foundation in good software development practices will have an advantage as these ideas continue to take hold and will have nothing but an increasing number of opportunities to work with those of like mind as time goes on.

Be patient, and be the change :)


8
[+4] [2009-10-18 22:29:19] Kaleb Brasee

The same thing can be done with Java or any other language. I've heard of a large (1000's of employees) company using Oracle stored procedures for pretty much ALL of their business logic, period. The thought of writing this, not to mention maintaining and testing it, gives me a headache. The only use for Java and other languages there is for simple clients that just read and write to a huge set of stored procedures.


i went to a ruby user group, and on the second meeting, someone immediately showed me how to do tdd / unit testing in ruby. You won't find that at a .NET user group. any language can be abused, but the culture of ruby and java seem better. - fregas
Actually you will find it at some of them, such as Hudson Software Craftsmanship group (hudsonsc.com), which I've heard is made up of almost all .NET devs. - Kaleb Brasee
(1) I regularly attend alt.net oresund meetings, and we focus a lot on advanced tdd/bdd concepts. - Martin R-L
@fregas I would extremely disagree with your view, I find that it to actually be almost entirely nonfactual. For .NET developers that care both enough about their career and software development in general to attend user groups about .NET they would be ones interested in SOLID software development. - Chris Marisic
@Chris This isn't true in Fort Worth. At all... - J.R. Garcia
9
[+3] [2009-10-19 03:48:17] Ashley Henderson

I think changing to Java or some other platform because of a view that they "do it right" is risky. ie The grass is always greener. As someone with similar experiences, I am definitely sticking with .NET.

I'm tipping that, in many Java shops, the application of good design, testing and development approaches didn't just happen magically. It was probably initiated by an experienced architect or developer just like you (or me) who had the experience to be able to see beyond the current project.

It does appear that the Java culture in general seems to encourage a focus on good design and testing as well as coding. However there is no technical reason why these same focuses can't be applied to .NET projects.

Non technical reasons such as culture and deadlines definitely cause problems, however Java projects suffer from exactly the same problems. Cultural issues in Java shops are often at the other extreme can occur (i.e. "never use stored procedures" even when they are the best choice).

That's not to say making change is easy. But I think having good a relationship with management, demonstrating by example, and basic perseverance are probably the most important factors in helping to improve the situation.

From a career perspective, it is completely reasonable to leave a company that just doesn't value your experience or ability to see the bigger picture, regardless of the technologies used. There are of course many practical considerations (i.e. having another job to go to) but with some companies, if you feel this way, you're far better off moving on.


10
[+3] [2009-10-22 12:27:42] soru

If what you want to do is short-term contracting, you need to learn the buggiest and most unproductive tools in wide use, as the teams using those approaches will be the ones hiring short-term contractors to fix their problems.

On the other hand, maybe what you want is a long-term, high-commitment, job. Then switching languages while using the same design approach is probably less of an overhead than vice-versa. A shop that says 'you look like a good software engineer - knowing C#, you can pick up Java/Python in a month' is one you can see spending several years working for.


11
[+2] [2010-09-03 10:24:43] Martin R-L

Three shops in a row and six years of "Nhibernate, OOP, Design Patterns, Domain Driven Design, Test Driven Development, IoC, MVC" :-)

Welcome to Scandinavia (Malmö/København) ;-)


12
[+1] [2009-10-18 22:18:28] johnc

Unless you are coming in as the architect of the project you are on, I agree, there is very little use for technologies that are not accepted by the team, or are seen as unnecessary confusions.

That being said, use the technologies you want for your own projects, or start an open source project, that way you can get real experience on the tools you like, ready for when you get the opportunity to make these decisions.

And, rest assured, there are companies that use these technologies.


I have experience with these technologies and get to use them at the job i'm at. The problem is that I'm thinking long-term health for my career. - fregas
(1) "there are companies that use these technologies" -- and increasingly so. Yes, .NET shops tend to be sluggish adopters, waiting for techniques to be "blessed" by Microsoft: but with the arrival of MSTest, Entity Framework, Unity, ASP.NET MVC, etc., techniques like TDD, ORMs, IoC and MVC are becoming accepted by an increasing number of MS shops (subjective impression, no data) -- and not only with the MS implementations - itowlson
@ itowlson - "and not only with the MS implementations" - Very true, for example, we're using Castle MonoRail, LLBL and MBUnit, and love all 3 - johnc
13