Oren Eini

CEO of RavenDB

a NoSQL Open Source Document Database

Get in touch with me:

oren@ravendb.net +972 52-548-6969

Posts: 7,640
|
Comments: 51,256
Privacy Policy · Terms
filter by tags archive

On RYO vs. NIH

time to read 7 min | 1362 words

Bil Simser has stepped into the complexity debate with this post.

This is actually on the end of Bil's post, but it deserve a special mention:

As Jeremy put it, the P&P guys are a good thing as they're out there getting the Agile word out to many more people that we can.

In that, I haven't done justice to the P&P team. Introducing Agile methodologies and best practices is something that I am very passionate about, and I failed to give them their due credit about their efforts in this direction.

Oren's defense is around the fact that he (and Jeremy) follow the guideline of evolving a framework from your application needs, not building one (like what the P&P guys have done). Okay, that's fair but at some point you have to stop building things over and over again. So when does your own work become a framework that you reuse?

After you have built one application like this, you can extract the relevant parts into a "framework", although I am not sure that I like the term. The main difference being, again, that this is something that is driven by a developer seeking to make life eaiser, not by BDUF.

The end result is often a purpose fit framework that is very easy to work with, and doesn't require years of study.

Sure, you can put together the basic needs of an IoC in half a day (half a day Bil time, 40 minutes Oren time)

Not really, the basics are deceptively simple, but then you are going to hit a lot of issues with dependencies cycles, life time issues, etc.

I would argue that if you took something like StructureMap and evolved it to handle scenarios that you're not dealing with today, that you would be starting to build your own implementation of EntLib.

Not really, I would tend to use best-of-breed stuff that I would have available, it would cut the stuff that I would need to build by 60% at least. But I would not build the EntLib by any means, I may have components that have similar functionality, but in general, it would be a set of services, not a framework. Jeff Brown had a good post about the difference between the two.

EntLib and CAB do include everything and the kitchen sink and you do need to get past the learning curve, but in the end it's a good collection of tools that you can have in your toolbox.

The first part and last parts of the sentence conflict each other, fairly badly. If they are so complex, I would get much better ROI than rolling my own, or (more likely) reusing stuff already built that isn't so complex.

Unfortunately it's not something I could introduce at a conference or User Group session and describe the entire stack in an hour, so I tend to avoid showing off applications and concepts using it as it just turns into a discussion of what [SmartPart] means instead of the main goal like describing MVP which I can do with my own code.

Don't you think that this is an issue when you can't get the basic concepts of a framework in an hour without drowning in the details? Apples to oranges, but I can show a MonoRail application that has nothing but the basics, and talk about that and the concepts underlying that. If the technology is obstructing the end goal (creating maintianable applications), how is it useful?

Perhaps but then if I choose the 3rd party elements I want and wire them together to suit my needs, what kind of Frankenstein have I built in the progress?

Well, considerring that Frankenstein was a very smart doctor, probably a good one. I think you meant something else, and I am getting tired of answerring that statement, frankly. Using several components together is neither cobbling nor frankenseining nor hobbling a solution, it is using the best attributes of each to achieve a cohesive whole. The end result of a highly componentized architecture is... good design.

I don't think Oren or Jeremy are saying the P&P guys did a bad job on in, they just choose to evolve their own solutions using a minimalist approach.

This is were all the trouble start. I am explicitly not saying that the P&P guys did a bad job, I am saying that I don't believe that the direction they are pushing is the right one.

Like I mentioned with NHibernate, I needed to deploy log4net as it needs it, even if I didn't turn on that feature. At least with EntLib, if I'm not using security for example I don't need to deploy the security module.

Bitchy: Feel free to try to deploy P&P's DAAB without Microsoft.Practices.EnterpriseLibrary.Common, when you are successful, then you can complain that NH has a dependecies.

Seriously, NHibernate.dll has dependencies on several assemblies. And it follows separation of assemblies, so if, for instance, you don't need the 2nd level cache, you don't need the MemCached assemblies deployed.

Eventually I could have a really ugly monster on my hands with copies of Castle, StructureMap, CAB, EntLib, NHibernate, log4net, and who knows what else all living (hopefully) together in happy existence. I don't want that.

You get that with everything that you use, if it bothers you, use ILMerge to make this a single DLL, and then forget about it. Disk space is cheap, and it is really not an issue. About the previous point as well, you can merge log4net into NHibernate if you so like, and get rid of the extra dependency.

Could I get the same functionality from the other alteratives? For sure, however I would probably be writing more code to wire things together than I would with CAB.

I seriously doubt it. A good collection of tools would enable you to write clean, intent expressive code. I don't think that you would end up with more code, if anything, the lack of designer generated code would reduce the amount of code that you would have to deal with.

time to read 3 min | 412 words

Patrick Cauldwell has a post about a set of guiding principal, which I mostly agree on, except:

  • Buy, not build
    • Take full advantage of the platform, even if it only solves the 80% case
      • every line of code we don't have to write and maintain saves us time and money
    • Don't write a single line of code you don't have to
    • Take full advantage of .NET 3.0, SQL 2005, Windows 2003 Server, plan for- and test on Longhorn

    There is a couple of things here that is missing, that is business need and evaluating fitness to do the job. I am pretty sure that Patrick didn't mean to sound this way (by the rest of the post, he & I could argue for a few decades on the fine details, but I mostly agree), but this sound like an approach for a tech driven disaster to me.

    I have seen technological solutions crumble under their own wieght, because their fitness to the business problem was never really considered. "It is MyNewThing, of course it can handle this easily, why, it can handle ten times this load." - But you forgot that scalability != perfromance. The end result was a failed project and a poisioned relationship with a customer.

    Perhaps the only thing that I would add to Patrick's statement is: "When it makes sense to the business problem at hand..."

     

    time to read 2 min | 354 words

    Several times recently I had to created what is basically random assoications between two sets of tables. The problem is usually trying to get some data for the UI. Here is what I came up with:

    update Policies

    set Status = (select top 1 Id from

          PolicyStatuses where Policies.Id != PolicyStatuses .Id

          order by newid())

    The only interesting part is the where clause, since it forces SQL Server to evaluate the statement on a row by row basis. This has horrible performance, by the way.

    time to read 1 min | 178 words

    From the Hibernate Blog:

    Well, it is nice for us, but it's not nice for the guy who comes along next! He's one of those shiny-eyed (and slightly scary) Ruby fanatics. Or maybe he's a VB guy (senior citizens matter too). Or maybe its 5000 years from now: Java and Ruby have both vanished (of course, VB is going strong) and a team of archeaologists from Ganymede are trying to piece together something about our forgotten civilization from what's left of your customer database, using the recently released Perl 6.0. Wouldn't it be easier for them if your database just had strings and numbers in it?

    You really have to read the whole thing to get the spirit of the thing. ROTFL.

    Oh, and the message isn't that bad either, I had similar discussion with Ted Neward on the OR/M Smackdown.

    time to read 15 min | 2978 words

    I don't get a lot of chances to work on VB.Net, but when I do, it is almost always because someone has a problem with my code (or their code), and I need to look at it. The problem is that I like the syntax (sort of booish :-) ), but I keep trying to think about it like C#, so I keep getting wierd compiler errors. I am probably the only one who learns the VB syntax from opening reflector and switching to the VB.Net view.

    Anyway, I was asked how you can mock event registration with Rhino Mocks in VB.Net, and here is the answer:

    <TestFixture()> _

    Public Class RhinoMocks_InVB

           <Test()> _

           Public Sub UsingEvents()

                  Dim mocks As New MockRepository()

                  Dim lv As ILoginView = mocks.CreateMock(Of ILoginView)()

     

                  Using mocks.Record

                         AddHandler lv.Load, Nothing

                         LastCall.IgnoreArguments()

                  End Using

     

                  Using mocks.Playback

                         Dim temp As New LoginPresenter(lv)

                  End Using

     

           End Sub

    End Class

    Where the objects we are test are:

    Public Interface ILoginView

           Event Load As EventHandler

    End Interface

     

    Public Class LoginPresenter

           Public Sub New(ByVal view As ILoginView)

                  AddHandler view.Load, AddressOf OnLoad

           End Sub

     

           Public Sub OnLoad(ByVal sender As Object, ByVal e As EventArgs)

     

           End Sub

    End Class

    time to read 4 min | 692 words

    I just responded to a message on the Israeli .NET dev forum, where the poster asked how they can gain experiance when all the jobs require experience. The poster assumed that in order to contribute to an open source project, he would need experience as well.

    Personal fact: My professional (commercial/getting-paid-to-do-this) experience in programming: 1 year, 5 months, 1 week. Talking from a head hunter point of view, I am not even rated for a beginner's job.

    Well, consider this an open invitation for anyone that can pick up an if statement, to contribute to the following open source projects.

    • NHibernate
    • Castle Active Record
    • Castle MonoRail
    • Castle Windsor
    • Rhino Mocks
    • Rhino Commons
    • Rhino Igloo
    • NHibernate Query Analyzer
    • NHibernate Query Generator
    • Linq for NHibernate

    I don't care about grades or time in the industry, I would only care about the contributions that you can make. Get the source, and see if you can make things better. (Just to clarify, this option is opened for experienced developers as well)

    What do you get from it?

    • Warm fuzzy feeling :-)
    • More work
    • The chance to work with some really smart people on really fun projoects
    • Experience that you couldn't get anywhere else.

    How you can help?

    You can talk to the development teams here:

    • NHibernate-dev mailing list: nhibernate-development AT lists.sourceforge.net
    • Castle-dev mailing list: castle-project-devel AT googlegroups.com
    • Rhino Tools-dev mailing list: rhino-tools-dev AT googlegroups.com

    NHibernate source:

    svn co https://svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate

    Castle source:

    svn co https://svn.castleproject.org/svn/castle/trunk

    Rhino Tools source:

    svn co https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk

     

    time to read 2 min | 254 words

    As long as I am talking about reducing pain, here is a sample from a very secret project that I am woring on. I have a lot of parameters for the build script, and it got to be a PITA to try to manage them manually. There are several kinds of builds that I can do here, test, production, DB rebuilds, deploy, etc.

    This quick (and very dirty) solution took about an hour of coding to build properly, and I just added some minor details after the intial build, enough to make it even more useful.

    It is a build parameters UI for MSBuild, which basically display all the PropertyGroup elements, and apply simple heuristics for trying to figure out what the values are. For instnace, it can discover boolean values (and display check boxes), and clicking on the "..." buttons will display an Open File, Browse Folder, or Connection String dialogs, as appropriate.

    As I said, it took about an hour (I wanted to leave it to my team-mates when I was at DevTeach), and it paid back in time, effort and sheer pleasure many times since. 

    If you are a developr and you have some pain points, fix them, it will be well worth it.

    (Yes, Roy, I know that Final Builder has a prettier interface :-) )

    BuildEditor.png

     

    FUTURE POSTS

    1. 15+ years of working with coding agents - 3 days from now
    2. Putting Claude up against our test suite - 5 days from now
    3. The GPU Is the New Bangalore - 7 days from now
    4. Learning to code, 1990s vs 2026 - 11 days from now

    There are posts all the way to May 05, 2026

    RECENT SERIES

    1. API Design (10):
      29 Jan 2026 - Don't try to guess
    2. Recording (20):
      05 Dec 2025 - Build AI that understands your business
    3. Webinar (8):
      16 Sep 2025 - Building AI Agents in RavenDB
    4. RavenDB 7.1 (7):
      11 Jul 2025 - The Gen AI release
    5. Production postmorterm (2):
      11 Jun 2025 - The rookie server's untimely promotion
    View all series

    Syndication

    Main feed ... ...
    Comments feed   ... ...