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 694815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:53:43+00:00 2026-05-14T02:53:43+00:00

I’m working with MEF right now, but the answer I’m looking for probably is

  • 0

I’m working with MEF right now, but the answer I’m looking for probably is irrelevant to MEF — it’s all dependency injection — I’m just using MEF terminology as an example here.

Short background story, I read this article over at MSDN with focus on Composite Applications

In this figure there’s three things, the shell, the application services and the modules. So that’s a composite application.

alt text
(source: microsoft.com)

What I don’t fully get is the application services part. What’s the service, what does it look like? How do you expose a service through a module and how do you consume a service from a different module?

I’d really like to see some neat small code examples, nothing fancy but something to illustrate how all this comes to life (the application services part).

  • 1 1 Answer
  • 0 Views
  • 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-14T02:53:43+00:00Added an answer on May 14, 2026 at 2:53 am

    Application Services, as far as MEF is concerned, are just another composable part. Any interface or class you can compose can act like a service.

    Each service will have some interface or base class you want to implement. You can do these en masse via some type of IService interface (and use [ImportMany] to import them all), but often, you’ll want different service types.

    You’d then import this, as required, into your classes. For example, say you have a common interface library for services, and you provide:

    public interface IDataRepostory
    {
         public IList<MyType> MyTypes { get; }
    }
    

    You can then have a separate library export specific types:

    [Export(typeof(IDataRepository))]
    public class Repository: IDataRepostory
    {
        // implement interface for this specific "service"
    }
    

    Your main program would then be able to import this as needed, and write code against it. For example, say you wanted to display customers, you’d need to load the customers from your data layer. If you wanted to load via your repository, you could import the repository into a specific portion of your application:

    public class CustomersViewModel
    {
         [Import]
         public IDataRepository
         {
             get; set;
         }
    
         // ...
    }
    

    You’d then get this service composed directly into your application.

    This is considered an “Application Service” because it’s an application specific implementation of some generic service – it’s not a view related component, and it may be used throughout your application.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into

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.