Leveraging Ember with Enyo? - ember.js

I am starting to evaluate frameworks for a HTML5 app. I really like the enyo model for developing an app. However, my app needs an object-relational mapper (ORM) for local storage and some way to update the UI based on changes in the ORM data.
It looks like Ember has some great linkages for the ORM and update parts.
Has anyone used these two together? Does it makes sense or do either of them (by themselves) already address the entire problem space?
Thanks in advance,
Charlie

I've not tried to integrate them directly yet, but I think that the Enyo event model would work well here. Have the ORM live as a top-level component in your application and have it broadcast data change messages into your tree of components using enyo.waterfall() or enyo.waterfallDown().
I do something similar in a cryptogram game I'm working on where I use that mechanism to broadcast information about the player's guesses into the view tree where individual cells use them to modify their display.

Related

Creating and annotating simple geographical maps in Django

I am looking for a simple way to create geographical maps in Django, in which I could then select, highlight and annotate countries or groups thereof.
"Annotate": insert a label displaying textual information about the said country.
Is there anything that comes to mind?
Many thanks
EDIT: I checked GeoDjango already and it looks like much work in order to get where I need to. Don't get me wrong: I'm not trying to minimize my own investment in learning new tools, but for this project, I have a trade-off between time allocated to learning and the relative importance of this geographical feature in my app. It's more of a nice-to-have feature I'd like to add to an already 'complete' app. So I wondered whether there exists a 'simpler' python library for this task.
I think this is more of a question for if there is a front-end library to elegantly handle this. However if you need to generate the maps you could try something like this
https://kartograph.org/
I have personally used this http://jvectormap.com/ and found it to be really good.
In your database you could just have a Countries model with any associated information you might need to display, and create a view to handle that appropriately.

Master-Detail (parent-child) Input form with Admin-on-rest

I need help/recommendation for creating an order like input form with MASTER inputs like (order no, date, customer name, address) along with DETAIL info in multiple rows like (Item no, Description, Qty, Rate, Amount).
I am using Admin-on-rest as front-end interface and Loopback for my backend api.
Being new to react/redux and still learning core concepts, I am getting a hard time in finding a good example/starting point to build this functionality. So far, I think this example based on redux-form can help in creating a custom component, but I am yet not competent enough to build this myself.
Any reference to a similar example or some simple code to get me started will be very helpful.
Ref. Image
I think you need this.
How to richly style AOR Edit page
The last answer on the page is a somewhat detailed guide on creating a custom edit component in AOR. Feel free to ask more questions here about how this will be done.
Looking at your design you will need to also think how this data will be updated at the API level. AOR itself will make a single request when you hit save. So how will your API handle updates to multiple models etc.

Automatic PyQt GUI generation according to REST schema

TL;DR: I'd like to have a tool that receives an RESTful schema as input and provides a pyqt dialog/UI as output. Preferably with automatic submission/validation.
I'm working on a PyQt5 application that interacts with a remote Django server using django-rest-framework.
I find that I define most of my models/views/serializers quite quickly as they neatly extend one another. After writing a proper model, generating serializer and view is very easy and I end up with fully functioning server-side fast.
The client/GUI side is a different matter. I have to define the available fields again, their type and order. I have to define widgets for viewing a single object and a list of objects. I have to define edit interfaces and handle permissions.
This all seems like it could use some sort of automation.
Ideally, I could point a smart widget or form to a REST endpoint, and it'll automatically fetch the schema and allowed actions. Automatically create a GUI and the necessary error handling.
Ideally, this shouldn't depend on server side technology, and simply use a schema.
I've googled and couldn't find anything like that. Can someone point me at something similar? Is there a deeper issue with creating such a tool I'm missing?
Thanks!

How to save data on a persistent store with rubymotion?

I tried to find the best way to store data on a local persistant store but I did not find a lot of resources about this.
I found only :
Motion model
But what is the best gem/way to make a offline app. I mean, I sync with remote one time and after that, my application uses a local storage (cora data, sqlite...) to read data?
Thank you
I use MotionModel (heck, I wrote MotionModel) but I'm biased. It's supposed to be for use-cases where you don't want to set up the Core Data stack. That said, InfiniteRed has done a great job with RMQ so it's likely they did a great job with CDQ, which wraps Core Data.
I suggest you make a play app with each and decide for yourself.
I prefer the way HipByte suggests in the Locations sample.
Check the LocationsStore class, and how they use CoreData in a very simple way.
You could also use CouchbaseLite and leverage it's sync capabilities to make the data available offline. I created an CouchbaseLite RubyMotion Example which is a port of a TodoLite-iOS version of the App. I'm currently working on making the integration nicer and more ruby like, but it works as is.

How to display web service results as a front-end component view using Joomla 3 MVC Standards

I need to take the results of a web service and display them in a front-end component view. I am returning the results and they are in JSON format but am not sure how the component should be built. I don't need a debate on the best way, just some advice on a good way to built this as a component i will be able to install on multiple Joomla 3 instances.
Once thing that would help greatly is some direction on where to place the code that consumes the web service. Would that be a component model? Or better as a library sitting outside the component?
Thanks
Seems like you need some fast solution before learning the MVC architecture in Joomla!3 so probably a good suggestion would be to build a sample component at http://www.component-creator.com/home and then work and learn from there.
Then for the code for the webservices, it depends on what you want to do with the code, but if it's just to render in the view as you get it, use the view.html.php in your component views directory. Then, in your tmpl default view use the data to render as required.
Further you can create your own methods on the models or controllers in case you need to do something with the data, but before that, try to understand the Joomla! 3 main MVC architecture principles ;)