customer is a view model, so customer.Name will never be null

On Thu, Mar 25, 2010 at 4:02 AM, Richard Carde <rich...@carde.id.au> wrote:

>
> On 24 Mar 2010, at 05:07, David Connors <da...@codify.com> wrote:
>
> On 24 March 2010 15:03, Paul Stovell < <p...@paulstovell.com>
> p...@paulstovell.com> wrote:
>
>> I'd think a primary driver would be for the advantages of imperative code
>> - it's very easy to do this:
>>
>> <% foreach (var customer in Model.Customers) { %>
>>    <li><%= customer.Name %></li>
>> <% } %>
>>
>
> You're lucky it is night time in the UK or the OP on this thread would have
> a field day. <330.gif>
>
>
> (Unless I've got insomnia.  Is lying in bed reading/typing on an iPhone
> good for ones marriage?  Don't give me an iPad.)
>
> As long as everyone can see the flaws here, it's cool. I would expect most
> can.
>
> Lack of exception handling and escaping is, IMO, acceptable in code
> snippets.  Although using <%: isn't too much of a burden.
>
> OTOH, real code extracts/samples posted for edumacation should include it.
>  The interwebs are full of poorly constructed/documented code which is just
> picked up and used.  Don't get ne wrong, there's plenty of good stuff too!
>
> As for the use of such imperative code, each to their own.  What would you
> do if Model.Customers it customer.Name was null?
>
>
>
> --
> David Connors ( <da...@codify.com>da...@codify.com)
>
> --
> Richard Carde
>



-- 
Liam McLennan.

l...@eclipsewebsolutions.com.au
http://www.eclipsewebsolutions.com.au

Reply via email to