Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 259667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:17:00+00:00 2026-05-11T22:17:00+00:00

I have a complex RIA client that communicates with a WCF SOAP web service,

  • 0

I have a complex RIA client that communicates with a WCF SOAP web service, the second a being the operative word. This has resulted in a dreaded god class containing 131 [OperationContract] methods so far and even more private methods.

Personally, I don’t have a problem with this; I use search and the navigation features of Visual Studio to very easily find my way around the class. The other developers, however, are suffering due to this. They’re the sorts that slowly scroll around looking for things (it’s annoying to watch). I #regioned the class up into sections, but I’m the only one that seems to enjoy the benefits of this (they’re of the seemingly-more-common #region-hating camp).

So, to be nice to the other programmers, and maybe enjoy some resultant benefits I’m unaware of, I want to refactor the monster. Here’s the options I see available:

Option 1: Fragment the web service into separate services

What I don’t like about this is it would break my client code. I would have to rewrite it to use the new proxy classes. Additionally, I would also have more WCF configuration to maintain (yuck!). Also, there might be custody battles for where shared private methods should belong.

Option 2: Use partial classes

This idea seems appealing to me. What I would do with this approach is have each source file (not too many of them) represent a functional division of the web service. For example:

MyService.svc.cs
MyService.AccountManagement.svc.cs
MyService.Preferences.svc.cs
MyService.MediaManagement.svc.cs

I worry a bit about this approach, because at a former company when I raised this as a possibility, one developer said it was a bad idea due to some nebulous “there are issues with partial classes” reason. I never got a better explanation than this, but I took his word for it.

Option 3: Something I haven’t considered

I assume that it’s not uncommon for a complex web service to create god classes such as these, so there must be some good practice approaches I’m unaware of. What techniques do y’all use to make your web service classes easier on the eyes?

Update

Thanks everyone for your input. I wish I could accept more than one answer.

I’ve read through your answers, discussed things with the development team, and for now, we’re simply going to reorganize the service into partial classes. I’ll leave comments on the other suggestions to explain why I’m not taking those approaches, at least for now. You all have given me some valuable things to think about for future development.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:17:00+00:00Added an answer on May 11, 2026 at 10:17 pm

    If you can refactor your service into separate partial class files that each encapsulates a certain amount of related functionality, you could as well refactor your service into separate classes that encapsulate this functionality. Your service would become a mere façade for these classes and their functionality.

    Sometimes this won’t be feasible and will complicate things even further, but you’re the one to call cards here since you know your code base. In this case (after giving it a good brainstorming session with analyst developers), partial class files can still be a better option.

    One thing is for sure. Your service must be refactored. (Edit: Code is not just for execution but also for maintenance. If it’s hard to find your way around it’s definitely not maintainable.)

    And about that partial class issues. I wouldn’t consider this a valuable comment until it’s backed up by some real fact why they are an issue.

    About refactoring
    Think of your service as a web application user interface. Just like web applications use BLL classes an their encapsulated functionality related to single problem/aspect of the whole solution, so should be your web service. It should be an interface that also uses BLL classes and their atomic functionality. It’s just not visual interface but rather API.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 143k
  • Answers 143k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Why don't you redirect user back do List Businesses page… May 12, 2026 at 8:26 am
  • Editorial Team
    Editorial Team added an answer There is sort of a way to turn off the… May 12, 2026 at 8:26 am
  • Editorial Team
    Editorial Team added an answer You need to use the CASE expression, like so: UPDATE… May 12, 2026 at 8:26 am

Related Questions

I have a complex query with group by and order by clause and I
I have a complex .NET Remoting server app that provides a couple of services.
I have a complex command that I'd like to make a shell/bash script of.
I have a complex sharepoint deploy with multiple EventReceivers and Workflows. I also have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.