views:

109

answers:

3

Hi, I would like to know the best practice for a designing a simple CRUD application with some screens updating various tables (like admin pages to maintain static data for an application). the simplest way would be to drag a data grid/gridview, bind it to a dataset and use a data adapter for CRUD operations. but if this application needs to be scalable, lets say to add any extra UI/business logic in future, then is there any design pattern that can help with this? should I be using an object data source control and bind it to business objects instead? or are there any better ways of doing it? should I build a complete layered application or will that be overengineering for this requirement? any examples for UI design would also be helpful. thanks.

A: 

If you are looking for a really quick and easy approach, you can look at using Dynamic Data http://www.asp.net/dynamicdata on top of a Linq2SQL or EF4 backend - hardly any code needed at all.

nonnb
I was aware of this though I haven't used it before, but after looking at this recommendation, I will give it a try. thanks.
RKP
A: 

http://www.asp.net/mvc is my bet. It's easy to start with and get going... You won't be dissapointed. :) StackOverflow itself is built on top of it.

Leniel Macaferi
A: 

+1 Oded. No offence RKP but you might be confusing "simple" with with "effective" or "value-for-money". I also think you might want to be more clear about exactly what it is you're after: example UI designs is quite a different issue from the logical architecture. Anyway - good on you for asking.

If this is a "tactical" solution: not expected to have a long life-span, or is a quick-and-dirty dev tool then how you build it might not be such a big issue. (also beware that short-term tactical apps can end-ed being long-term strategic ones - were working on an app now that the business see as a "temporrary" tool: they see it only being used for the next 5-10 years (!)).

If it's a tool the "business users" will use, then it's quite likely they'll expect changes overtime: depending on what the app is for a simple pass-through CRUD app might only cut the mustard for a short while.

So I guess this is where your admirable desire to look at best practice comes in. Are you familiar with OO design? A lot of the principles behind good OO design also apply at the architectural level (SOLID, Common Reuse, Common Closure, Loose Coupling, Stable Dependancies and Stable Abstraction Principles).

lets say to add any extra UI/business logic in future

So - this is where you need to consider up-front how you will seperate concerns and allow for growth: architecture doesn't mean you have to do a big upfront design, it just means you need to have an idea of how you'll grow the application as requirements grow..

To finish:

  • Have a good look at the different system quality attributes and work out which ones are particularly relevant to the system. prioritise them.
  • I get a lot of mileage out of Dependency Inversion (The D in SOLID) - abstract out things like data access early on.
  • For me the other really key "best practice" is to pay attention to SRP (the S in SOLID),
Adrian K
I was just asking for a standard design pattern for a typical data driven application which may or may not grow in future. as of now I am not aware of any logic they would like to add. but business always changes, so I would like to keep that option open without going for a quick and dirty approach. thanks for your answer anyway.
RKP