66020 members! Sign up to stay informed.

Sponsored Links


Resources

.NET Research Library
Get .NET related white papers, case studies and webcasts

News News News Messages: 28 Messages: 28 Messages: 28 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

Ralf Westphal asks: should ObjectSpaces be orthogonal?

Posted by: Ted Neward on February 04, 2004 DIGG
In his weblog, Ralf Westphal asks the heretical question of whether striving for object persistence orthogonality--as ObjectSpaces tries to--is really a Good Thing after all. His reasoning? Watching what happened when developers tried to do the same with MTS and COM+.

From his blog: "I saw what happened to MTS and then COM+. Many developers did not understand, that designing classes to be run in an application server is different from designing classes to be run in a rich client (aka winforms client)."

Agree or disagree? I'll even go one step further--do we need O/R mapping technologies at all, or is this a Holy Grail that we'd be best off just abandoning?

Threaded replies

·  Ralf Westphal asks: should ObjectSpaces be orthogonal? by Ted Neward on Wed Feb 04 10:35:24 EST 2004
  ·  very chismoso by Rolf Tollerud on Wed Feb 04 14:10:51 EST 2004
    ·  very chismoso by Marlon Smith on Wed Feb 04 15:04:01 EST 2004
      ·  very chismoso by Rolf Tollerud on Wed Feb 04 16:08:03 EST 2004
    ·  very chismoso by McCorney Severin on Wed Feb 04 15:32:15 EST 2004
    ·  RFD by Igor Tkachev on Thu Feb 05 10:55:01 EST 2004
    ·  Object facade for ADO.NET by Erik Doernenburg on Fri Feb 06 05:01:44 EST 2004
  ·  Hibernate by Michael Starr on Wed Feb 04 23:28:52 EST 2004
    ·  generic database access by Rolf Tollerud on Thu Feb 05 06:49:29 EST 2004
      ·  generic database access by B K on Thu Feb 05 09:48:49 EST 2004
        ·  generic database access by Star Trooper on Thu Feb 05 10:07:02 EST 2004
          ·  generic database access by B K on Thu Feb 05 11:34:49 EST 2004
        ·  generic database access - lean and mean by Rolf Tollerud on Thu Feb 05 10:53:54 EST 2004
          ·  generic database access - lean and mean by B K on Fri Feb 06 11:25:50 EST 2004
            ·  Intranet, Extranet, Web Applications by Rolf Tollerud on Fri Feb 06 13:04:30 EST 2004
        ·  generic database access by Marlon Smith on Thu Feb 05 12:09:04 EST 2004
      ·  generic database access by Star Trooper on Thu Feb 05 10:05:47 EST 2004
      ·  generic database access by Star Trooper on Fri Feb 06 11:03:21 EST 2004
  ·  The Holy Grail is here today! by Robert van Poelgeest on Fri Feb 06 03:58:37 EST 2004
    ·  The Holy Grail has been here for a while... by Star Trooper on Fri Feb 06 11:02:08 EST 2004
      ·  The Holy Grail has been here for a while... by Marlon Smith on Fri Feb 06 11:36:24 EST 2004
    ·  Each can form his own private speculation by Rolf Tollerud on Fri Feb 06 16:42:56 EST 2004
      ·  Each can form his own private speculation by Star Trooper on Fri Feb 06 21:13:36 EST 2004
        ·  one time I was as innocent and naive as you! by Rolf Tollerud on Sat Feb 07 02:51:33 EST 2004
          ·  one time I was as innocent and naive as you! by Star Trooper on Sat Feb 07 05:27:17 EST 2004
            ·  to waist money like water by Rolf Tollerud on Sat Feb 07 07:22:23 EST 2004
              ·  to waist money like water by Star Trooper on Tue Feb 10 09:30:21 EST 2004
              ·  to waist money like water by Stephen Wink on Fri Mar 05 07:07:39 EST 2004
      ·  Business case for MDA/ORM tools by Martin Rosen-Lidholm on Fri Mar 05 05:00:44 EST 2004
  Message #109441 Post reply Post reply Post reply Go to top Go to top Go to top

very chismoso

Posted by: Rolf Tollerud on February 04, 2004 in response to Message #109409
What I would like to know is "what kind of database layer are the .NET guys using in reality? Stored procedures? The data classes in Microsoft Application Blocks for .NET? O/R? Homegrown?

Regards
Rolf Tollerud

  Message #109449 Post reply Post reply Post reply Go to top Go to top Go to top

very chismoso

Posted by: Marlon Smith on February 04, 2004 in response to Message #109441
We currently use stored procedures (bank standard) and I have also used O/R tools before with .Net applications (homegrown) while working for a software shop. The value we gained was not writing data access code for every database our customers wanted and better time to market for CRUD based apps.

  Message #109452 Post reply Post reply Post reply Go to top Go to top Go to top

very chismoso

Posted by: McCorney Severin on February 04, 2004 in response to Message #109441
I use a completely home grown O/R mapping lawyer. For a matter fo fact, I ported that same layer that I used in a major j2ee app that I worked on. Pretty much using the Data layer patterns that fowler listed in his book. QueryObject, DomainObjects, xml Metadata and reflection for generating objects.

-M

  Message #109459 Post reply Post reply Post reply Go to top Go to top Go to top

very chismoso

Posted by: Rolf Tollerud on February 04, 2004 in response to Message #109449
Marlon and Mackie,

I would be interesting to see your solutions, any possibility for a case study?

Did you try out some of,

LLBLGen, ORM.NET, TierDeveloper, Persistence.Net, Sisyphus,EntityBroker,Nolics.net, OS (ObjectSpaces)?

What was the rationale for making your own solution?

More questions,
What is MS Business Framework (MBF)?
Will MBF and OS come at no cost?
Will there be an OS provider for Oracle?
What about QPath queries in OS?

Regards
Rolf Tollerud

  Message #109508 Post reply Post reply Post reply Go to top Go to top Go to top

Hibernate

Posted by: Michael Starr on February 04, 2004 in response to Message #109409
I have used Hibernate on Java projects before and it works wonderfully. I think those guys have a really good handle on what makes a robust (and unobtrusive) ORM layer. I would love it if the ObjectSpaces implementation follows their lead.

  Message #109534 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access

Posted by: Rolf Tollerud on February 05, 2004 in response to Message #109508
What would be interesting is to se statistics,

O/R systems x %
Datasets y %
DAL generators z %
etc..

Myself, I balk when I see classes like "customersclass", "ordersclass" and so on. I like my system to be easily extensible by third party as well as allow other systems to access my database, in short - to be a good citizen.

Why can you not build up your queries like,

SqlQuery sql = New SqlQuery();
sql.AddCmd("select");
sql.AddCols("name", "zip");
sql.AddFromClause("customers");
sql.AddWhereClase("ID=1081");

or just,

SQlquery sql = New SQlquery();
sql.AddCmd ="select";
sql.AddCols="name, zip";
sql.AddFromClause="customers";
sql.AddWhereClase="ID=1081";

and then solve the mapping by adding a prefix to the table-names, like this
(assuming your prefix is "mir"),

cmd =sql.BuildSql();
cmd = Regex.Replace(cmd, "(\\w*\\.\\w*)|mir\\w*", new MatchEvaluator(map.realName));

In a separately compiled class you implement the method to switch the alias table and field-names to the real names.

The result command you can throw at anything that need an sql expression.

Regards
Rolf Tollerud

  Message #109558 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access

Posted by: B K on February 05, 2004 in response to Message #109534
We are using Microsoft Application Blocks for .NET in our company here.
I am of the opinion that most applications do not need the overhead of dataset and can make it work using datareaders

what do u think?

  Message #109566 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access

Posted by: Star Trooper on February 05, 2004 in response to Message #109534
No wonder you wont never ever master session management... just an advice, go and copy what hibernate does but in .NET. Then u may be able to learn something.

  Message #109567 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access

Posted by: Star Trooper on February 05, 2004 in response to Message #109558
mmm... what do u mean by "most applications"??

  Message #109580 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access - lean and mean

Posted by: Rolf Tollerud on February 05, 2004 in response to Message #109558
BK,
> "do not need the overhead of dataset and can make it work using datareaders"

Agree. In our current application all data access is in the Web Service and we use datareaders to do the XML-transformation, it is faster.

We have choosen not to use direct XML queries for various reasons, one for example that it only works with SQL Server. We keep to ANSI-SQL and concentrate upon the main databases, SQL Server, MySQl and Oracle.
In this way we also can handle dynamic sql-queries depending on user input.

We can handle the main databases. We can handle name-changes in tables and fields. There is no reason to use ObjectSpaces or any other O/R IMO.

Smaller is faster!

Regards
Rolf Tollerud

  Message #109583 Post reply Post reply Post reply Go to top Go to top Go to top

RFD

Posted by: Igor Tkachev on February 05, 2004 in response to Message #109441
I use stored procs and the following stuff to perform ORM:
http://sourceforge.net/projects/rsdn-data/
http://rfd.rsdn.ru.

  Message #109596 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access

Posted by: B K on February 05, 2004 in response to Message #109567
<Just a Software developer>mmm... what do u mean by "most applications"?? </Just a Software developer>

I should have said Most asp.net applications. It is due to the stateless nature of web applications you do not want to recreate dataset at evry load of the page.

  Message #109601 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access

Posted by: Marlon Smith on February 05, 2004 in response to Message #109558
I agree, we don't use datasets at all for CRUD, only for reports.

  Message #109711 Post reply Post reply Post reply Go to top Go to top Go to top

The Holy Grail is here today!

Posted by: Robert van Poelgeest on February 06, 2004 in response to Message #109409
I found that using a framework which has a persistence layer that is fully customizable cuts down development time for the complete project roughly in half. Greater acceleration can be achieved when combining such a persistence layer with a business layer that uses a UML model as metadata. Using lazy load as default but being able to use different load schema?s (which specifies what ?related? data needs to be retrieved at the same time) in different Use Cases gives excellent performance. And since web and windows applications have indeed different characteristics your persistence layer must be flexible enough to be configured to support both.

  Message #109720 Post reply Post reply Post reply Go to top Go to top Go to top

Object facade for ADO.NET

Posted by: Erik Doernenburg on February 06, 2004 in response to Message #109441
About a year ago we started the development of an 'occasionally-connected' client application; an application that manipulates information stored in a database but does so without being connected to it all the time. DataSets (in the ADO.NET sense) seemed to be ideally suited to this scenario but we quickly found that they were quite low-level and not very object-oriented.

So, we set out to develop an object wrapper around ADO.NET and a dynamic SQL generator to manage persistence. The result is now available as open source in the form of the Neo project (links below). In hindsight it ended up looking a lot like SDO, which is IBM and BEA's new take on data programming.

http://neo.codehaus.org
http://dev2dev.bea.com/technologies/commonj/sdo/index.jsp

  Message #109763 Post reply Post reply Post reply Go to top Go to top Go to top

The Holy Grail has been here for a while...

Posted by: Star Trooper on February 06, 2004 in response to Message #109711
just have a look at scaffolds, chordiant, metamor, etc. I can understand for you MS guys this may seem the holy grail but its been around for a while...

  Message #109764 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access

Posted by: Star Trooper on February 06, 2004 in response to Message #109534
No wonder you wont never ever master session management... just an advice, go and copy what hibernate does but in .NET. Then u may be able to learn something.

  Message #109777 Post reply Post reply Post reply Go to top Go to top Go to top

generic database access - lean and mean

Posted by: B K on February 06, 2004 in response to Message #109580
<Rolf>Agree. In our current application all data access is in the Web Service and we use datareaders to do the XML-transformation, it is faster.
</Rolf>

Why would you use a webservice for data access in intranet application? (I am assuming you were talking about an intranet app)

  Message #109779 Post reply Post reply Post reply Go to top Go to top Go to top

The Holy Grail has been here for a while...

Posted by: Marlon Smith on February 06, 2004 in response to Message #109763
>I can understand for you MS guys this may seem the holy grail but its been around for a while...

O/R is not by ant measure a "holy grail", just useful.

  Message #109795 Post reply Post reply Post reply Go to top Go to top Go to top

Intranet, Extranet, Web Applications

Posted by: Rolf Tollerud on February 06, 2004 in response to Message #109777
BK,

There are almost no pure intranet applications anymore, rather extranets. The right word is more "Enterprise business applications" as opposite to ordinary sites.

The problem is that the terms are so floating. In my book "Web application" is a real application- say a CRM system, not a common advertising or promotion "website".
But I notice that many people use the word "Web application" for in principle anything.

I am trying to set up a test, comparing O/R mapping to my handcrafted code. The problem is to choose the right tool, there are more than 30 out there!
http://www.theserverside.com/news/thread.jsp?thread_id=23762#109679

Regards
Rolf Tollerud

  Message #109825 Post reply Post reply Post reply Go to top Go to top Go to top

Each can form his own private speculation

Posted by: Rolf Tollerud on February 06, 2004 in response to Message #109711
After a lot of research on Google I finally found 3 products to choose between, Entity Broker, Pragmatier and TierDeveloper. Having nothing to go upon I arbitrary picked TierDeveloper from AlachiSoft, installed and generated the Northwind web sample project

Examination revealed that each table, in addition to the usual - in the case of customers, customers.aspx, customers.aspx.cs, had 3 more files attached to it, CustomersHelper.cs (17K), Customers.cs (31K) and CustomersInfo.cs (3K).

That is compared to my old app that had 3 files for the generic datalayer, + one codebehind file for every aspx = 28 files, I now had 97 files (3 X as much), 52 for the app and 45 for the datalayer.

Performance was down by 50% and the whole application more difficult to test and maintain. I can no longer have dynamically generated sql depending on user input. If I want to make small changes in the database structure I have to regenerate all. The really big problem though is when you have complicated joins and transactions in some parts that you have to hand code - after you can kiss goodby to try decrypt the application or auto-generate.

*On the pro side you gain some in productivity*.

So what is the moral? Industrial mass production can never be the same quality as careful handcraft. The time you save in the beginning you pay for later. Small, lean and faster is always better than big, fat and slow. It can suffice for quick and dirty contract jobs - the clients are used to be cheated anyway - never for a product.

Regards
Rolf Tollerud

  Message #109858 Post reply Post reply Post reply Go to top Go to top Go to top

Each can form his own private speculation

Posted by: Star Trooper on February 06, 2004 in response to Message #109825
"It can suffice for quick and dirty contract jobs - the clients are used to be cheated anyway - never for a product. " ---> I for sure wont recommend my company to do business with you. Just read what you write.

  Message #109882 Post reply Post reply Post reply Go to top Go to top Go to top

one time I was as innocent and naive as you!

Posted by: Rolf Tollerud on February 07, 2004 in response to Message #109858
(hmm, what happened?)

When you grow older you will realize that contract programming is just one step away from high way robbery, and that "contract programmer" is about equal to "horse thief" or "used car dealer".

Regards
Rolf Tollerud

  Message #109889 Post reply Post reply Post reply Go to top Go to top Go to top

one time I was as innocent and naive as you!

Posted by: Star Trooper on February 07, 2004 in response to Message #109882
"When you grow older you will realize that contract programming is just one step away from high way robbery, and that "contract programmer" is about equal to "horse thief" or "used car dealer". "---> Being a former MS consultant, I know what you mean. That's why I quit. You can quit too.

  Message #109897 Post reply Post reply Post reply Go to top Go to top Go to top

to waist money like water

Posted by: Rolf Tollerud on February 07, 2004 in response to Message #109889
And how many millions and billions do you think the Java zealots have destroyed with all large scale over-architected J2EE projects (70-80% project failure rate according to Gartner?).
http://www.zdnet.com.au/news/business/0,39023166,20269968,00.htm

And then again even if they against everybody?s expectation succeed to deploy the project it is down one day in seven.

But the Java community is very good at squirming excuses. At least they are innovative in one area!

Regards
Rolf Tollerud

  Message #110220 Post reply Post reply Post reply Go to top Go to top Go to top

to waist money like water

Posted by: Star Trooper on February 10, 2004 in response to Message #109897
is that your lame excuse???

hahahahahahahahaha...

"When you grow older you will realize that contract programming is just one step away from high way robbery, and that "contract programmer" is about equal to "horse thief" or "used car dealer". "---> Being a former MS consultant, I know what you mean. That's why I quit. You can quit too.

never is late to repent my dear ChingadorDetUmAdre!!!

  Message #113143 Post reply Post reply Post reply Go to top Go to top Go to top

Business case for MDA/ORM tools

Posted by: Martin Rosen-Lidholm on March 05, 2004 in response to Message #109825
Business case for MDA/ORM tools

Rolf, I have the greatest respect for your benchmarking of TierDeveloper vs. Homegrown.

However there are other benchmarks out there, e.g. http://www.middleware-company.com/casestudy/mda.pdf.

My decision for a fat C# WinForm + SQL Server DB (2-tier) multi-user solution was ECO from Borland (f.k.a. Bold from BoldSoft).

Still haven?t experienced all the pitfalls and having to live with vendor lock-in and black box dependence, I?d say that you can cut *a lot* of implementation hours if you have the same architecture as us and (this is very important) very complex business rules.

If the latter isn?t fulfilled (i.e. a simple CRUD scenario) I would go the ADO.NET route, but Table Module (Fowler) and complex business rules don?t play well together IMHO.

// Martin R-L

  Message #113151 Post reply Post reply Post reply Go to top Go to top Go to top

to waist money like water

Posted by: Stephen Wink on March 05, 2004 in response to Message #109897
> And how many millions and billions do you think the Java zealots have destroyed with all large scale over-architected J2EE projects (70-80% project failure rate according to Gartner?).
> http://www.zdnet.com.au/news/business/0,39023166,20269968,00.htm
...
> Regards
> Rolf Tollerud

I read that article completely, did you? Heres a couple of quotes for you:
"To date, around 70 percent of initial Java implementations have been unsuccessful, according to new research from Gartner Group. "

"However, Microsoft shouldn't draw any comfort from those figures as it seeks to promote its .NET technology strategy either. In all likelihood, the failure rate for early implementations of .NET systems will be similar, Driver said."

Now, you wouldn't be backing up your arguments with selective evidence would you?

 
New content on TheServerSide.NETNew content on TheServerSide.NETNew content on TheServerSide.NET

DSLs and language interop

Language "mashups" will become more prominent, and developers will become polyglots, one programmer suggests.

VS 2008 Resources

SearchWinDevelopment.com offers an introduction to the language, performance, testing and data management improvements in VS 2008.

VB code downloads home

VBCode.com code snippets cover all aspects of application development, from data binding to security to the user interface.

XAML Learning Guide

Get up to date on XAML best practices with a variety of articles, tutorials and webcasts. [SearchWinDevelopment.com]

Company uses VSTS DB edition to tame workflow

One team's experience with the VSTS DB edition suggests that it can improve workflow for dev teams. It also enhanced Agile efforts. (June 24, Article)

Book: Intro to DSL Tools

Microsoft has begun to include DSL tools in the VSTS kit. A new book by Steve Cook and other VSTS team members helps set the stage. (June 24, Article)

I See the Silverlight Shining!

Cartoon: Be it ever so humble there is no place like your home after you get a Microsoft Home Server . (June 18, Cartoon)

A look at .NET 3.5

Microsoft's Thom Robbins says new technology to highlight in NET 3.5 includes AJAX, LINQ for both C# and VB, as well as tooling enhancements intended to ease the task of building WPF, WF and WCF apps. (June 29, Podcast)

Venkat Subramaniam on AJAX

Venkat Subramaniam discusses AJAX bottlenecks, the tenets of Agile development and more. He spoke at the Ajax Experience. (June 25, Tech Talk)

Building a Claims-Based Security Model in WCF - Part 2

In the second of a two-part series, Michele Leroux Bustamente discusses design decisions related to the claims-based security model. Read the story and walk through the process for creating a set of claims-based utilities to encapsulate claims authorization at the service tier. (May 24, Article)

Introducing the Entity Framework

Understanding why the Entity Framework exists and learning where it can fit into your projects can get you prepared for the eventual release early next year. (May 10, Article)

WCF Security Learning Guide

Resource: This learning guide gives you quick access to useful links on Windows Communication Foundation security information. (April 24, Article)

Brad Abrams: Patterns for successful ASP.NET AJAX development

TSS.NET's Jack Vaughan spoke recently spoke with Microsoft's Brad Abrams to find out what he is seeing in the field and what the chefs in Redmond are cooking. Along the way he discusses patterns of AJAX frameworks. (April 11, Article)

Building a Claims-Based Security Model in WCF

In a two-part series, Michele Leroux Bustamente explains how claims-based security is supported by WCF, and how you can implement a claims-based security model for your services. (March 29, Article)

Authoring workflow using XAML

Windows Workflow Foundation is a new technology that many developers will need to get their heads around. In a brief excerpt adapted from Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#, K.Scott Allen considers aspects of workflow definition. (March 22, Chapter Excerpt)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map