Introduction and Problem

Converting Data Formats back and forth between browser and back end servers can be a little confusing.  In my case, I have a simple Sencha ExtJS 4.0 form that the user types a date into.  That date gets passed through an ajax request to the Microsoft asp.net controller, then that dates updates the SqlServer Database.  When the Date is displayed on a Grid Panel, again, an ajax request is made that grabs the date from the controller, then formats it using the MS dateFormat from ExtJS and hopefully, the same date the user typed in gets re-displayed.

So, let’s look at the details.

Posting the Date To the Server (View From JavaScript)

First, we need to define an ExtJS Model that has the date in it.  That codes looks like this in my case.

(more…)

Not sure why this was hard, but I wanted to make a trivial command file to deploy my database (or any change to it).  For those of you that don’t know the DataDude project, I have to say it’s one of the coolest tools that has come out the Microsoft Visual Studio Team for a while.  Basically, in a nutshell, what it does is split’s your database into hundreds of little files.  One for each table, key, foreign key, user, role, etc.  Then, since it is a standard VS2008 project, you can keep those files and the project under source control.  The big benefit is that multiple team members can change files and check them in, and everyone’s schema is kept up to date.

(more…)


© 2012 PeterKellner.net. All Rights Reserved
Follow

Get every new post delivered to your Inbox

Join other followers: