Giter VIP home page Giter VIP logo

uniffi-dart's People

Contributors

bitfriend avatar chavic avatar gnunicorn avatar gtalha07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

aaronisme chavic

uniffi-dart's Issues

Thoughts on refactoring

Thus far, most of the code is rather procedural, and it leads to a lot of code structural repetitions and increases the amount of code needed to implement the rest of the features.
So, to fix this, I'm thinking of doing a few things right... In a nutshell, I add more Traits and Structs then separate the code that does rendering and make it dumber (more reusable).

So far I've identified these as the most important...

[ ] Turn BindingsGenerator into a DartWrapper struct, later on, this struct will be responsible for handling external types, but right now contains the base
[ ] Add a DartCodeType Trait, mainly to contain the common functions that need to be called when generating any type and relies on DartCodeOracle for some of these
[ ] Adding a DartCodeOracle Struct, this struct knows rules dart specific rules
[ ] A way to convert all the UniFFi types into a code their DartCodeTypes with an AsDartCodeType
[ ] DartRender or maybe DartGenerate Trait that knows how to render specific types using information from DartType, and DartOracle
Let me know your thoughts and ideas, or need to change priorities...

Restructure types for futures

by @chavic :

So far I've identified these as the most important...

  • Turn BindingsGenerator into a DartWrapper struct, later on, this struct will be responsible for getting handling external types, but right now contains the base
  • Add a DartCodeType Trait, mainly to contain the common functions that need to be called when generating any type and relies on DartCodeOracle for some of these
  • Adding a DartCodeOracle Struct, this struct knows rules dart specific rules
  • A way to convert all the UniFFi types into a code their DartCodeTypes with an AsDartCodeType
  • DartRender or maybe DartGenerate Trait that knows how to render specific types using information from DartType, and DartOracle

Let me know your thoughts and ideas, or need to change priorities...

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.