Beginner questions

Beginner questions

Old forum URL: forums.lhotka.net/forums/t/8662.aspx


vba-dev posted on Monday, March 15, 2010

Hello all,

I realize I'm hopelessly behind the times...and I have a few questions about the framework.

I'm using VS 2005 with .NET 2.0, doing strictly Windows Forms applications in VB.NET.

What with the bewildering array of architectural styles out there, I decided to focus on one. Since I had a copy of the Apress version of Visual Basic .NET Business Objects on the shelf, which I picked up some time back at a half-price bookstore, and since I have some idle time between projects, I decided that CSLA was the framework I'd study. Accordingly, I set forth to study this book in detail and learn CSLA and distributed object application design.

So far, it's great. I come from a strong VB6, VBA, COM background and have only been working with .NET technologies for around 3 years. I never had the opportunity to study Rocky's VB6 CSLA work, but after having developed a particular "distributed" style of architecting applications over the years, I can certainly appreciate the idea of having had a reusable framework upon which to build these legacy applications. It's a ton of work to build one, and it took years to develop a style (not a framework) which I could copy/paste/adapt for new projects.

At any rate, I've studied the book through Chapter 3 and am now at a point where I have some questions.

Chapter 4 leads the reader through building the CSLA framework. I wonder, though...what value, other than becoming familiar with the techniques used to build the framework, is there in going through the motions of building one. Aren't the necessary .dll's part of the downloadable framework? In other words...if one understands the design and learns how to interact with the framework, can I safely skip the actual building of a CSLA project?

Perhaps a more important question: Am I really going to benefit enough from studying this older book? I'm not yet ready to spring for a newer book unless my evaluation of CSLA proves to be one which I intend to embrace.

I've used the limited form of object orientation in VB for years, but am still behind the curve on object orientation as implemented in VB.NET. I am in full agreement with Rocky, as stated in the book, that a relational model is not the same as an object model, and should be approached differently. I've been modelling class modules for years after the relational model presented by the schema of the backend. Exactly how to approach class design from an object model approach eludes me.

To illustrate how far behind the curve I am - I only recently discovered that one could relate classes in the Class Designer not only through inheritance and implementation. I saw how one might create a class which represents the junction of a parent/child relationship, creating fjunction fields of other Types (objects), rather than the "old" way - creating junction fields which contain foreign key id's, as in a relational model.

Any tips on class design would be greatly appreciated...even those you might consider very basic. One basic tip might just prove to be a "see the light" moment for me.

How different is the CSLA .NET version 3.0 from the version found in my book? Is it different enough that I would be better served abandoning this book (and framework version) for a more recent one? Naturally, I assume, one would, when beginning a real project, use a downloaded framework, as opposed to the one I would build along with Chapter 4 and beyond.

If I continue building a framework, as guided by the book, will I gain more insight into good .NET class design?

Thanks a lot for any discussion on the above points.

Jeff

halcwb replied on Monday, March 15, 2010

Jeff,

I am in a similar situation, I started using the framework back in VB 6.0 times. However, after the first dot net version I stopped coding for a while. Now I am back at this game and find myself faced by a considerable knowledge gap. However, I decided to switch to C# and relearn the CSLA framework.

So, to give you my quick opinion. If you want to take advantage of best practices in object oriented programming and software development, yes you need to struggle through the entire book. Not just reading it but coding along. I would not recommend to hard code the complete framework by hand from the book. Instead download the frame work en look hard at all the examples while trying to implement your own project. Using the CSLA without knowledge of the inner works seems hard to me.

Since version 2.0 the framework has adopted some exciting new capabilities like Linq to SQL use of lambda expressions, and implementation of examples using MVC frameworks. I myself try to set a project using CSLA along with MVC and Ext JS. A powerful, but complex mix. I guess I will be posting a lot of questions.

Hope this will be of help.

Casper

vba-dev replied on Monday, March 15, 2010

Casper, Yes, it is helpful. I appreciate the feedback. I was leaning towards actually coding the full monty from the chapters, and probably will. I get tunnel vision staring at printed code for too long heh heh. It would likely be more helpful to me to actually type it all. One hitch I've encounted so far...maybe someone can help. My TestServer.TestService works - I can talk to it....but I can't get a wsdl document in my browser. I get the "The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904." error. I've downloaded the tool, tried to use it...but I'm not an IIS guy...I don't understand the syntax. The command: cscript metaacl.vbs IIS://LOCALHOST/W3SVC mydomain\mydomainaccount RW I understand 'mydomain' to mean the machine name. The part after the following backslash I don't get. I have no idea how to find out what mydomainaccount is. I'm using XP Pro SP 3.

vba-dev replied on Monday, March 15, 2010

Eh...sorry about the formatting, let's try this:

Casper,

Yes, it is helpful. I appreciate the feedback. I was leaning towards actually coding the full monty from the chapters, and probably will. I get tunnel vision staring at printed code for too long heh heh. It would likely be more helpful to me to actually type it all.

One hitch I've encounted so far...maybe someone can help.

My TestServer.TestService works - I can talk to it....but I can't get a wsdl document in my browser. I get the "The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904." error.

I've downloaded the tool, tried to use it...but I'm not an IIS guy...I don't understand the syntax.

The command:
cscript metaacl.vbs IIS://LOCALHOST/W3SVC mydomain\mydomainaccount RW I understand 'mydomain' to mean the machine name. The part after the following backslash I don't get. I have no idea how to find out what mydomainaccount is. I'm using XP Pro SP 3.

Thanks

vba-dev replied on Monday, March 15, 2010

Also, can you tell me what the "Verify Answer" button is for, exactly? Thanks again.

ajj3085 replied on Tuesday, March 16, 2010

If someone (or you) posts what turns out to be the answer to your original question, click Verify Post.  That way someone who comes across your post in the future can read the question and quickly find the answer, because it will be surrounded by a green border and appear immediately after your post.  Suggested answers will be framed in yellow.

vschaak replied on Tuesday, March 16, 2010

Hi Jeff,

nice to read that not only OOP-professionals from the bottom up start to learn the FW! My heritage is quite similar to yours and I started to build my first CSLA-app about 3 months ago. Proud to say it'll be shipped in a few days.

What helped me very much as a first step (long before CSLA come into play for me) was reading and working with 'Doing objects in VB 2005' by Deborah Kurata. While her approach is much more simplified (no really mobile objects there), it helped me to dive into a framework at all. By far not as sophisticated as CSLA, but a good entry for a 'no OOP guy'. Somehow I found CSLA (I guess there was a link to Rocky's blog at Kurata's Blog) and bought the 2005 version of his book. I started reading and must admit that I more or less quit after a time. Learning curve was quite high and time to short. Form a backward view to me it was a mistake to try to understand all aspects of how the FW was implemented immidiatly and at once.

The breakthrough (in usind the FW, not understanding it's implementation) for me was the Core-video series. I can't recommend it enough. It clearly and simply shows how to USE CSLA. OK it's samples are in C#, but one should get used to at least read all those ;{;}; stuff, since a lot , not only CSLA samples are in C#.

Now, from a CSLA-users perspective I dive into the FW's implementation from time to time, always having in mind that I want to USE it, not rebuilt. And in between the book has it's permanent place on my desk, since there are a lot of things to recapture. And I use both, the 2005 and the 2008 books. The 2005 one, because many samples are somehow better to understand without knowledge of WCF, Linq, WPF and other technologies, but the 2008 one's full of new stuff that's relevant, such as child-handling in the DP, private backing fields, just to name my favorites ;-).

Phew, I hope you'll find my short personal history of getting closer to CSLA helpful!?

Greetings from germany

Volker

vba-dev replied on Wednesday, March 17, 2010

 

Volker,

Vielen Dank and greetings from Texas. I appreciate your discussion and enjoyed reading it. I don't many other developers...one, to be exact. And I've been developing business applications since 1997 heh heh. I have no idea how I got this far knowing only one other.

Yes, I figure that purchasing a book which is more recent would benefit me, but I wanted to avoid spending the $40-60 until I'm sure that a particular technology described in that book is worth the purchase. Since I only paid $8 for this book, I guess it's well worth taking the time to evaluate CSLA and Mr. Lhotka's ideas for distributed objects. Passing objects around is something I've done for years, but only within an application or project. It is interesting to see how the capabilities of VB.NET allow for this. Of course, I'd practiced such things a couple of years ago at a Microsoft class, but now it's time to begin applying my training, if I'm ever going to build a house.

Thanks also for the tip on the video series. I was not aware there was one. I do hate C#, though. Yes, half the world seems to have gone to it and, yes, many samples are in C#...but really...seriously...if the compiler can detect a curly brace, surely it can detect if one isn't there, cluttering up the place.

Take it one step further and you've got VB. Ah, well.

Thanks again, Volker. I do value this sort of information von meine Kollegen.

 

 

ajj3085 replied on Tuesday, March 16, 2010

Well, if possible, I would try to move to VS2008.  VS2010 is coming out any day now, and with it comes .Net 4.  The only real difference is what .Net includes as an API, the syntax is largely the same, and there are things (like Generics, Linq, etc) that are immesely helpful to have, and might as well start on a version that provides those things.  For example, generic collections are a huge improvement over things like the ArrayList, to the point where there's almost no need for an ArrayList at all anymore. 

Also, I assume you're not really interested in learning how to build the Csla framework.  You likely want to learn to to build applications on top of it.  So if that's your end goal, I would read the first few chapters of the 2008 book, and the last few chapters where you walk through using Csla.   The Core video series will be of great use as well.  Once you've built some applications, I would suggest going back through the remaining chapters of the book.

That would be my recommendation, which again is based off the asumption that your ultimate end goal is to be able to build Csla based applications.  If you're just wanting to poke around into theory, then by all means go through either book.  The theory hasn't changed much, the framework implemention has evolved alot to make the theory work for you by needing less code.

Oh, and again I'll recommend started at the 2008 version and learning Csla 3.5 or higher.  That's when the new Managed Properties concept appeared, and the code and time savings there are enormous.  There is still a place for the older syntax, but Managed properties should work for almost all your cases, so why learn the old style only to relearn the new style again anyway?

HTH!

vba-dev replied on Wednesday, March 17, 2010

Andy,

Thanks very much. I'm an old guy and resistant to change, so I don't run right out and buy the latest O/S, development platform, etc. Therefore, I'm stuck with VS2005 and 2.0 for a while. Actually it's not because I'm old...it's because VS2005 makes great applications and the 2.0 Framework is awesome. Yeah, the newer stuff is 'awesomer', but so what? :)

Besides, these packages aren't free...at least not the versions I need!

Generic collections...you're saying these are new with the .NET 4.0 framework? I'll have to look into it...I thought you could create a generic collection from day one...so I'm not sure what you're talking about, yet.

Actually yes, I am interested in knowing how to build the CSLA framework. I was really wondering if learning how to build the version in this old book was a valuable exercise, or has it changed so much that I'd be wasting my time by going through the motions with this particular book.

You've piqued my interest. also... Managed Properties...now that just sounds like something I should look into.

The main reason CSLA caught my eye is because I hate "catchy", stupid names for technology. The dOOdads (or however it's cased)  framework springs to mind. Also of course because of Mr. Lhotka's reputation. I refuse to use or participate in a project which includes technology with such a moronic name (and casing).

Thanks for the recommendations, I'll keep those in mind as I go on through the book. Oh, and thanks for clueing me in on the verify button.

vba-dev replied on Thursday, March 18, 2010

 

Thanks Dan, I appreciate the input. I have taken a close look at the later versions of the framework and I do see that there are indeed radical changes. In addition, the sheer volume of additional objects is staggering.

I have built the '2003' (I guess) version of the framework, guided by the book. It is brilliant in its execution. I have not yet learned how to develop the Business Objects, and I hesitate now to do so with this version of the book.

I assume the "Core video series" referenced in the above replies is the 3.8 Series on the Store page. Is this series exclusive to Visual Studio 2008 and .NET 3.5?

If so, does the training apply to someone using VS 2005 and .NET 2.0?

Many thanks.

vschaak replied on Friday, March 19, 2010

Hi KollegeWink

the core video series has it's samples in C# and applies to the later (i.e. 3.x) framework release. Therefore it is focused on .net 3.5/VS 2008. But many concepts (the object stereotypes for example) are not that different in former versions.

Believe me, backdating that stuff won't be lesser work than updating to CSLA 3.x. And with the newer release there are some things really smart. To me there's less reason to stick, but a lot to update.

Best wishes to Texas

Volker

RockfordLhotka replied on Friday, March 19, 2010

vba-dev

If so, does the training apply to someone using VS 2005 and .NET 2.0?

The concepts in the videos apply to all versions, but many specific code concepts apply to 3.5 and later.

But you should know that CSLA .NET N2 is a version of CSLA .NET 3.7 that works in .NET 2.0. You'd have to ask Jonny whether it works in VS2005, but it absolutely works in .NET 2.0, using the more modern syntax for declaring properties and so forth. The same syntax used in the videos.

Copyright (c) Marimer LLC