Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# scottell 2/3/2006 1:43 PM
I am not terribly familiar with the asp.net paradigm or cuyahoga, so let me ask: has anybody attempted to subclass a cuyahoga module?

For example, I am in need of module which is similar to the Articles modules, but which contains additional functionality and attributes. Rather than create a new module and copy the bulk of code into it, it seems the .Net way would be to extend the existing module.

Is this feasible? thoughts?

Scott
# martijnb 2/3/2006 3:19 PM
You could possibly subclass the ArticleModule class, but with that you create a dependency to the module and that's very dangerous. A little change in the Articles module could easily break the subclassed module.
# mgaerber 2/4/2006 2:27 AM
Hi sottell,

this sounds like going into the wish list's "content abstraction" direction.

Maybe you could post, what you think common needs would be, e.g. why you chose the articles module.

Then we could use the wiki to collect the features/functions needed by most of the modules (categories, versioning, search, content approval, content expiration etc.)
# martijnb 2/4/2006 6:23 AM
I'd like to second mgaerber here. The content abstraction that is planned would do a lot to make your life easier.
# scottell 2/4/2006 9:31 AM
I guess how I see this is:

Have a cuyahoga module ( now called Articles) that is a base for user driven content. Because it is highly unlikely that the Article module as it is will exactly do what everyone needs it to.

Say I have a site in which users can create articles reviewing restaurants. I want to add attributes like the address, type of food, the review (i.e. 5 stars or whatever). Then maybe I want other custom functionality like having the comments on the article refer to other similar restaurants.

Basically, instead of having stove pipe modules, have a way that they can be hierarchical. That way improvements can move upstream and everyone will benefit.
# martijnb 2/5/2006 10:06 AM
Yes, that's exactly what the content abstraction is about. In your example, you'll have the class 'Review' that inherits 'ContentItem'. Review gets the attributes like the address, type of food, the review, but can use everything else from ContentItem (Author, comments etc.).