Advice from the Csla web gurus

Advice from the Csla web gurus

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


ajj3085 posted on Thursday, August 14, 2008

Hi,

It's been a while since I've done an Asp.net site.  I'm trying to do a fair simple one right now for my company.  I think I'm getting it.. but I do need some tips.

One is that a user can enter customer information, or select a pre-existing customer to use.  To select a pre-existing customer, I have a method on the BO SetCustomer that accepts a read-only customer object.  So my question here is dual.. how do I get a similar search / select popup as I would in the Windows forms world (I can tie this to IE, it's just me, and I don't have time to support any other browsers), and two, even when selected.. what's the best way to get the read only object to the method call.

Second.. what's the best way to get child and grandchild editing done?  I'd like to keep things as simple as possible. 

I do have access to Infragistics controls, version 20072, but trying to get the UltraWebGrid was frustrating, because for some reason it didn't output the html properly (ie., it was spitting out <Infragistics.Web.UI.UltraGrid.UltraGridColumn> instead of <infragistics:UltraGridColumn>).  But if someone can tell me where I'm going wrong, I'd appreciate that.  Double clicking the control in the toolbar also didn't add it to the page, unlike the standard Asp.net controls..

I'm using Csla 3.5.1, VS 2008 and .Net 3.5SP1.

Thanks
Andy

tmg4340 replied on Thursday, August 14, 2008

I can't provide much CSLA help here - I've never used it in a web app - but I might be able to shed some light on your Infragistics problem.  I'm betting that 2007 Vol 2 isn't 3.5-compatible.  I don't think 3.5 was around when 2007 Vol 2 was released, or if it was, they didn't compile a version against the 3.5 framework.  That's probably why you're seeing the weird Infragistics behavior.  Based on what I see on their website, you'd have to step up to a 2008 release to get a 3.5-compatible toolset.  Depending on how old your subscription is, you might be able to get that for free.

HTH

- Scott

ajj3085 replied on Thursday, August 14, 2008

The controls themselves seem to work fine, once I fix the bad html it spits out into the aspx file.  I was hoping they'd still play nice with the 2008 designer though.. but perhaps not.  I'm suprised they still show up in the toolbox.

20072 was released a little over a year ago, unfortunately that was the last version I was eligible to upgrade to.  I guess i'll have to decide if the controls are worth the money.. the web grid does seem like it would save me a lot of effort given the children / grand children editing I need to allow.

tmg4340 replied on Thursday, August 14, 2008

I'm not surprised they show up, or that they work.  We had some 2.0 projects that used 1.1 controls, and they seemed to work just fine.  But we had the same situation you do - designer support isn't what you would hope it to be.  Getting controls in the right framework version is probably better for performance as well - different framework versions probably load into the AppDomain differently, and incur some sort of marshalling overhead.  But I could be wrong there; we never really tested it, and those "hybrid" projects didn't stay that way for long.

I can't really say whether the WebGrid will make your day or not.  For hierarchical display, it certainly is relatively easy to use.  But it's also kinda heavy if all you're doing is read-only tree displays, and making the grid read-only introduces some annoying rendering side-effects.  We do very little in-place editing in our grids.  I've done it before on flat grids, and it is pretty slick, but I don't know whether the technique I used translates when the grid is hierarchical.  And I didn't use the row template features either.  Another programmer here did on one project, and he was fighting to get it working for quite a while.  But that could have been his inexperience with the control.

- Scott

ajj3085 replied on Friday, August 15, 2008

Ya, I think I'm gonna ask to buy the newer version.  I won't be using the grid for readonly.. that would be overkill.  But for editing, I'm hoping it will save me a lot of effort.  I'm also hoping it's similar enough to the WinGrid control that I'll be able to pick it up pretty quickly.  Smile [:)]

nermin replied on Friday, August 15, 2008

If you are going to buy a new version, my advice to you is to go with another manufacturer.  I believe you mentioned Infragistics in one of your earlier messages, and as far as I can tell those controls whether Windows or Web have always been a nightmare.

 

From: ajj3085 [mailto:cslanet@lhotka.net]
Sent: Friday, August 15, 2008 7:33 AM
To: Nermin Dibek
Subject: Re: [CSLA .NET] Advice from the Csla web gurus

 

Ya, I think I'm gonna ask to buy the newer version.  I won't be using the grid for readonly.. that would be overkill.  But for editing, I'm hoping it will save me a lot of effort.  I'm also hoping it's similar enough to the WinGrid control that I'll be able to pick it up pretty quickly.  Smile <img src=">


JoeFallon1 replied on Friday, August 15, 2008

"So my question here is dual.. how do I get a similar search / select popup as I would in the Windows forms world (I can tie this to IE, it's just me, and I don't have time to support any other browsers), and two, even when selected.. what's the best way to get the read only object to the method call."

FWIW, here is how I do it in my web app:

1. I have a Search screen where the user can input criteria (name, ID, address, etc.) and each row of criteria has a check box so I can tell if they filled it in or not. Then I send this crtieria BO to a ROC as the "Criteria" and ask it for the "filter" to use as part of the WHERE clause. It loops over the "checked" properties and builds the filter.

2. The ROC is then fetched and bound to a grid. The last column of the grid contains buttons like Edit or Delete.

3. When the user clicks Edit, the querystring includes the ID of the object in that row. The edit page opens, reads the querystring, and fetches the root BO based on the ID. No need to pass a full blown RO object to the edit page. The RO object on the ROC only has a small part of the total information anyway - just the ID and Name and Status (for example).

HTH
Joe



 

ajj3085 replied on Friday, August 15, 2008

Hmm... that may work.  I'll have to think about it.  If tweak your idea, perhaps my select contact page could also take a delegate which to call when the contact is selected.  I could use the SetCustomer method to match the delegate.. that way I can reuse the select contact page.

ajj3085 replied on Friday, August 15, 2008

Hmm.. I've actually been pretty happy with them.  At any rate, I already have a pretty large WinForms application that uses their controls pretty extensively, and I'm not sure I'd want to go back now and have to retouch all those screens.   Of course, this will be first time using the Asp.Net controls... which also seem good, it's just the designer that isn't working for them properly anymore.

Copyright (c) Marimer LLC