[flexcoders] Re: MVC - Philosophical question
--- In flexcoders@yahoogroups.com, Troy Gilbert [EMAIL PROTECTED] wrote: I you're talking more generically about the Model of MVC, I do not agree. If your URL is an *implementation* detail of your service (which they are in most cases), then it should be part of your service layer and *not* part of the model. If your URL is a user-centric piece of data, i.e. a web browser's address bar, bookmarks, or user-configurable endpoints for your services, then it should be a part of the model. In my case (http://spreadingfunkyness.com/posty/) urls are service and user specific, so I put them in the model. Thanks for all the replies. They were all thoughtful and inspiring. -c.
[flexcoders] Re: MVC - Philosophical question
With Glenn and Daniel on this one; model should simply contain the data that can be used to generate/update a view.
Re: [flexcoders] Re: MVC - Philosophical question
If you're talking about the ModelLocator in Cairngorm, I agree. I you're talking more generically about the Model of MVC, I do not agree. ACE wrote: With Glenn and Daniel on this one; model should simply contain the data that can be used to generate/update a view. -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
Re: [flexcoders] Re: MVC - Philosophical question
I you're talking more generically about the Model of MVC, I do not agree. If your URL is an *implementation* detail of your service (which they are in most cases), then it should be part of your service layer and *not* part of the model. If your URL is a user-centric piece of data, i.e. a web browser's address bar, bookmarks, or user-configurable endpoints for your services, then it should be a part of the model. Troy.
Re: [flexcoders] Re: MVC - Philosophical question
I've always viewed the service layer as part of the model. It exposes model functionality through an API. It sounds like you speak of them as separate, so is that wrong? Troy Gilbert wrote: I you're talking more generically about the Model of MVC, I do not agree. If your URL is an *implementation* detail of your service (which they are in most cases), then it should be part of your service layer and *not* part of the model. If your URL is a user-centric piece of data, i.e. a web browser's address bar, bookmarks, or user-configurable endpoints for your services, then it should be a part of the model. Troy. -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
Re: [flexcoders] Re: MVC - Philosophical question
I've always viewed the service layer as part of the model. It exposes model functionality through an API. I don't know if its right or wrong, but I tend to adhere more to a MVCS style of architecture, or even Model-Presentation-Service architecture. I could certainly see the view that the service is part of the model, particularly if your model deals with the service level as a first class citizen -- like I mentioned about bookmarks, web browsers, etc. But, if the service layer just exists as a practical element in order to get bits from one box to another, then its not really part of your model. For example, if you do all of the work of your app on the client-side and basically just save/load your model to the server, then it'd make no since to have the service info in the model. I guess I'm talking about MVC in an ideal scenario: assuming that I don't have to mess with the dirty details of getting bits from the client to the server, would my app know/care about networking, URLs, endpoints, etc? If so, then model; if not, then service. Troy.
Re: [flexcoders] Re: MVC - Philosophical question
Thanks for the explanation. Troy Gilbert wrote: I've always viewed the service layer as part of the model. It exposes model functionality through an API. I don't know if its right or wrong, but I tend to adhere more to a MVCS style of architecture, or even Model-Presentation-Service architecture. I could certainly see the view that the service is part of the model, particularly if your model deals with the service level as a first class citizen -- like I mentioned about bookmarks, web browsers, etc. But, if the service layer just exists as a practical element in order to get bits from one box to another, then its not really part of your model. For example, if you do all of the work of your app on the client-side and basically just save/load your model to the server, then it'd make no since to have the service info in the model. I guess I'm talking about MVC in an ideal scenario: assuming that I don't have to mess with the dirty details of getting bits from the client to the server, would my app know/care about networking, URLs, endpoints, etc? If so, then model; if not, then service. Troy. -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com