Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The file reader is very simple example of component to read in files. If you have not done so already please have a read of A brief history of Iguana to understand the design philosophy here.

 The configuration interface

There is only one field to configure - the SourceDir. This is the directory that the component feeds from.

 What! That's not very configurable!

😅 No lol - it’s not is it.

In the first version of this component we did have more configuration fields on it. But taking a step back and thinking from an operations perspective it seemed like the most important field was the source directory.

If I am an operations person, then this is what I need to look at if there is a problem. Everything else just seemed like noise.

 What files does it match?

The file matching logic is deliberately isolated in it’s own file which we can see here:

https://bitbucket.org/interfaceware/fromfile/src/main/MatchRules.lua

Why do we put this logic in it’s own file? It’s applying a concept call Separation of Concerns. We simplify code and make it easy to understand by separating it into its own file.

Looking the code you can see that this code will only match files with the extensions hl7, log and txt.

If you need to change it then you have a very simple obvious place to go.

 It does not do what I want to do!

It’s not really intended to be all things to everyone. It is however a very simple starting point to open up and customize to what you really need.

You can see the source code for it right here:

https://bitbucket.org/interfaceware/fromfile/src/main/main.lua

It’s deliberately simple to make the code non intimidating to alter and customize.

 Argh I need help !!

Reach out! Lets talk about what you need to do.

We are here to help.

We are genuinely interested in getting a real understanding of the kinds of problems that customers need to solve.

There are a variety of ways we might help you.

  • It could be by improving our educational resources around using Lua.

  • Perhaps there is a real repeatable need which may make it sensible to build a new component

 How does this work out in the long run?

In the long run we expect larger customers operating at scale will probably find it benefits them to curate their own ‘standard’ component set.

These are components which mean their typical needs based on the needs of their organization.

We also expect there will be areas where we develop new components that fit well defined common use cases. Cases that meet the needs of thousands of interfaces.

Hope that helps and do free to reach out and talk with us.

  • No labels