locked
C# is a Component Oriented Language? RRS feed

  • Question

  • Could anyone Explain me, How we say that C# is Component Oriented Language with Suitable Real Time Examples
    With Regards, Maha
    Monday, June 20, 2011 7:29 AM

Answers

  • I don't think you need any addons to use C# for component-based programming, since it has everything necessary to write components:

    • Attributes
    • Properties
    • Events
    • Interfaces

    That's basically all you need for a component-based architecture.

    However, C# itself is a multi-paradigm language, so it would be incorrect to characterize it as just a component-based language.
    • Proposed as answer by Arif Sarwar Monday, June 20, 2011 11:38 AM
    • Marked as answer by Aspen VJ Wednesday, June 29, 2011 1:32 AM
    Monday, June 20, 2011 8:54 AM
  • I think Matthew has the right idea.

    C# could be called Object Oriented (strong encapsulation, etc), or Functional (lambda expressions, LINQ), Component-based, or any number of other paradigms. Really, this is my favorite part about it. In Java, I have to use Java for the bits of the application for which pure OO makes sense, then switch to Scala for sections where I want functional. In C#, I can use one language for all of it.

    • Marked as answer by Aspen VJ Wednesday, June 29, 2011 1:32 AM
    Monday, June 20, 2011 2:57 PM

All replies

  • Hi,

    I wouldn't say that C# is a component oriented language. Maybe it is possible (with some addons) to use C# in a component based development but pure C# with the stuff .Net gives us does not allow it (my personal opinion).

    Just have a look at http://en.wikipedia.org/wiki/Component-based_software_engineering - there you also find a comparison to object oriented development (In which category c# fits!).

    With kind regards,

    Konrad

    Monday, June 20, 2011 8:40 AM
  • I don't think you need any addons to use C# for component-based programming, since it has everything necessary to write components:

    • Attributes
    • Properties
    • Events
    • Interfaces

    That's basically all you need for a component-based architecture.

    However, C# itself is a multi-paradigm language, so it would be incorrect to characterize it as just a component-based language.
    • Proposed as answer by Arif Sarwar Monday, June 20, 2011 11:38 AM
    • Marked as answer by Aspen VJ Wednesday, June 29, 2011 1:32 AM
    Monday, June 20, 2011 8:54 AM
  • I think Matthew has the right idea.

    C# could be called Object Oriented (strong encapsulation, etc), or Functional (lambda expressions, LINQ), Component-based, or any number of other paradigms. Really, this is my favorite part about it. In Java, I have to use Java for the bits of the application for which pure OO makes sense, then switch to Scala for sections where I want functional. In C#, I can use one language for all of it.

    • Marked as answer by Aspen VJ Wednesday, June 29, 2011 1:32 AM
    Monday, June 20, 2011 2:57 PM
  • On 6/20/2011 4:40 AM, Konrad Neitzel wrote:
    > Hi,
    >
    > I wouldn't say that C# is a component oriented language. Maybe it is
    > possible (with some addons) to use C# in a component based development
    > but pure C# with the stuff .Net gives us does not allow it (my personal
    > opinion).
    >
    > Just have a look at
    > there you also find a comparison to object oriented development (In
    > which category c# fits!).
    >
    > With kind regards,
    >
     Your link has this in it.
     
    <copied>
     
    Software engineers regard components as part of the starting platform
    for service-orientation. Components play this role, for example, in Web
    Services, and more recently, in Service-Oriented Architecture (SOA) -
    whereby a component is converted[by whom?] into a service and
    subsequently inherits further characteristics beyond that of an ordinary
    component.
     
    <end copy>
     
     
    <copied>
     
    WCF is meant for design and deploying distributed applications under SOA
    implementation.
     
    WCF is designed in accordance with service oriented architecture
    principles to support distributed computing where services are consumed
    by consumers. Clients can consume multiple services and services can be
    consumed by multiple clients. Services are loosely coupled to each
    other. Services typically have a WSDL interface (Web Services
    Description Language) that any WCF client can use to consume the
    service, irrespective of which platform the service is hosted on. WCF
    implements many advanced Web services (WS) standards such as
    WS-Addressing, WS-ReliableMessaging and WS-Security. With the release of
    .NET Framework 4.0, WCF also provides RSS Syndication Services.
     
    <end copy>
     
    I think that VB and C#.NET meet the requirements for Component Oriented
    Languages.
     
    Monday, June 20, 2011 5:54 PM
  • I think everyone here is forgetting about the built in .Net support for building a component oriented system. This has probably been one of the few most underutilized aspects of the .Net framework. Also, component orientation is purported to be language agnostic. Enter the inter-compatibility of the CLR languages. This isn't about C# so much as it is about the CLR and the libraries provided. There is some significant glue out there already that many people have yet to see for the first time.

     

    The .Net framework provides IComponent. Say, what's that, huh? ;)

    Additionally, if you're familiar with MEF, it's no coincidence that it's inside the System.ComponentModel namespace hierarchy.

    Check out the following links.

    Programming With Components
    http://msdn.microsoft.com/en-us/library/0ffkdtkf.aspx

    Authoring Components
    http://msdn.microsoft.com/en-us/library/5dya64wy.aspx

    Pipeline Support
    http://msdn.microsoft.com/en-us/library/bb384200.aspx






    Wednesday, June 29, 2011 10:02 PM