inbound and outbound dtos are not necessarily the same

but you can always do something like:

===dto===
class Cat
{
   string Name ...
}

===controller===
public void Mew([DataBind("cat")]Cat cat) { ... }

==interface===
interface ICatView
{
   Cat Cat {get;set;}
}

===view===
<%page ... inherits="...AspViewBase<ICatView>"  >
..
<%=view.Cat.Name %>


or even:

==generic interface===
interface IGeneralView<T>
{
   T Item{get;set;}
}
===view===
<%page ... inherits="...AspViewBase<IGeneralView<Cat>>"  >
...
<%=view.Item.Name %>


keep us posted please :)
On Thu, Jan 15, 2009 at 12:14 AM, Jason Meckley <[email protected]>wrote:

>
> slick. I'll look into vcompile later on.
>
> I was able to block users from access the views with this
>  <location path="Views">
>    <system.web>
>      <httpHandlers>
>        <add path="*.*" verb="*" type="System.Web.HttpNotFoundHandler"/
> >
>      </httpHandlers>
>    </system.web>
>  </location>
>
> I'm experimenting with databind attributes and typed property bag
> factories.
> databind attributes on public controller members requires the argument
> to be a concrete implementation.
> the typed data adapter requires the fetched typed to be an interface
> (proxying I guess).
>
> so my question is, for consistency, I should probably pick one method
> to access the bag/flash/session and stick with it? this will
> ultimately effect how I write my unit tests: populate the bag, or pass
> a parameter.
> since I want to use as much strong typing as possible, I'm leaning
> towards dataadapterfactory and parameterless controller members.
>
> >Felix Gartsman wrote:
> > 1 - saveFiles - save the generated C# code files. Useful to see
> > compilation errors origin, set false for production. autoRecompilation
> > - recompile on file change. Great for development. For production set
> > false and pre-build with VCompile. Otherwise file changes will re-
> > start IIS and bye-bye sessions (unless outproc server).
> > 2 - You don't need to deploy them (just empty Views folder). VCompile
> > turns them to dll.
> >
> > On Jan 14, 8:45 pm, Jason Meckley <[email protected]> wrote:
> > > I got my example up and running with aspviews and dictionary adapter.
> > > I love it!
> > >
> > > follow up questions:
> > > 1. aspview configs:
> > >           what does the attribute saveFiles do? when true? when false?
> > >           what does the attribute autoRecompilation do? when true?
> > > when false?
> > >           what performance impact does this have?
> > > 2. what do i need to put in the web.config file to prevent users from
> > > accessing the aspx files directly?
> > >
> > > On Jan 14, 9:46 am, "Ken Egozi" <[email protected]> wrote:
> > >
> > > > What AspView is doing is to wrap the properties used by the view,
> with a
> > > > typed adapter, using the great Castle.Components.DictionaryAdapter
> > >
> > > > On Wed, Jan 14, 2009 at 4:37 PM, Jason Meckley <
> [email protected]>wrote:
> > >
> > > > > The code samples I linked to are from the AltOxite sample which
> uses
> > > > > fubumvc. The framework appears to be very new.
> > > > > I'm downloading the openuni code now and will browse that. this
> looks
> > > > > promising.
> > >
> > > > > I've heard a lot about the danger of "magic strings" and looking at
> > > > > the propertybag/flash and template engines they rely heavily on
> > > > > strings. This seems counter to the idea of magic strings.  I also
> have
> > > > > not learned how to test my gui with tools like watin so the gui is
> the
> > > > > most fragile part of my system. Right now my opinion is the more I
> use
> > > > > typed objects, the greater chance of success rendering the proper
> UI.
> > >
> > > > > On Jan 14, 6:06 am, "Ken Egozi" <[email protected]> wrote:
> > > > > > Jason, to what sample app are you referring to?
> > > > > > take a look at:
> > > > >
> http://github.com/kenegozi/openuni/blob/ea86d2dcabf551866e31bef72b85b...
> > >
> > > > > > (it's part of a half baked university project so it's not a
> super-great
> > > > > > reference, but you can see an example for typed access there)
> > >
> > > > > > On Wed, Jan 14, 2009 at 12:56 PM, Ben Lovell <
> [email protected]
> > > > > >wrote:
> > >
> > > > > > > Ouch that code hurts my eyes. =)
> > >
> > > > > > > On Wed, Jan 14, 2009 at 8:48 AM, Colin Ramsay <
> [email protected]
> > > > > >wrote:
> > >
> > > > > > >> <%=
> > >
> > > > >
> this.RenderPartial().Using<BlogPostComment>().WithDefault("<h3>{0}</h3>".ToFormat(Resources.Strings.NO_COMMENTS_HERE)).ForEachOf(Model.Post.Comments)
> > > > > > >> %>
> > >
> > > > > > --
> > > > > > Ken Egozi.
> > > > >
> http://www.kenegozi.com/bloghttp://www.delver.comhttp://www.musicglue...
> > >
> > > > --
> > > > Ken Egozi.
> http://www.kenegozi.com/bloghttp://www.delver.comhttp://www.musicglue...
> >
>


-- 
Ken Egozi.
http://www.kenegozi.com/blog
http://www.delver.com
http://www.musicglue.com
http://www.castleproject.org
http://www.gotfriends.co.il

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to