Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Since ReUse is a set of common collaborative code frameworks designed to be a common code library with heavy focus on typical code reuse, so there is also a need for standard structs.

 

When you start to work with code, you will soon realize that most of the apps and common code use the same basic principles and lots of standard coding expressions that just need to be made standard and reusable.

One of common tasks for code app is to gather errors, messages and optionally a performance data using environment everywhere in code.

Errors may be discovered in your code itself or when dealing with external data (files, streams, SQL data storage etc.) or external frameworks - that is quite common.

Also there may be a need to collect info messages and even performance records for some time consuming operations to check and monitor the app bottleneck stats in runtime environment.

That's why we are using the special application level context in ReUse frameworks - "x". It contains all logging structs and is able to collect all logs if needed and optionally save it to some location if you wish.

 

Also when it comes to running code blocks there is a need to specify the code execution format - whether to use try/catch for errors, collect logs on error, get performance data.

This is where the special method context "m" is used in ReUse frameworks.

Using these contexts you can easily run code in the way you need it, collect all necessary logs data and manage your app really simple.

 

Also there is always some basic common methods and data used widely in all apps - get current datetime (local or utc), generate guids, create new arrays/collections with specified type - this is where a special common app struct - "_" is used in ReUse frameworks.