[ACCEPTED]-What is Component-Driven Development?-paradigms

Accepted answer
Score: 18

What is it?

I think the definition in your 22 answer covers this question well. Although, I 21 question why the definition includes that 20 a component needs to explicitly define its 19 dependencies. A canonical example of a 18 component is an ActiveX control - do they 17 need to explicitly define their dependencies?

What 16 problems does it solve?

Management of complexity. It 15 seeks to address that by allowing you to 14 only ever think about the implementation 13 of the component. One should only need 12 to author components, one should not to have 11 to think about how to combine or manage 10 them. That is done by some framework or 9 infrastructure external to the component, and 8 unimportant to the component author.

When 7 is it appropriate and when not?

Not necessarily 6 appropriate in a trival or throw-away application. The 5 bad smell in a component architecture, is 4 if you are spending time on thinking or 3 working on the infrastructure to manage 2 and combine components, rather than the 1 components themselves.

Score: 13

I am not sure it is a "widespread" terminology, but 21 in VCS (Version Control System), I know 20 of two ways to manage a set of files needed 19 to build a program:

  • system-based approach, where the all set has a common life cycle and must be tagged as a all
  • component-based approach, where individual set of files have their own life cycle, and where a meta-label references all the labels of the components to designate the all system by composition and dependencies between those components.

The applicative architecture is used to identify 18 those components:

  • functional domain and applications
  • third party libraries
  • frameworks

That is where IoC comes 17 in, since it is at the base of any framework. The 16 problem it solves is allow you to better 15 identify the part of your application:
Suppose 14 you design a PLR (Profit and Loss) application, in 13 charge to compute the gain and losses (position) of 12 a trader.
You would quickly realize it is 11 not a single application, but a composition 10 of several:

  • GUI
  • launcher
  • dispatcher (to dispatch the computation across several server, because one would not have enough memory to compute all!)
  • and so forth

You can then identify a computation 9 framework (Ioc) which would enable you to 8 plug-in your different modules, which then 7 are called at the right time by your framework.

Or 6 you can identify purely technical frameworks (KPI, logs, exception 5 managements) which can then be used by any 4 of your other functional components.

In term of project 3 management, that also allows you to develop 2 each part independently, while assuring 1 a global coordination through the VCS.

Score: 10

Component-Based Development is nothing really 88 new. I don't know of Component-Driven Development, but 87 I am going to assume it's CBD. It's how 86 Unix is designed, bunch of substitutable 85 small programs each doing one thing very 84 well. In desktop arena, Delphi's VCL has 83 been successful at using components with 82 rich reusable components and third party 81 market like no other. We are now seeing 80 the revival of the CBD as some technologies 79 are maturing. For example simple web apps 78 are evolving to SOA and RESTful WS. All 77 Java guys been talking about is modularity 76 and IoC.

The answer you are looking for likely 75 will be found in Why and what of Inversion of Control by Ke Jin.

Besides, the 74 imperative natural of these classic OO programming 73 languages tend to miss the forest (high-level architectures/structures) for 72 the trees (low-level logic control procedural 71 code). Development and maintenance engineers 70 taking over an existing application have 69 to rely on its out of date design/architecture documents 68 and low level code comments/patterns.

The 67 component-based development (CBD) paradigm 66 tackles the two issues above by shifting 65 plumbing logic into frameworks that manipulate 64 components and set up applications based 63 on users/developers provided declarative descriptions. Contrary 62 to the common confusion, such declarative descriptions 61 are not meant to be application setup scripts. Rather, their 60 fundamental intention is to explicitly express 59 application architectures/structures without mandating 58 their imperative plumbing procedures (namely 57 describe the what instead of the how). The 56 goal of CBD paradigm is to support effective 55 and flexible application compositions by these 54 frameworks and having application developers 53 focus on business logic and domain issues without 52 concerning low-level plumbing complexities.

CBD 51 frameworks that combine the declarative 50 application descriptions and the IoC technique 49 are referred to as IoC frameworks. Contrary 48 to their predecessors, IoC frameworks are non-invasive and 47 use the dependency/configuration injection/setting scenario.

According to Wikipedia, Component-Based 46 Development is an alias for Component-based software engineering (CBSE).

[It] is a branch 45 of software engineering, the priority of 44 which is the separation of concerns in respect of the wide-ranging 43 functionality available throughout a given 42 software system.

This is somewhat vague, so 41 let's look at more details.

An individual 40 component is a software package, or a module, that encapsulates 39 a set of related functions (or data).

All 38 system processes are placed into separate 37 components so that all of the data and functions 36 inside each component are semantically related (just 35 as with the contents of classes). Because 34 of this principle, it is often said that 33 components are modular and cohesive.

So, according to this 32 definition, a component can be anything 31 as long as it does one thing really well 30 and only one thing.

With regards to system-wide co-ordination, components 29 communicate with each other via interfaces. [...] This 28 principle results in components referred 27 to as encapsulated.

So this is sounding more and more 26 like what we think of good API or SOA should 25 look like.

The provided interfaces are represented 24 by a lollipop and required interfaces are represented 23 by an open socket symbol attached to the 22 outer edge of the component in UML.

alt text
(source: wikimedia.org)

Another 21 important attribute of components is that 20 they are substitutable, so that a component could be 19 replaced by another (at design time or run-time), if 18 the requirements of the initial component (expressed 17 via the interfaces) are met by the successor 16 component.

Reusability is an important characteristic 15 of a high quality software component. A 14 software component should be designed and implemented 13 so that it can be reused in many different 12 programs.

Substitutability and reusability 11 is what makes a component a component. So 10 what's the difference between this and Object-Oriented 9 Programming?

The idea in object-oriented programming 8 (OOP) is that software should be written 7 according to a mental model of the actual 6 or imagined objects it represents. [...]

Component-based 5 software engineering, by contrast, makes 4 no such assumptions, and instead states 3 that software should be developed by gluing prefabricated 2 components together much like in the field 1 of electronics or mechanics.

Score: 5

Here's my definition after doing some research.

Component-Driven Development is an approach in software development 11 in which code is fragmented into reusable 10 and testable components that are combined 9 together to form application foundation 8 for delivering business functionality. The 7 combination and management of components 6 is usually delegated to Inversion of Control Container.

A component 5 itself is a class that implements some service 4 contract and explicitly defines the dependencies 3 that it needs in order to fulfill this contract. Actual 2 implementation is hidden from everybody 1 else outside the component.

Related links:

Score: 5

I view Component-Based Software Engineering 13 as an approach to developing software systems 12 through the use of pluggable components; with 11 a component being "a unit of composition with contractually specified interfaces and explicit context dependencies only", which "can be deployed independently and is subject to third-party composition." (Clemens 10 Szyperski, "Component software : beyond object-oriented programming")

CBSE facilitates 9 code reuse and rapid assembly of flexible/adaptable 8 software systems.

There's a substantial research 7 that has been focused on this topic for 6 years. The flagship event (ACM SIGSOFT Symposium on Component Based Software Engineering) is in the 14th 5 year now and there are quite a few new trends 4 emerging.

Also, if you want a good example 3 of reusable, pluggable and extensible components, heavily 2 in use by industry today, take a look at 1 MS Enterprise Library.

Score: 1

If you're interested in combining components 18 (or other reusable assets) into applications 17 you should also take a look at the software product lines methodology.

In 16 a software product line the dependencies 15 between components (or lower-level code 14 elements) are explicitly managed outside 13 those components. This is typically done 12 using a feature model that contains rules such as

  • These two components must not be used together (mutual exclusivity)
  • If this component is used then this other component must be used or (interdependency)
  • Any combination of some specified set of components may be used (optionality)

Other 11 more complex rules are possible depending 10 on the complexity of the dependencies you 9 wish to model.

Another approach that is sometimes 8 used instead of feature modelling is to 7 use a code generator to configure the different 6 components that are to be assembled into 5 the finished application. It's also possible 4 to combine feature modelling with code generation.

Aside 3 from Code Generation, some other terms you 2 might search for as domain-specific modelling, model-driven 1 software development, software family.

More Related questions