MVC Version

Sep 17, 2010 at 1:44 PM

Hi djbyter, 

Do you have a rough idea of when the MVC starter site will be up and running? Could really do with some help getting Chargify working in an MVC environment.

Thanks

Dave

 

Coordinator
Sep 17, 2010 at 6:44 PM

Hey Dave,

I can try and put some more time into it, I'm no MVC expert .. so it's a little more slow going. Just keep watching this thread, I'll make sure I reply when I've checked in that code.

Kori

Coordinator
Sep 17, 2010 at 7:08 PM

Actually, Dave .. do you think you could give me a tip or two? I have the main sample site duplicated mostly .. except I'm not quite sure how to bring the following concept over from ASP.NET to ASP.NET MVC .. 

In the ASP.NET site, you'll see that all the important pages that access your chargify information, do so by inheriting ChargifyPage and then accessing the property "Chargify". How would this work in ASP.NET MVC? My instinct says that it would be a model - since "models" are the components of the application that are responsible for maintaining state, right?

Once I can figure that out, then I should be a little better to move forward ..

Kori

Sep 19, 2010 at 3:44 PM

Hi Kori, 

I'll certainly help if I can. 

In my test project so far I have had to bypass the ChargifyPage and just use ChargifyConnect in each controller action instead. Not ideal but it works for now. I think you are correct in that a model is the way to go here.

In terms of the rest of the wrapper everything seems to work ok with MVC except for the list pages where the  IDictionary<string, ICustomer> format doesn't play well with what MVC is expecting, which is generally IEnumerable.

I'd be happy to work on the MVC sample project with you and see what we can get together if you like. 

Thanks

Dave



 

 

Sep 19, 2010 at 3:49 PM

It may also be worth looking at the Recurly Dot Net Wapper (similar service) to see how they have done it. Tested that earlier and it seemed to work quite well with MVC as I recall. 

http://docs.recurly.com/client-libraries/dot-net-client

Coordinator
Sep 20, 2010 at 5:22 PM

Hey Dave,

Yea - and using ChargifyConnect in each controller is pretty much what you would have to do when using the Recurly library, since they don't have any specific classes for MVC either.

Kori

Sep 28, 2010 at 7:43 PM

Any updates on this?  I am getting ready to tackle this as well and it would be good not to duplicate effort.

Coordinator
Sep 30, 2010 at 2:56 PM

I haven't had time to work on this yet, unfortunately. If you wanted to start, then maybe we can push some of the ideas back into the source - that would be great.

Coordinator
Feb 23, 2011 at 1:05 AM

Alright, check out the site now. I just finished (functionally) an MVC site. I'll be putting it up for hosting soon as well so you can see it at work.

-- Kori