GithubHelp home page GithubHelp logo

sad-ko / data-plug Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8 KB

A somewhat easy example of how to use shared libraries and it's benefits.

License: MIT License

Makefile 3.67% Shell 6.38% C 89.96%

data-plug's Introduction

[DATA-PLUG] - A C example of how to utilize shared libraries

About this program

What is [DATA-PLUG]?

[DATA-PLUG] is a sort of simplified data fetcher from databases installed as plugins.

What is [DATA-PLUG] propose?

[DATA-PLUG] is a somewhat easy example of how to use shared libraries while showing the benefits of them.

How exactly does it achieve that?

This example utilizes the ability of dynamically loaded library as plugins for our program, with the benefit of adding functionality to it.

The logic behind

Every database API is installed as a .plugin (how to compile them as this is shown in the Makefile) inside the plugins folder, their APIs are limited only to these functions: [get_info, get_name].

[get_info]:

Its declaration is as follow: char* get_info(const char* search)

It should find all the information related to the searched word and formated as desired, but it must be returned as a string allocated in the heap (for this we have the handy macro create_string insde the header plugins.h).

[get_name]:

Its declaration is as follow: char* get_name()

Its only purpose is to return the database name.

TODO

  • More documentation.

data-plug's People

Contributors

sad-ko 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.