Blogs

Paul Kimmel's Blog

Declarative Programming

     

Declarative programming is all the rage these days (along with functional programming). What is declarative programming? Declarative programming is when you specify the "what" without the "how". Declarative programming is about statements of work--get some records--without specifying the algorithm or logic that indicates how the work is to be performed.

Declarative programming shows up in places like .aspx pages for something like the SqlDataSource. You might see DeleteCommand-"DELETE FROM Customer WHERE CustomerID = @CustomerID". That's it. The framework knows how to take the declarative delete statement and pile on the ADO.NET plumbing. Old timers like me--20 plus years--sometimes don't like declarative programming because we have gotten used to writing the plumbing and using code generators, snippets, and CodeRush (tm) to speed up writing this code. In general though declarative programming saves you time and consequently money simply because writing plumbing code even with a tool like CodeRush takes time, has to be debugged, and can still be a little error prone.

For straightforward pages with something like our ASPxGridView control use declarative programming when it is available. The SQL statements and the declarative bits are not served to the client, so the old worries about exposing schema information or mitigated. You can always step back and write logic if you have to, but you can never get that time back if you start with imperative--old school how and what--code.

...

I will be at the Central Ohio Day of .NET in Columbus on April 18th representing Developer Express. Stop by our booth and let me know if you have read the blog.

Published Mar 26 2009, 10:37 AM by Paul Kimmel (DevExpress)
Bookmark and Share

Comments

 

Peter Hearn said:

Declarative programming has to be the way to go.  

Programming can be pretty tedious, so anything which relieves the monotony is welcomed.  Also, business needs change fast and we have to be able to respond.  We're paid to deliver a result and not to spend hours wrestling with repetitive code.  Of course we need to be able to code for the specifics, but that should be the exception and not the rule.  

Personally, I want a tool to sort out ALL the add/edit/update stuff - handle the concurrency issues too please - and DON'T make me lay out every damn field and bind it by hand.  

By 2009, we really should have rock-solid tools which do this menial junk, but regrettably we most certainly don't.

March 27, 2009 5:14 AM
 

Paul Kimmel (DevExpress) said:

Great response. One has to wonder why with all of these minds and money working on data access plumbing we even have to deal with it at this point. Clearly its hard, but teh closest thing to naming the "challenge" is "impedance mismatch". With tools like XPO and Entity Framework (nHibernate and others) we are clearly driving in that direction, but it looks like we are a ways off from seemless persistence.

March 27, 2009 10:20 AM
 

drew.. said:

Seriously, for a DX employee to publish "With tools like XPO and Entity Framework" and not "With tools like XPO and XAF" .. causes me to raise my eyebrow almost to the top of my head. This just boggles the imagination given the efforts of the xaf team, the volunteer advisory board and the hard-working xaf-oriented SC team.

March 30, 2009 3:11 PM
 

Leon Dudovich said:

I dont understand is your blog use this type of CMS or the other?

I want to create a website by website buidlers like www.site2you.com or by paying for this to a good programmer and still thinking....

August 23, 2009 5:56 AM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.