Coder Social home page Coder Social logo

Comments (7)

pepicrft avatar pepicrft commented on June 20, 2024

@fjbelchi take a look to the idea above!

from sugarrecord.

fjbelchi avatar fjbelchi commented on June 20, 2024

I've been thinking about the stack and the syntax and I think the core of the library, the focus, should be in the syntax more than the technology behind, either CoreData, SQL, any other.. at the end of the day these tools are tools to persist data.

I would like to have operations with a syntax similar to what you describe like this, without necessary be depending on CoreData:

db.person.filter(person.id == "234234234").delete()
db.person.create(personType).save()

from sugarrecord.

pepicrft avatar pepicrft commented on June 20, 2024

Yeah!, that's the idea @fjbelchi , when you do something like this

Person.by("name", "Pedro").sorting("age", ascending: true).first().find

This is completely transparent for the user. Where do you find the dependency with CoreData?

from sugarrecord.

fjbelchi avatar fjbelchi commented on June 20, 2024

that example is perfect, but I've seen others like:

Person.by("name", "Pedro").sorting("age", ascending: true).last().find(context) 

where you need to know about a context. And probably the consumer doesn't know about the stack either

from sugarrecord.

pepicrft avatar pepicrft commented on June 20, 2024

Yes @fjbelchi because although you make it simple for the basic user, we're going to have advanced users that probably want to decide in which context do the fetch for example.

from sugarrecord.

pepicrft avatar pepicrft commented on June 20, 2024

MagicalRecord offered at first only one stack and they had to move to a new architecture where they allowed advanced and custom stack. I guess it is because developers asked for it. So although we make the syntax more sugar, we always have the simplest one that uses the stack without asking to the user, and the advanced where the user decides even the context. What do you think?

from sugarrecord.

pepicrft avatar pepicrft commented on June 20, 2024

Covered in this issue:
#5

from sugarrecord.

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.