cancel
Showing results for 
Search instead for 
Did you mean: 

how to arrange function point into ccl file in ESP?

Former Member
0 Kudos

hello everyone:

I have questions to ask. In a ESP project ,we develop many function point  in a project ,whether we can place all function points into one ccl file. In this way above, what problems are existed ? If there are problems ,how can we resolve them?  This is an another question? what is the best practice in developing CCL project?

Accepted Solutions (0)

Answers (1)

Answers (1)

JWootton
Advisor
Advisor
0 Kudos

I'm not quite sure what you mean by function points - whether your are referring to user-defined functions or stream/window operators.  But either way:

- you can define custom functions in CCL using CCL Script

- these function definitions can be in the main project ccl file or they can be in one or more ccl files that get imported

- the same can be true for stream/window operators or modules

So in building a streaming project,  while you can have everything in one CCL file, for largeer projects, or where you have re-use between projects,  it can be useful to break the project out into multiple CCL files and use the CCL IMPORT statement to include other CCL files into the main project file.

Modules and functions are excellent candidates for re-use:  you can define re-usable functions and modules in one or more ccl files that are then shared among multiple projects

In terms of "best practices",  it really doesn't matter what approach you take:  it's really just structuring your projects in a way that makes them easy for you to manage.

Former Member
0 Kudos

Hi,

The term function point might be a term from the "custom application development industry" here.

It is sort of a unit of work or task indicating estimated amount of work and complexity of the application, i.e. it will take 5 fp's to implement this feature and 3 fp's to implement that feature. Function Point analysis would then give an indication how much would be required to develop an application and could also be used to compare tools (showing if an application would be easier to implement in this tool that in that tool). The term might be more closer to the term "man hour" but is more oriented towards describing the task with it's complexity and size to be done than to the amount of time to be spent.

If a large project is being developed, putting everything in one large .ccl file doesn't look the way to go. ESP has modules, my preference would be a logical partitioning that also allows the modules to be separately tested\developed. But it is also lean developed like in RAD. Developing a large framework in ccl does not look appealing either, and not just for efficiency, might be a trap one can fall into.

JWootton
Advisor
Advisor
0 Kudos

Thanks Ben - that's good insight.  And after reading your comments,  one other thing occurred to me to mention:

Beyond breaking a large project up into multiple CCL files,  for very large projects you may also want ot consider implementing them as a "network" of projects rather than a single project.

Let me explain:

Above,  Ben and I were focused on the ability to define blocks of CCL in several different files that are then combined into a single project at compile time using the CCL IMPORT statement.  This is very useful for maintainability of the source, for re-use across projects, and for team development.  But it still results in a single, large project.

You also have the ability with SDS and ESP to run multiple projects that interconnect using bindings: an input on a project gets "bound" to the output of another project.  This has several benefits:

- A single project runs on a single host.  The project is thus constrained by the capacity of the host. Whereas projects can bind across machien boundaries - so if a project is running up against the capacity of a host, you can break the project into two or more inter-connected projects and run them on a multi-node cluster, with each project running on a different host in the cluster.

- You also have the ability to stop/start/restart individual "sub-projects" (though take care that you understand the impage this will have on the connected project(s) that will still be running

Former Member
0 Kudos

Thank you very much.

But I also have a question.In a project ,I define several ccl files, such as file1.ccl,file2.ccl,input.ccl and output.ccl. File1.ccl and file2.ccl import the input file.ccl . Output.ccl imports the file1.ccl and file2.ccl .In this situation, how to avoid redefinition?

JWootton
Advisor
Advisor
0 Kudos

If you want to import a ccl file more than once into a project, then you need to create a module.  Using the CCL  CREATE MODULE statement,  you can encapsulate a section of CCL within a module.  The module can then be instantiated multiple times within the parent project.

So what you describe above won't work without using modules, because if file1 and file2 both import input.ccl, and then are both imported by the same parent, you will now have duplication - i.e. in a CCL project all streams/windows need to have unique identifiers. 

But, if you enclose the contents of input.ccl within a module,  and have file1 and file2 each create instances of the module (using different identifiers) then you can import both into output.ccl.

former_member217348
Participant
0 Kudos

Perhaps provide your ccl and/or diagram of logic and data flow. It may help with determining alternatives.