Source code condition and community contributions

Developer
Aug 13, 2009 at 7:35 PM
Edited Aug 13, 2009 at 8:39 PM

Hey devs -

I've been developing a site on C4U over the past week and in general, I'm quite pleased with the object-oriented approach and the ease of getting a serious commerce site up and running as well as developing new functionality.

However, I also have some concerns about the code base as a whole. While it is understandably of varying quality and consistency due to the number of projects it integrates, as well as the code being only a beta version, there are also a number of areas where even new code has some qualities which gives me pause, like code duplication (e.g. there are 3 different "IsGUID" functions, all using a newly created RegEx rather than a static, compiled one), unnecessary code executions (e.g. ASP.Net controls load data and bind more than once on page refresh), and significant bugs (e.g. the mailer.From field wasn't ever filled out, and so mail couldn't be sent via my SMTP server).

The main concern I have is that while I've been able to correct all these issues for myself, and would be interested in posting them back to the community, the large number of code and style consistency issues (even the most basic C# style guidelines, such as public method and class naming are frequently unheeded) make this a practical challange using only patches and the current mechanism of source code quality enforcement.

Does the development team have a vision of community contribution going forward? What sort of mechanisms relating to code quality and consistency do you hope to implement?

Coordinator
Aug 14, 2009 at 2:41 AM

Thanks for the honest assesment - an objective look is always valuable.  I'll answer in brief here and perhaps we can take this discussion offline with the contributing team and post back here the resolutions.

As you noted, much of the source in this project dates to the days of the sample project IBuySpy Store from ASP.NET 1.0 and has been contributed to by many folks since then.  Even when I initially ported the then dashCommerce 2.2 website to work with Umbraco it was strictly an integration effort where the goal was to make as few changes as possible.  During the last 2 years I have, no doubt, contributed some code that is, ahem, less than perfect.  Though the more recent work in integrating with the Umbraco UI and the installer are, I hope, of somewhat higher standards.

I think you'll find that many open-source projects started out with a less than ideal set of guidelines and code that contains hacks, and worse.  But, in the end the successful projects come back for a refactoring and clean-up as the code base matures.  I personally know that both Umbraco and DNN are in this category.  These projects, all, were created in a time when the standards and guidlines either did not exist or were in a different, and less mature, state than they are now.

I believe it a worthy goal to create a project that not only provides excellent and useful functionality but that also is a model of good practice and high standards.  With your contributions and that of others I'm certain this project will continue to improve on many levels.

I've added you as a developer so you need not go through the hassle of submitting patches and can apply your contributuons directly to the source.

-Paul

Jan 28, 2010 at 8:26 AM
Edited Jan 29, 2010 at 1:26 PM

I'm trying c4u on a site for educational purposes, and I'm actually quite pleased with it, despite the 'varying' quality of code :)

But my I suggest a fairly quick fix: could you swap the image buttons in the shopping cart user controls for linkbuttons, as these would offer a lot more options for styling?

I might be missing something. Is the source code for the codebehind files of these user controls available somewhere?

Thanks.

-edit-

Better question may be: is the source code for the current release available?

Coordinator
Feb 1, 2010 at 12:34 AM

Yes - all source is available from the Source Code tab...including code behind files.

-Paul

 

Feb 8, 2010 at 8:03 AM

Yes it is :), thanks. Sorry, I just got the version numbers a bit wrong.