Silverlight-Newbie

Silverlight-Newbie

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


rogercito posted on Saturday, November 01, 2008

Hi,
This is my first post and I’m trying to use a framework with a new Silvelight LOB project. I find CSLA very interesting viewing some sample code over the internet.

I have a some of questions:

1) Where can I find reading material to lean CSLA to Silvelight, giving its learning curve?
(Will the Amazon "Expert C# 2008 Business Objects" book explain CSLA to SL?)

2) I haven't used tortoise before, but I have installed it in my PC, where do I get the info to fill in the blanks in the tortoise checkout for downloading the Rolodex sample? is there any other SL-2.0-RTW compatible project sample?

3) I would like to keep "LINQ to (entities?)" for complex queries instead of Stored Procedures or ADOs raw selects. Is there any convention or best practice for CSLA here?

4) Any advice for when using or not using the CSLA generator (codesmith, i think) will be also appreciated.

Sorry for the newbie questions, but I´m really interested in the CSLA framework and the way it orders aspects for scaling.
Rogercito.

sergeyb replied on Saturday, November 01, 2008

Here are some answers.

1.       I’d recommend SL 2.0 book in addition to CSLA.  I am not sure how much 2008 book will cover in terms of SL specifics

2.       You can just download the latest sample off CSLA for Silverlight download page on Lhotka.net.  There is a half-a-dozen of samples for various scenarios.  Rolodex is the most complete one, especially if you are using remote data portal.

3.       You can certainly use EF if you would like.  CSLA does not really care where/how you get the data to populate business objects.  I am not sure about best practices, seems like not too many people here on the forum are using EF.  The pattern will be similar to Project Tracker which is using L2S.  I think there is even an object manager class (ObjectContextManager) for EF context in 3.6 to help you manage the data context.  Here is a unit tests we used to test the object, which will give you an idea on how to use it.

 

using (var objectContextManager = ObjectContextManager<DataPortalTestDatabaseEntities>.GetManager("DataPortalTestDatabaseEntities", true))

      {

        Assert.IsNotNull(objectContextManager);

 

        var query = from p in objectContextManager.ObjectContext.Table2

                    select p;

 

        Assert.IsTrue(query.ToList().Count > 0, "Data in table is missing");

      }

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

Magenic ®

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: rogercito [mailto:cslanet@lhotka.net]
Sent: Saturday, November 01, 2008 12:42 PM
To: Sergey Barskiy
Subject: [CSLA .NET] Silverlight-Newbie

 

Hi,
This is my first post and I???m trying to use a framework with a new Silvelight LOB project. I find CSLA very interesting viewing some sample code over the internet.

I have a some of questions:

1) Where can I find reading material to lean CSLA to Silvelight, giving its learning curve?
(Will the Amazon "Expert C# 2008 Business Objects" book explain CSLA to SL?)

2) I haven't used tortoise before, but I have installed it in my PC, where do I get the info to fill in the blanks in the tortoise checkout for downloading the Rolodex sample? is there any other SL-2.0-RTW compatible project sample?

3) I would like to keep "LINQ to (entities?)" for complex queries instead of Stored Procedures or ADOs raw selects. Is there any convention or best practice for CSLA here?

Sorry for the newbie questions, but I??m really interested in the CSLA framework and the way it orders aspects for scaling.
Rogercito.



rogercito replied on Sunday, November 02, 2008

Thank you Sergey for the quick response.
I was able to download and got the rolodex app running successfully. I will do my homework analizing the code and reading the books.

Roger.


rogercito replied on Sunday, November 02, 2008

By the way, when I delete a line in the lower phone/fax grid of the rolodex app, it behaves strange(the row doesnt dissapear completly), and the cancel button doesnt refresh the this grid properly. I couldn't locate a post discussing this issue.
Any ideas what could be happening with this visual misbehavior?

sergeyb replied on Sunday, November 02, 2008

I am afraid you found an issue with SL grid that was reported a while ago.  I have not seen it in a while, and I thought it was fixed.  I think the only workaround I found (it has been a while though) was to create a new grid and bind it to BO after cancel.  I am not 100% sure though on this workaround.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: rogercito [mailto:cslanet@lhotka.net]
Sent: Sunday, November 02, 2008 6:53 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: Silverlight-Newbie

 

By the way, when I delete a line in the lower phone/fax grid of the rolodex app, it behaves strange(the row doesnt dissapear completly), and the cancel button doesnt refresh the this grid properly. I couldn't locate a post discussing this issue.
Any ideas what could be happening with this visual misbehavior?



rogercito replied on Monday, November 03, 2008

Just for feedback about this problem, it appears to be a serious bug of the SL2RTW version not present in the betas.


I played a little with the componentone and devexpress grids and they didnt show this problem (no ValidatedDataGridTextColumn tho)

Roger

sergeyb replied on Monday, November 03, 2008

I was able to reproduce this issue even without using CSLA, actually, so the problem has nothing to do with validated columns.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: rogercito [mailto:cslanet@lhotka.net]
Sent: Monday, November 03, 2008 1:02 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: RE: Silverlight-Newbie

 

Just for feedback about this problem, it appears to be a bug of the SL2RTW version not present in the betas.
http://silverlight.net/forums/p/41538/121028.aspx#121028

I played a little with the componentone and devexpress grids and they didnt show this problem (no ValidatedDataGridTextColumn tho)

Roger


rogercito replied on Monday, November 03, 2008

Indeed, nothing to do with CSLA, hopefully the microsoft team solve this issue soon.
I didn't know how to use the ValidatedDataGridTextColumn with the C1 an Devexpress grid controls.

Roger

sergeyb replied on Monday, November 03, 2008

You cannot.  Those are setup for MS grid.  You have to use template columns (if grid support those) probably add put PropertyStatus inside data template for those columns.  I did the same as experiment for combo box column, and it works.  You can look at this case in the latest Rolodex – contacts grid – combo box column.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: rogercito [mailto:cslanet@lhotka.net]
Sent: Monday, November 03, 2008 8:51 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: RE: RE: Silverlight-Newbie

 

Indeed, nothing to do with CSLA, hopefully the microsoft team solve this issue soon.
I didn't know how to use the ValidatedDataGridTextColumn with the C1 an Devexpress grid controls.

Roger


rogercito replied on Tuesday, November 04, 2008

Do you happen to know if Microsoft is fixing this 2.0 RTW DataGrid problem?
Its just so essential to build line of business applications, I can't think why isn't on the top of the bug list.

Roger

sergeyb replied on Tuesday, November 04, 2008

I really do not know.  It was reported to them, but somehow did not make the cut.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: rogercito [mailto:cslanet@lhotka.net]
Sent: Tuesday, November 04, 2008 1:35 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: RE: RE: RE: Silverlight-Newbie

 

Do you happen to know if Microsoft is fixing this DataGrid problem?
Its just so essential to build line of business applications, I don??t see why isn't on the top of the bug list.

Roger


rogercito replied on Wednesday, November 12, 2008

Would you paste the workaround code you use to make Csla work with this Microsoft RTW datagrid bug? for instance, with the Rolodex Sample?


Afontan replied on Saturday, December 20, 2008

Hi Sergey

There is a new grid version:

Silverlight 2 DataGrid December 2008 Release

http://blogs.msdn.com/scmorris/archive/2008/12/19/silverlight-2-datagrid-december-2008-release.aspx

I did all the steps to install this new version but the Rolodex app did not work. (Another simple grid control sample worked fine).

 

 

 

rogercito replied on Saturday, December 20, 2008

I believe that the rolodex sample is now working fine with the december patch, did you replace the dll in the SL project part of the rolodex solution?

Copyright (c) Marimer LLC