Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Ayende Rahien 3/3/2005 4:21 AM
For the last two days I've been working very intensely with Cuyahoga, and it has been very good experiance.
It's rare that you can just dive in to a ~10,000 LOC pile, and make just the modification that you need, or just grok the code on first sight.

However, a few things I did noticed:
1) There is a problem with the site's name if it can be reached from multiply end-points, a good example is this site, where you can reach it by going to http://www.martijnboland.com/cuyahoga but http://martijnboland.com/cuyahoga would result in an error. You can't give it root domain names that ends with '/', e.g. 'http://www.ayende.com/' would fail as a domain name, because you strip the last / out.
2) ModuleSetting.GetRealType() - It doesn't throw an error if the type cannot be found (for example, registered in DB, but the assembly is no in the bin directory, this cause a null reference exception later on, and hide the real reason for the error.
3) This is a matter of taste, but there are quite a bit of magic string (mostly relating to module setting) there, "ALLOW_COMMENTS", etc), this can cause a spelling error ("ALLOWS_ERROR") that are hard to find because the code look correct.
4) If you leave the browser for a long time, and then resume authenticated behaviour you get an exception (AccessForbiddenException) including stack trace etc. Should be a login page that redirect back to the first page.
5) There is no validation of input (I just checked the Articles modules, so the others may have it) that are passed via querystring, again this cause an exception trace page rather than an error page.
6) There is a problem in ServerControls.Calander, it doesn't handle dates whose format is "dd/mm/yyyy", etc. This is because the replace routice replace each 'd' or 'm' with '%d' or '%m' respectedly. So in the end the result looks like: 0303/0303/2005 1414:1515 (everything repeat itself twice). I hacked around this problem by replacing the convert time/date strings to loop over possible strings from the biggest to smallest. ("yyyy","yyy","yy","mmmm","mmm","mm","m"), etc.
7) Deleting a section within a node doesn't work, the link is hooked to confirmDeleteSection, that just retrun confirm(...) without doing anything.
8) This one is more of a UI issue, but nodes are no clickable when you edit their sections, so there is no way to finish editing a section, and go back to the node, you've to click on the site and navigate downward.

Sorry for such a big list,
If you want any more info, please inform me.
Ayende RAhien
# martijnb 3/3/2005 3:58 PM
That's some great feedback, I really appreciate this! So now for the issues:
1) There is a problem with the site's name if it can be reached from multiply end-points, a good example is this site, where you can reach it by going to http://www.martijnboland.com/cuyahoga but http://martijnboland.com/cuyahoga would result in an error. You can't give it root domain names that ends with '/', e.g. 'http://www.ayende.com/' would fail as a domain name, because you strip the last / out.

Yes, the site-url mapping is a little tricky right now and there is some room for improvement. I'm thinking of introducing site aliases to allow multiple domain names with a site AND a specific culture. This way you can attach multiple domains to a single site plus you can map a url to a culture (e.g. http://www.cuyahoga.nl to the dutch part of the site). Should'n be too hard to implement. When working on this part I will also make the site url a little bit more forgiving, so improper casing or adding an extra slash won't raise an exception.
2) ModuleSetting.GetRealType() - It doesn't throw an error if the type cannot be found (for example, registered in DB, but the assembly is no in the bin directory, this cause a null reference exception later on, and hide the real reason for the error.

Added to the bug-list.
3) This is a matter of taste, but there are quite a bit of magic string (mostly relating to module setting) there, "ALLOW_COMMENTS", etc), this can cause a spelling error ("ALLOWS_ERROR") that are hard to find because the code look correct.

True, but this is pretty hard to avoid when using this kind of dynamic properties. Maybe I should add a method to the Section to retrieve and cast a propertyvalue that raises a proper exception if the setting not exists.
4) If you leave the browser for a long time, and then resume authenticated behaviour you get an exception (AccessForbiddenException) including stack trace etc. Should be a login page that redirect back to the first page.

This is just not-so-polished right now. When remote users browse your site, they will get at least a stylish error page with only shows the message of the exception.
5) There is no validation of input (I just checked the Articles modules, so the

others may have it) that are passed via querystring, again this cause an exception trace page rather than an error page.

Do you mean the module adminstration here?
6) There is a problem in ServerControls.Calander, it doesn't handle dates whose format is "dd/mm/yyyy", etc. This is because the replace routice replace each 'd' or 'm' with '%d' or '%m' respectedly. So in the end the result looks like: 0303/0303/2005 1414:1515 (everything repeat itself twice). I hacked around this problem by replacing the convert time/date strings to loop over possible strings from the biggest to smallest. ("yyyy","yyy","yy","mmmm","mmm","mm","m"), etc.

Added to the list. I have to admit that the Calendar needs some more testing, especially with different cultures.
7) Deleting a section within a node doesn't work, the link is hooked to confirmDeleteSection, that just retrun confirm(...) without doing anything.

Is that so? I removed many Sections in the past and it always worked here (IE and Firefox). But... removing a Section should really be done with a linkbutton or something and not the way it works now :$. Added to the list :)
8) This one is more of a UI issue, but nodes are no clickable when you edit their sections, so there is no way to finish editing a section, and go back to the node, you've to click on the site and navigate downward.

Hehe, I always find myself clicking Cancel when I want to return to the Node. Works great, but perhaps the button should say 'Back' or something.
Sorry for such a big list,

No problem at all :)
# Ayende Rahien 3/4/2005 1:49 AM
martijnbThat's some great feedback, I really appreciate this! So now for the issues:

3) This is a matter of taste, but there are quite a bit of magic string (mostly relating to module setting) there, "ALLOW_COMMENTS", etc), this can cause a spelling error ("ALLOWS_ERROR") that are hard to find because the code look correct.

True, but this is pretty hard to avoid when using this kind of dynamic properties. Maybe I should add a method to the Section to retrieve and cast a propertyvalue that raises a proper exception if the setting not exists.

Didn't consider dynamic properties, actually, you are correct.
martijnb
5) There is no validation of input (I just checked the Articles modules, so the

others may have it) that are passed via querystring, again this cause an exception trace page rather than an error page.

Do you mean the module adminstration here?

No, just the normal site, pass ArticleId='t' and watch an exception coming your way :-)
Again, this is non-issue the moment you've error pages.
martijnb
7) Deleting a section within a node doesn't work, the link is hooked to confirmDeleteSection, that just retrun confirm(...) without doing anything.

Is that so? I removed many Sections in the past and it always worked here (IE and Firefox). But... removing a Section should really be done with a linkbutton or something and not the way it works now :$. Added to the list :)

Check the confirmDeleteSection, it doesn't do anything but display the messagebox.