Miha Markic [MVP C#] wrote:
> "Rafal Gwizdala" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>Why do you prefer not to use ORM tools, and what do you use instead (what
>>tools/methods do you use for creating data access layer and business logic
>>layer)?
>
> For now, I am an ado.net fan. However, I use CodeSmith to create much of the
> code necessary.
> http://www.ericjsmith.net/codesmith/
> And I am pretty sure that no ORM can beat this combination - both in speed
> and flexibility.
Bite me

You bet I can beat that combination. LLBLGen Pro's code generator
engine is more flexible and has a powerful set of SQL engines to talk
to. Where's that in your codesmith setup?
> Note, that you can create an ORM layer with CodeSmith also - actually, the
> code would be better than any ORM layer out there (it really depends on your
> templates used for code generation) since you have complete control and
> database metadata handy.
yeah right

. Writing an O/R mapper layer is very hard work, and
you're going to generate that code with a couple of templates? I don't
think so. For starters: you lack the dynamic query engine which produces
SQL on the fly using meta-data.
>> My experience is that good ORM helps produce smaller,
>>cleaner code, and it is much easier to port the application to other RDBMS
>>or to reuse its components. It also helps in creating clear, layered
>>system architectures.
>
> IMO it has nothing to do with tiers. ado.net is perfectly suitable for
> n-tier aplications.
> But the bigest disadvantage of an ORM is flexibility IMO - you really can't
> match pure ado.net.
ADO.NET is just a helper-layer to work with an RDBMS. And it's very low
level. In 99% of the occasions you can perfectly work with a layer
produced by an O/R mapper. A good O/R mapper isn't giving in to
flexibility, on the contrary: the O/R mapper lets you focus on what's
really important instead of writing plumbing code.
And because you're using codesmith, please tell me where you get your
hands dirty to write low level ado.net to squeese out the flexibility
you apparently need? I don't see it, as you use code generation without
a meta-data consuming sql engine. If that's not giving up on flexibility
I don't know what is
>>Simple example: with ORM you get unified way of accessing your
>>application's data, so you can build reusable GUI components that closely
>>cooperate with the ORM tool.
> Again, all of this can be achieved using ado.net.
You can? Hmm. Ever tried to write generic code which targets sqlserver
2000 and oracle ? If you have, you'll know that if you just have
ADO.NET, it's a tough job, or you have to write hundreds and hundreds of
sqlserver procedures and hundreds and hundreds of oracle procedures.
Also a lot of work.
Tell me, is that flexibility of yours really a gain?
FB
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET:
http://www.llblgen.com
My .NET blog:
http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------