Missing items for the _data field on AjaxContinuation

10 views
Skip to first unread message

Brandon Behrens

unread,
Feb 2, 2012, 6:16:38 PM2/2/12
to fubumv...@googlegroups.com
We almost done upgrading to the latest Fubu and the last thing we need to do is junk the AjaxContinuation that was in FastPack and convert over to the one in FubuMVC.  Part of that change involved some properties going away and being stored in an indexer on the AjaxContinuation object.

EG:

ajaxContinuation.showDialog = "foo"; (OLD)
ajaxContinuation["showDialog"] = "foo"; (NEW)

Right now I'm running into some issues with our unit tests where we're asking for missing keys.  Normally it's just to check and make sure they're null.  Is there a reason there isn't an onMissing => null besides it just hasn't been needed yet?  If so, would it be ok to expose a HasData method that would let you check without having to handle an exception?  

--Brandon
--
Brandon Behrens
512.659.7171 (c)

jmarnold

unread,
Feb 3, 2012, 11:08:54 AM2/3/12
to FubuMVC Development Group
I think it's just that it hasn't been needed yet. The HasData will be
useful no matter what so I don't see any harm in exposing it. Just my
$.02.
> Brandon Behrens512.659.7171begin_of_the_skype_highlighting            512.659.7171      (c)

Brandon Behrens

unread,
Feb 3, 2012, 11:10:37 AM2/3/12
to fubumv...@googlegroups.com
Ok.  I'll go ahead an add HasData.  Can I get a thumbs up / down on adding the onmissing -> null?


--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.

Joshua Arnold

unread,
Feb 3, 2012, 11:12:16 AM2/3/12
to fubumv...@googlegroups.com
+1 from me

Jeremy D. Miller

unread,
Feb 3, 2012, 11:24:54 AM2/3/12
to fubumv...@googlegroups.com
don't do the missing thing, because that could easily hose up the json that's serialized out.

Just make the retrieval methods smart enough to return null if it doesn't exist in the cache.  Put it another way, the underlying state of the ajax continuation object should *not* change by calling methods that query it.

Command/Query Separation FTW!
 
Jeremy D. Miller
The Shade Tree Developer
jeremy...@yahoo.com



From: Joshua Arnold <rncod...@gmail.com>
To: fubumv...@googlegroups.com
Sent: Fri, February 3, 2012 10:12:16 AM
Subject: Re: [fubumvc] Re: Missing items for the _data field on AjaxContinuation

Brandon Behrens

unread,
Feb 3, 2012, 11:32:11 AM2/3/12
to fubumv...@googlegroups.com
Cool, thanks guys.

Ian Battersby

unread,
Feb 4, 2012, 5:30:27 AM2/4/12
to fubumv...@googlegroups.com
+ 1000

Brandon Behrens

unread,
Feb 4, 2012, 11:28:49 AM2/4/12
to fubumv...@googlegroups.com
I made the change and pushed it in yesterday.  Thanks for the feedback everyone.
Reply all
Reply to author
Forward
0 new messages