Is it feasible to use one or more EAV schemas behind a knockout/upshot/MVC 4 SPA? Can you bind to attributes in a reasonable fashion, or only to first-class table columns?
The SPA can be applied whenever you are able to expose classes related to a Context. You can also "Fake" a Context with in memory data, but then the data retrieval performed on the IQueryable you expose is not so efficient.
In order to have an Efficient use of EAV, you should be able to expose your EAV information as classes. This is a big problem if new attributes can be created dynamically...since in that case you will not have well defined types....In theory you might use
reflection to manipulate dynamic data types...but then you should interface all this with the IQueryable interface. While, all this might also be possible in theory...doing it in practice is quite impossible for the big work required.
The only serious possibility I see is considering the tuples of the EAV model themselves as your domai entities, and operating with them...However, also manipulating this stuffs from javascript...with validation...is quite a difficult task.
Maybe you might play with WebApy and dynamic objects to send to your client "javascript object" you are ablo to build from your EAV information. However, in this case forget about upshot...you can of course use knockout without upshot
The value to EAV of course is its dynamic nature, which means dynamic attributes. Was hoping to leverage EAV during prototyping, then go to stronger typing after a number of rapid iterations as the domain is explored.
abadincrotch
Member
283 Points
88 Posts
Do MVC 4/KnockoutJS/Upshot.js map well to EAV schemas?
Apr 07, 2012 04:34 PM|LINK
Is it feasible to use one or more EAV schemas behind a knockout/upshot/MVC 4 SPA? Can you bind to attributes in a reasonable fashion, or only to first-class table columns?
MCTS: Service Communication Applications
francesco ab...
All-Star
20912 Points
3279 Posts
Re: Do MVC 4/KnockoutJS/Upshot.js map well to EAV schemas?
Apr 07, 2012 05:14 PM|LINK
The SPA can be applied whenever you are able to expose classes related to a Context. You can also "Fake" a Context with in memory data, but then the data retrieval performed on the IQueryable you expose is not so efficient.
In order to have an Efficient use of EAV, you should be able to expose your EAV information as classes. This is a big problem if new attributes can be created dynamically...since in that case you will not have well defined types....In theory you might use reflection to manipulate dynamic data types...but then you should interface all this with the IQueryable interface. While, all this might also be possible in theory...doing it in practice is quite impossible for the big work required.
The only serious possibility I see is considering the tuples of the EAV model themselves as your domai entities, and operating with them...However, also manipulating this stuffs from javascript...with validation...is quite a difficult task.
Maybe you might play with WebApy and dynamic objects to send to your client "javascript object" you are ablo to build from your EAV information. However, in this case forget about upshot...you can of course use knockout without upshot
Mvc Controls Toolkit | Data Moving Plug-in Videos
abadincrotch
Member
283 Points
88 Posts
Re: Do MVC 4/KnockoutJS/Upshot.js map well to EAV schemas?
Apr 07, 2012 05:39 PM|LINK
The value to EAV of course is its dynamic nature, which means dynamic attributes. Was hoping to leverage EAV during prototyping, then go to stronger typing after a number of rapid iterations as the domain is explored.
MCTS: Service Communication Applications
bruce (sqlwo...
All-Star
36894 Points
5452 Posts
Re: Do MVC 4/KnockoutJS/Upshot.js map well to EAV schemas?
Apr 08, 2012 03:54 AM|LINK
as EVA's easily map to JSON/BSON objects, it should be trival to use backbone.js or any other observer pattern in javascript.
if you are using jquery mobile, look at m-project which is a client side MVC library that would bind to an EVA easily.
abadincrotch
Member
283 Points
88 Posts
Re: Do MVC 4/KnockoutJS/Upshot.js map well to EAV schemas?
Apr 09, 2012 02:53 PM|LINK
Thanks, wasn't fully up to speed on how observables work, they're a lot more straightforward and dynamic on the clientside than I'd thought:
http://knockoutjs.com/documentation/observables.html
MCTS: Service Communication Applications