Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Open Core Testi...Open Core Testi...Obsolete/Deprecated Methods Dropped in 6.0Obsolete/Deprecated Methods Dropped in 6.0
Previous
 
Next
New Post
4/11/2011 3:43 PM
 
Thanks Joe. That makes more sense now.


Dwayne J. Baldwin
 
New Post
11/3/2011 8:11 AM
 
cathal connolly wrote:
Bill, there is no plan to remove any obsoleted methods (though Charles is investigating moving them to a seperate assembly and using redirects to that so that the code is "cleaner") - if you find any such issues please log them as serious bugs. We'll be running the code through a build process to ensure that binary compatibility is maintained but please flag any you catch now so the CTP's can be tested with all 3rd party extensions.

 Cathal - GetTabPermissionsCollectionByTabId is definitely gone from DNN 6.

There is an entire block of deprecated methods in a 'obselete methods' region in TabPermissionController.vb in DNN 5.6.3, but TabPermissionController.cs in DNN 6 doesn't have this block of code.

I've seen a lot of forum posts about these missing methods, particularly to do with the Blog module.  I guess they were just deleted from DNN 6 and not replaced anywhere that I can find.

 
New Post
11/3/2011 10:06 AM
 
it was logged and fixed in 6.0.2 - http://support.dotnetnuke.com/issue/ViewIssue.aspx?id=17635&PROJID=2

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/24/2012 7:47 PM
 

I ran into this issue today with XmlEncode. It exists in both DotNetNuke.Common.Globals and was moved to DotNetNuke.Common.Utilities.XmtUtils (around version 3.x in 2005).

The trouble is that you cannot use both imports at the same time as the compiler sees an ambiguous reference. Unless the coder knows the specific issue and infers the proper namespace, there is a 50-50 chance of using the wrong namespace. Sure you can prefixthe function with XmlUtils.XmlEncode but that is just too much work for future code because we are holding on to something that should have been removed 7 years ago. In fact, keeping it around just encourages the opportunity to use the deprecated function wrapper.

This is a very common refactoring issue. A simple test is to rename to the function and rebuild the solution. As it stands DotNetNuke 6.2.1 is not affected, but it may affect third party modules. The resolution for the breaking change is adding a simple imports/using to DotNetNuke.Common.Utilitis.XmlUtils.

If you want to impress new DotNetNuke developers, we must clean up this mess.  Imagine from their point of view that adding a single imports/using statement breaks their code from compiling. As for seasoned DNN developers, I don’t think DNN has ever been released with a clean build without warnings (or pragmas to hide the actual coding problem).

This brings up a best practice or standard for documenting deprecated functions. Always include the version it was deprecated and a helpful hint of what namespace is to be used instead. Here are some examples I discovered in a few minutes:

Warning 'DotNetNuke.Entities.Users.UserMembership.Email' is obsolete:'"Deprecated in DNN5.1"'     
FAIL: What replaced it?
BETTER:'DotNetNuke.Entities.Users.UserInfo.Membership.Email deprecated in DNN 5.1Please use UserInfo.Email instead.'

Warning'DotNetNuke.Security.Roles.RoleController.GetRolesByUser(int, int)' isobsolete: '"Deprecated in DotNetNuke6.2."'       
FAIL: Please give us a hint.

Warning 'DotNetNuke.Security.Roles.RoleProvider.GetRole(int, string)' isobsolete: '"Deprecated in DotNetNuke 6.2. Roles are cached in the businesslayer"'
FAIL:  Business layer?  What? Where? Huh?

Warning  'System.Net.WebProxy.GetDefaultProxy()' isobsolete: 'This method has been deprecated. Please use the proxy selected for you by default. http://go.microsoft.com/fwlink/?linki...       
OK: That helps a bit.

What we really need is a standard such as

[Obsolete("Deprecatedin 5.0.  Please use `useful`instead." )]

Lastly, every new major version revision should eliminate EVERY obsolete function from previous versions. There is no excuse to keep these around unless you really want to cause grief and scare developers away.


Dwayne J. Baldwin
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Open Core Testi...Open Core Testi...Obsolete/Deprecated Methods Dropped in 6.0Obsolete/Deprecated Methods Dropped in 6.0


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out