Giter Site home page Giter Site logo

BreezeJS support? about t4ts HOT 5 CLOSED

alexdresko avatar alexdresko commented on September 28, 2024
BreezeJS support?

from t4ts.

Comments (5)

cskeppstedt avatar cskeppstedt commented on September 28, 2024

Hello @alexdresko,

First of all, yes, the way I'm actually building the .tt file right now is extremely manual, I'm thinking of some way to automate this to make it easier for others to contribute to the project. I'm definitely ashamed that I haven't got around to fix that yet.

I am not familiar with BreezeJS actually, but I downloaded your gist and looked at the generated .d.ts-file. It seems that a getter/setter function for each property and an extends breeze.Entity for each interface is pretty much what you would like?

I have thought about some general way of abstracting the code generation. I reckon that it could be useful for other JS frameworks as well (for instance knockout, if you use the ko.mapping plugin). I haven't really come up with a perfect solution yet, but another interface attribute, such as TypeScriptBreezeInterfaceAttribute as you mentioned, and a code generator that is aware of how to format code for this type of interface, could definitely be the correct way to go.

from t4ts.

alexdresko avatar alexdresko commented on September 28, 2024

This all sounds great! You're right about the changes I made, but I'm definitely not enough of a Breeze expert to know all of the modifications that a TypeScriptBreezeInterfaceAttribute should make. Hopefully we'll hear more from the community on the subject.

One thing I failed to mention is that the modifications I made are actually to support both Breeze AND (at least partially) Knockout. Perhaps a final solution would require creating both a Breeze and a Knockout attribute for T4TS. My brain starts to spin a little when I think about fully supporting Breeze and Knockout at the same time though because I know TypeScript doesn't support multiple inheritance.

As a side note, I don't know that there's anything necessarily wrong with how you've structured the T4TS solution. If it works, it works. :)

from t4ts.

jmackay avatar jmackay commented on September 28, 2024

Is using @alexdresko 's files still the best way to go for breeze support?

from t4ts.

alexdresko avatar alexdresko commented on September 28, 2024

It has worked for me so far, but it has since fallen a couple of releases behind T4TS, I believe. I'd really love if @cskeppstedt could provide some official integration as mentioned in his original reply. I'd gladly help if I knew the best place to start.

from t4ts.

cskeppstedt avatar cskeppstedt commented on September 28, 2024

Hey guys, yeah It's my plan, unfortunately I haven't found the time to focus on this yet. In the meantime, go with @alexdresko's way, and I hope I'll get around to actually come through with this soon!

from t4ts.

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.