Sunday, October 17, 2004

More on Architecture and CRUD

In answer to the Anonymous Commenter on the last post: a fair enough point I suppose, but it's hard to argue against poor programming.

If you'll allow me to suggest that an application might be more service-based instead of data-based then we might have something. If we use something like LLBLGen to generate a data access layer, and allow that layer to use dynamic SQL to access the database, we can depend on the database engine's core optimization techniques to execute the queries. We then build a business-objects layer above this data access layer for any business logic we need, then expose everything as a collection of services. Maybe we even use some BPEL orchestration and expose them as Web Services.

The time you save in getting as quickly as possible to the important parts of a project--actual functional coding of business use cases--more than makes up for any time you might have to spend later optimizing some queries for poor performance. At that point, once a competent database analyst has run traces on the running code and spotted some issues, some hand-written stored procedures can be added to the mix. LLBLGen is cool because you can hit stored procedures as well and it will generate methods for them.

Again, a good comment.