11

I'm trying to figure out the most elegant way of bringing and together.

Obviously Ext has its own Ext.data.Store and Proxies to handle REST backends. Meteor has a publish/subscribe model which pushes updates automatically.

My first thought would be do write a custom "MeteorProxy" and to handle all the update events there. I'm not sure though this is wise in terms of filtering or sorting data. Ideally filtering should take place on the Meteor side because data sorts/filters ideally should persist across to other (non-ext) views of the data.

Would using MemoryProxy + some glue code be a better alternative?

Or are there newer ones as of ExtJS 5?

Lorenz Meyer
  • 19,166
  • 22
  • 75
  • 121
thomasf1
  • 1,782
  • 4
  • 18
  • 32
  • I'm not familiar with Meteor. I read that it's a Java framework. Is that right? Ext JS gives you the option to define a proxy (XML, JSON, etc..) within an Ext.data.Store object or an Ext.data.Model object. Are you just trying to get/set data from Meteor application server (Java code)? You should be able to create some RESTful web services for that and call those webservices from Ext JS. What exactly are you trying to do with the data between the two frameworks? – JustBeingHelpful Apr 29 '12 at 09:25
  • 1
    Hi there... Meteor.js is a javascript framework which spans server side JS (node) as well as client side JS. The data is "cached" on the client in a JS minimongo instance which provides mondodb like functionality on the client. – thomasf1 Apr 29 '12 at 11:25
  • So basically the Data is already on the client and it gets live updates when other users change things. – thomasf1 Apr 29 '12 at 11:26
  • The challenge is that there is basically a functionality overlap between the minimongo meteor JS storage and the Ext.data.Store. – thomasf1 Apr 29 '12 at 11:28
  • For Ext JS 3 and prior versions, you would need to make your own adaptor.js file (similar to ext-jquery-adaptor.js) to make another JS library function on the same page as Ext JS. Sencha provided them for common frameworks (JQuery, Prototype, YUI, etc..). In Ext JS 4, they discontinued the adaptor support. Instead, just reference your Meteor JS library below the "ext-all.js" reference. – JustBeingHelpful Apr 29 '12 at 19:30
  • 2
    can you describe this "functionality overlap"? In Ext JS 4, you don't have to use an Ext.data.Store anymore. You can put your proxy (JSON or XML) right into the Ext.data.Model class itself now. I don't know if that will help with fixing your issue though. – JustBeingHelpful Apr 29 '12 at 19:31
  • also, Ext JS 4 also has *-sandbox.js files, meaning you can run two different versions of Ext JS in the same page without confliction. I'm wondering if you can see what the sandbox files are doing and make your own so the proxies and stores work with your framework on the same page. Just trying to give you ideas since I don't have sufficient knowledge on this. – JustBeingHelpful Apr 29 '12 at 19:39
  • 1
    The functionality overlap is that normally Ext handles getting and storing the data as well as handling sorting and filtering of it... – thomasf1 Apr 30 '12 at 11:10
  • to me it seems [Ext.data.Store](http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Store) is still there in Ext4... – thomasf1 Apr 30 '12 at 11:11
  • however... "don't have to use" doesn't mean "is missing" – JustBeingHelpful May 01 '12 at 03:47
  • 1
    @Robert: in the meantime Meteor has evolved to be a recognized framework. Please consider re-opening the question. – Dan Dascalescu Aug 01 '14 at 00:25
  • ext already has all the tools you need. why do you want to integrate meteor in to it? – astroanu Jan 19 '15 at 04:09
  • @astro: ExtJS is only a client-side widget library with some features to fetch data from a server. But it doesn't come with any backend. Does ExtJS have automatic client-server data synchronization? No. Meteor does. – Dan Dascalescu Jan 31 '15 at 08:54

1 Answers1

3

It's been two years. Are you still looking at ExtJS specifically, or are you open to ExtJS alternatives?

If the latter is the case, check out my Meteor + Webix integration. Webix is a UI widgets library similar to ExtJS, but leaner, mobile friendly, and faster.

Community
  • 1
  • 1
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404