Code Monkey home page Code Monkey logo

Comments (1)

Blondwolf avatar Blondwolf commented on July 18, 2024

Two subjects here first. More can be added.

  1. Thinking about entrypoint and Main

In Main, start() is just the main entrypoint. I know the Obsidian sample plugin treats Main similar to how I treat ObsidianIcalPlugin. However I wanted ObsidianIcalPlugin to only deal with the Obsidian integration, and Main to be the entrypoint to the business logic of the plugin.

The question here is to know if creating a new Main dedicated main for the plugin is an overkill. I think it is not really a problem for the moment and with the actual plugin scope. Maybe the problem could belong then to registering to specific events. If you want to add more logic as unload then you have to call a new function in your main like unstart or whatever. The problem is then you need to reference all functionnalities where this is already built in the extends Plugin.

Though, I can understand the will to separate the whole settings management from the plugin logic.

I am not sure either this is a good idea to change that right now. Also new to Obsidian plugins so don't the real standards. We will see by doing I think. We should keep it as is for the moment.

  1. About some class roles

createTaskFromLine() is a factory method to generate Tasks from strings. I agree that passing settings around like that is not ideal.

So I think it make sens and not much changes to move this function to TaskFinder directly as it's more his role to extract the information than the Task class itself. Task class should keep to be only a model. The only thing you could add like that in the model is a copy constructor but it's YAGNI right now.


So all you should do right now it some moving this createTaskFromLine

from obsidian-to-ical-plugin.

Related Issues (20)

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.