Coder Social home page Coder Social logo

fcl's Introduction

The FCL Language (Flexible Configuration Language)

Motivation

The development of FCL (Flexible Configuration Language) is driven by the need to simplify and enhance the process of creating and managing complex configurations. In modern development environments, configurations often become intricate, involving various data formats and nested structures. FCL is designed to address these challenges by providing a unified, flexible language that integrates seamlessly with Integrated Development Environments (IDEs). The primary goal is to offer developers an improved editing experience, enabling better syntax highlighting, auto-completion, formatting, and error diagnostics directly within their IDE. By doing so, FCL aims to reduce the complexity and time involved in configuration management, allowing developers to focus more on their core development tasks.

Overview

FCL streamlines configuration file creation and management, offering direct use of keys as tag names and supporting a variety of data types. This specification includes the ability to embed JSON and YAML strings, identified by their MIME types text/json and text/yaml, facilitating seamless IDE integration for editing, retrieving, and managing configurations.

Document Structure

Configurations in FCL are defined within a <config> root element. Child elements represent individual configuration entries, leveraging the key as the tag name for direct access and clarity. Mark its mime type via fcl:type

Basic Structure Example

<config>
    <key fcl:type="TYPE">
        <!-- embedded data -->
    </key>
</config>

Supported Data Types

FCL supports a wide range of data types, including

  • text
    • text/json
    • text/yaml
  • number
  • object
  • array

By default, types can be omitted and are inferred

Data Type And Automatic Inference Examples

String and Number

<config>
    <username>JohnDoe</username>
    <age type="number">30</age>
</config>

the type of username is text

Object

<config>
    <userInfo>
        <name>John Doe</name>
        <age fcl:type="number">30</age>
    </userInfo>
</config>

the type of userInfo is object and name is text

Array

<config>
    <usernames>
        <>User1</>
        <>User2</>
    </usernames>
</config>

type of usernames is array

Embedded JSON and YAML

<config>
    <userProfile fcl:type="text/json">
        {
            "name": "Jane Doe",
            "age": 29
        }
    </userProfile>
    <projectConfig fcl:type="text/yaml">
        name: Example Project
        version: 1.0
    </projectConfig>
</config>

IDE Integration Features

FCL is designed for seamless integration with IDEs, offering:

  • Syntax Highlighting: Tailored for a wide array of data types including embedded JSON and YAML.
  • Auto-Completion and IntelliSense: Offers suggestions based on the scope, enhancing editing efficiency. demo1
  • Formatting: Applies data type-specific formatting rules for a uniform and readable configuration file. demo
  • Hover Information and Diagnostics: Provides detailed tooltips and validates configurations in real-time.

Security Considerations

FCL implementations must include safeguards against security vulnerabilities and validate configuration data to maintain integrity.

Extensibility

The design of FCL allows for the addition of support for more MIME types and data formats, ensuring adaptability to future requirements.

Conclusion

By supporting direct embedding of JSON and YAML strings along with native XML-like configuration entries, FCL presents a robust, flexible configuration language. This approach enhances developer productivity through straightforward configuration management and comprehensive IDE integration, directly aligning with the motivation to improve the editing experience for complex configurations.

fcl's People

Contributors

wangxi761 avatar

Stargazers

lizuncong avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.