Monthly Archives: September 2009

ADO.Net performance: ExecuteReader vs ExecuteNonQuery vs ExecuteScalar

Just re-linking a two year old blog post with performance advice that every developer using ADO.Net should read.

ExecuteReader, ExecuteNonQuery, ExecuteScalar … When to use What ?

Further notes:

  • Here is a good example (post #3) of how to implement OUTPUT parameters in a stored procedure using ExecuteNonQuery(), ignore post #2, he doesn’t know what he’s talking about.
  • Another example with just the ADO.Net side from MSDN: Executing a Command and Accessing Output Parameters.
  • The ExecuteNonQuery method returns the number of rows affected by the query (typically for Insert, Update, or Delete operations). From the MSDN page above.
LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Who is responsible for WordPress maintenance?

This post is a response to a blog post by Jeff Chandler at Weblog Tools Collection titled:

Are You Responsible Enough To Run WordPress?

As Jeff mentions, the advent of such a powerful blogging framework lowers the bar of entry significantly for web publishing, but to blame the end users for a failure on their part to update their WP installations is unfair. While I don’t think WordPress themselves are in any way to blame, I don’t agree with the implications of expecting content authors to also be website administrators.

I think WP publishers are no different to end users of the Windows operating system. What WordPress and the massive developer community around it has achieved is unprecedented in the history of the web, but to ask end users of this product to see themselves as having some measure of technical responsibility for their site will require a significant paradigm shift.

You can’t just upload WordPress, perform a bunch of customizations, install 50 plugins, 50 themes, and think everything will be fine from that day forward.

Yet this is exactly what WP users are doing and nothing in the installation process really makes someone pay attention to the community around WP development or stay informed with product development. Anyone who buys hosting space and sets up WordPress immediately falls into “end user” mode. It’s like expecting your average Excel user to keep updated with Microsoft Office security bulletins.

Yes, WordPress is incredibly easy-to-use, easy-to-install and a walk in the park to customise, but there’s still plenty of room for improvement. I believe the developers of an application have a responsibility to make sure the users are being properly educated on their obligations, so why aren’t people installing WordPress told more about security, why aren’t people installing plug-ins or themes being told (perhaps they need to be told more forcefully) about how these installations can impede their upgrade options and the security ramifications that can result?

You don’t have to be a fan of Microsoft or Apple to recognise that they got rich by buffering end-users from the technical details underlying the technology we use every day.

The sentiment from some sections of this community; that people without the technical knowledge to manage Apache configuration, understand PHP code or perform an SVN merge have no business running a website is something that needs to die (in a fire).

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

REVIEW: osCommerce 2.2 rc2a

Lately I’ve been getting familiar with osCommerce for use as an online store for my aunty’s business. After doing a fair bit of research on Whirlpool and reading about other people’s experiences setting up a store, I chose this open-source package.

Initially, like many that move into the online space, the store will open as an online catalog without ordering abilities. Given the business revolves around a wholesale infrastructure, I will likely recommend that there is little point for them to move into retail orders online. When the catalog opens, one of the requirements of the business is that the entire catalog only be viewable by members, who they create.

To achieve this, I’ve had to modify osCommerce heavily to remove all front-end member sign-up abilities and modify the category browser/infoboxes to hide categories and products when a user is not logged in. I’ve also had to add a module that allows administrators to create new users… in fact finding a usable , working module that worked without problems in 2.2 rc2 proved to be a challenge so I had to hack apart a module that came closest.

Resources

After working with tools like vBulletin and WordPress, it was something of a shock to navigate through osCommerce’s unwieldy and ad-hoc approach to customisation. It was really, really messy and while hacking through table-based layouts in PHP files does afford a level of flexibility for those looking to customise heavily, it’s not something I would want to do again. The lack of abstraction between presentation and functionality in code makes the product practically impossible to upgrade, even with use of versioning software like SVN.

On the plus side, osCommerce does come with a lot of functionality which immediately allows someone to set up a fully-fledged ecommerce site with ordering, shipping, membership and lots of other features built straight in. It’s pretty easy to install and the administration interface is fairly intuitive, if unsightly. There’s also a huge developer community behind it and there are better packages than the bare-bones 2.2 rc2 version I used; some of these might give you everything you need “out-of-the-box”, or you can also wait for version 3 which is currently in alpha and looks a vast improvement on 2.2.

Next time I think I might give Magento, Zencart or even Joomla or WordPress (with add-ons) a go for an online shop. It’s hard to believe that such a popular product in the ecommerce space is designed and coded so poorly, as a developer this isn’t a product I would enjoy customising and can only spare a thought for the people out there who have to maintain heavily customised osCommerce sites.

LinkedInDiggRedditTumblrGoogle GmailPrintFriendlyEmailShare

Switch to our mobile site