Greetings:
I've got a developer that I'm showing the CSLA framework and the project he is gonna do first is a very small 1-2 user application that will never require an application server. The dataportal is something I don't understand very well - and this developer is entirely new to the topic - so we were wondering if for a tiny application you could just ignore it.
When a root object loads children, and grandchildren can calls be made directly to constructors that make direct calls to fetch, save, update, delete - completely ignoring DataPortal methods? Is there a downside to doing that in this situtation.
I wouldn't mind seeing a version of CSLA that is built sans DataPortal yet keeps all of the other functionality. It's a brilliant bit of code, but overkill for applications that we are writing - they just have no chance of ever getting big enough to need application servers.
Thoughts?
I think all of the solutions we'd offer (and I just erased mine) come from the assumption that the DP is a great thing with no real performance cost, so why would you want to abandon it.
Thinking in those terms, I think I'd challenge the beginning premise of your question. If your application is really tiny the question probably should be more of whether you need CSLA at all. If you think you'd benefit from CSLA then I think it is very unwise to start tinkering with the implementation of CSLA without specific reasons.
Some have argued that the reflection DataPortal_XYZ paradigm doesn't "feel right" and the data access part of CSLA should work like <insert your favorite solution here>.
I'll share that I have just spent a couple months (not solid) taking a very serious look at CSLA vs. some home-grown alternatives that solve some application development problems in a superior way, but at the end of the day I've decided there's tremendous value in using a more widely used framework. But the only way that's really valuable is to use it in common ways.
So, in summary, I'd say that if you've decided to use CSLA on this project then part of the value of that comes from doing so in standard ways, especially when there's no real tangible reason for doing otherwise.
MadGerbil:the project he is gonna do first is a very small 1-2 user application that will never require an application server.
Never say never, we never know what the future will toss our way :)
If _your_ current project will never see the light of day to grow beyond 1 or 2 users then I say go ahead, use CSLA as-is and use it to learn. Then, when the time comes, you'll have all you need to build a _bigger_ application based on CSLA - or at the very least you'll be in a better position to make the decision - go with CSLA or not to go with CSLA.
Hope this helps. BTW, I agree with DansDream post.
Copyright (c) Marimer LLC