MonoRail Wizard best practices?

2009-09-11 Thread Daniel Hölbling
Hi, I'm currently building a Registration form for my MonoRail application and there is a LOT of data to be entered by the user. So I decided to split it through using a Wizard interface. I just feel a bit at a loss what the best way would be to carry that intermediary data from Step to Step. I

Re: MonoRail Wizard best practices?

2009-09-11 Thread Ken Egozi
A multi-step wizard *is* a session-wide action. options: 1. do all steps in Ajax way, aggregating the data on the client. not easily supported within the MR wizard infra. 2. use session to keep data between steps. easy, simple, scaling issues (unless using a farm-aware session storage) 3. use

Re: MonoRail Wizard best practices?

2009-09-11 Thread Gauthier Segay
I'm not used to the MR wizard but here are some thoughts: - instead of validating a fullfledged DB entity, you could validate plain Form DTO that match each registration steps, monorail controller has a validator runner that you can use on any DTO bringing validation attributes - if session feel

Re: MonoRail Wizard best practices?

2009-09-11 Thread Daniel Hölbling
Thanks! The Form-DTO idea is really good. I'll do that.Also I agree Ken, it's a Session-wide operation so that's probably the best way to go about that. I guess what impaired my thinking on this one was that every step of the Wizard corresponded to one Component in my Entity. My current approach

Re: MonoRail Wizard best practices?

2009-09-11 Thread Daniel Hölbling
Splitting the registration into two cases is also a very good Idea. I could let them complete their profile through the member area. Thanks for the suggestion. Now, off to something else. I tried the DTO approach and just found out something peculiar: I can't really use the ActiveRecord

Re: MonoRail Wizard best practices?

2009-09-11 Thread Daniel Hölbling
Forget the last part about the Validator requiring a AR mapping. I just used it wrong. On Fri, Sep 11, 2009 at 12:48 PM, Daniel Hölbling hoelblin...@gmail.comwrote: Splitting the registration into two cases is also a very good Idea. I could let them complete their profile through the member

Re: WCF Facility and ServiceBehavior

2009-09-11 Thread Craig Neuwirt
Don't know of any issues. What problems are you experiencing? On Fri, Sep 11, 2009 at 4:19 AM, Colin Jack colin.j...@gmail.com wrote: Hi, I was wondering whether there are any known issues with using paricular ServiceBehavior values with Castle WCF, we were originally using

Re: problems with dictionaryadapter

2009-09-11 Thread Craig Neuwirt
Ok, I'll dig around a little so see if I can find anything. On Thu, Sep 10, 2009 at 5:37 PM, Jan Limpens jan.limp...@gmail.com wrote: I could try, but I doubt it would reproduce. This happens sometimes only, so I guess it is some threading issue and hell knows what else needs to be emulated

Re: problems with dictionaryadapter

2009-09-11 Thread Lee Henson
I've seen the odd error message like that, but it has always appeared in our logs coincident with an app restart. I've always assumed it's a by-product of the app shutting down it's threads. 2009/9/11 Craig Neuwirt cneuw...@gmail.com Ok, I'll dig around a little so see if I can find anything.

Re: problems with dictionaryadapter

2009-09-11 Thread James Curran
I'm gonna guess that there's a XmlSerializer in there somewhere. The Serializer makes a guess at the assembly early in the process before it has all the information. The exception should be caught and ignored internally, but you will see it if you have break on Exceptions turned on. On Wed,

ActiveRecord - Making a HasManyToAny relationship more efficient

2009-09-11 Thread JakeS
I have a system where categories can be assigned to multiple objects (such as a Calendar Event or an Action Item) within the system. Each of those objects shares an Interface -- ICategoryItem. Then in the category I have mapped it like this: private IListICategoryItem _items;

Re: ActiveRecord - Making a HasManyToAny relationship more efficient

2009-09-11 Thread Markus Zywitza
Since NH cannot know in advance from which table the items come, it has to load them from all the tables. The best approach would be having a collection of intermediate objects that have a single Any reference. -Markus 2009/9/11 JakeS jakesteven...@gmail.com I have a system where categories

Re: ActiveRecord - Making a HasManyToAny relationship more efficient

2009-09-11 Thread William Chang
Even though, I don't have a solution for you... From looking at your code snippet, I think your implementation of ActiveRecord for ICategoryItem is unnatural (neither popular pattern of ActiveRecord or Repository). Instead of using interface directly on the model (an object that represent a

Re: selecting needed columns with criteria api

2009-09-11 Thread William Chang
Our you can use ActiveRecord Linq (way better): public static IListModels.Employee GetEmployees() { return ( from x in Models.Employee.Queryable select new Models.Employee() { firstname = x.firstname, lastname = x.lastname

Optimum ways of using AR

2009-09-11 Thread Chris Sims
I am currently developing a Survey management system for my company. I am getting pretty good at creating straightforward classes that persist to a database. I do have a couple questions on optimum uses of AR. I have a user security model that has User, Roles and Sessions. When a user logs into

brail views and automatic transaction facility

2009-09-11 Thread Tomas
I am using the Automatic Transaction Facility and it seems that any code in the brail file is executed outside of the transaction e.g. lazy loading of objects. I am using the nhibernate profiler to see this behaviour. It is my understanding that the second level cache will not be used outside of

Re: brail views and automatic transaction facility

2009-09-11 Thread Ayende Rahien
Don't do lazy loading in the view On Fri, Sep 11, 2009 at 9:19 PM, Tomas tomas.gerhard...@gmail.com wrote: I am using the Automatic Transaction Facility and it seems that any code in the brail file is executed outside of the transaction e.g. lazy loading of objects. I am using the nhibernate

Re: ActiveRecord - Making a HasManyToAny relationship more efficient

2009-09-11 Thread JakeS
Thank you for the advice, but I'm still unsure exactly how to proceed, partly because if my inexperience with using the repository pattern. How will that help me here? If I make a CategoryItem Repository, won't that still have make all these database calls? Or is this just a method of caching

Re: ActiveRecord - Making a HasManyToAny relationship more efficient

2009-09-11 Thread William Chang
If you decide to use the repository pattern, then you need two sets (or namespaces) of classes: Models and Repositories. The ActiveRecord mapping will be in the Models set. Repository is should not be a model of your database and it should contain methods (combination actions and events to do

Re: Medium Trust Problems

2009-09-11 Thread Donn Felker
Krzysztof, Thank you for looking into it. I opened a ticket. Where should this code change be, in the DP code? Thanks Donn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Castle Project Users group. To post to

Re: ActiveRecord - Making a HasManyToAny relationship more efficient

2009-09-11 Thread William Chang
Yes The ActiveRecord pattern does provide basic CRUD methods (e.g. Find(), FindAll() methods). But, I use the Repository pattern as well because of the complexity of the web application. Thus, I need another separation in my DAL. The repository interact between your model/ database layers and

Re: ActiveRecord - Making a HasManyToAny relationship more efficient

2009-09-11 Thread JakeS
That makes sense. I guess I was hoping for too much from ActiveRecord. So my best bet is to handle some functionality with some special queries, instead of just using the ActiveRecord properties on the models. The Repository pattern is the best place to house some of those queries, but that's

Re: WCF Facility and ServiceBehavior

2009-09-11 Thread John Simons
Colin, As Craig mentions, there are no known issues on the Wcf Facility trunk version, is this the version you are using? For advise on achieving high throughput see http://blogs.msdn.com/wenlong/archive/2007/08/10/service-instances-and-concurrent-execution.aspx Cheers John On Sep 11, 9:32 

Re: Debug Nvelocity view in monorail

2009-09-11 Thread JakeS
I'd love to hear if there is one, but my suspicion is there isn't. You just have to look at the context being passed to the template and ensure it matches. The parser will provide some rudimentaty syntax error exceptions. On Sep 10, 7:41 am, jamesfarrer james.far...@gmail.com wrote: Hi, When

Re: Medium Trust Problems

2009-09-11 Thread Krzysztof Koźmic
Yes in the DP, The only workaround that would make it work right now, is if your entity implemented an interface (even empty) that comes from an unsigned assembly 2009/9/11 Donn Felker donnfel...@gmail.com: Krzysztof, Thank you for looking into it. I opened a ticket. Where should this code