Web app woes: The database needs another field

After a few weeks on client side coding. I realize I need another field in the database and in the DTO. So I need to leave my client side project and enter the dark dungeons of the server side.

Add a field to the dev database. Add the property to the DTO. Deploy a new version of the dev dll’s. And later repeat the same thing for the production database and deploy the dll scheduled at night to the production web server.

Small thing? Why complain? Well, when I’m into client side flow dev, I dislike leaving my comfort zone for quite some time just to do such a futile task.

Advertisements

3 thoughts on “Web app woes: The database needs another field

  1. If you have separate client model you can implement new property on client and mock, instead of doing it all at once. Also, I do some coding in silverlight RIA, where it is possible to have the same model all the way from EF model to client side viewmodel. Added field in EF model can be translated into an extra column in the clients grid, with correct column name and all. Neat, but works only in simple scenarios. And then there is the middle way with Automapper with worst case of 3 different models to map between. Any other way?

    • Hi, thanks for commenting!

      I like the “implement new property on client and mock” way, so I could keep at the client side a while longer, and do the server side later.

      Yeah, the same model all the way should be the goal. A question is where to define it. So it’s both expressive enough and does not produce unwanted results (strange db structure or costly queries).

      Good to hear about EF. I think I need to reopen that box someday.

      My main issue here I guess is switching mentally from js to c#+sql (as well as switching projects).

    • Been thinking about that last question, “any other way”. Two other ways I’ve been testing and like: 1) using a T4 template that creates a data access layer automatically based on SQL schema (PetaPoco has such a template). 2) Azure Mobile services, it creates the necessary schema automatically based on jsons (during dev time). Extra settings needed (security, aggregations et c) are edited in the portal.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s