angular: using restmod as an alternative to restangular for rest operations - angularjs

https://github.com/platanus/angular-restmod seems much clearer to me than restangular but I can't find much info about it - has anyone used it, know of any pitfalls, etc.?
For instance, I can't see support for PATCH for partial updates. Any and all info is welcome.

We are using Angular Restmod in various projects in production and I can tell you it does what it says it does.
Take a look at the issues in Github, there's a lot going on there right now.

Related

Adding ACL support to parse4cn1

I'm working on an app written in Codename One together with the parse4cn1 library, the combination of which is a real pleasure to use. However, I need support for a few things in parse4cn1 that are not implemented, most importantly ACL and was wondering if Chidiebere has any hints on how to do this (e.g. how did you implement parse4cn1 yourself - from scratch or copying the open source Parse SDK for Android)? If I manage to do something of a decent quality I will try to share back. Thanks in advance
I never got around implementing ACLs (it's still on the TODO list). parse4cn1's interface closes resembles the Parse Android SDK interface and I'll like it to stay that way for convenience. In this case, the interface of interest would be the ParseACL which is documented here.
The actual implementation will need to be done via REST API calls.
Things to bear in mind:
We use the Android SDK API simply for defining methods and signatures for the corresponding class in ParseACL but do not use the SDKs for anything can be be done via REST.
By design, any calls requiring the master key will not be supported in parse4cn1 due to security considerations. If really needed, the functionality should be exposed via server-side cloud code.
Pull requests without unit tests for the added functionality or breaking existing tests will be rejected.
See also the Contributions section of the parse4cn1 github repo.
Good luck with your implementation and I hope to see a PR from you soon ;)
It was implemented from a Java port on top of the REST API's here but was later modified to use the SDK's to allow things like push (which are now no longer relevant).
In the past I just contributed pull a request to the project to get the fixes/features I needed. It was really easy to work with and compile.

Migration from angular 1.2 to 1.5

Currently I am using angular v1.2.26. When I upgraded it to v1.5.0(or v.1.4.8), the application stopped working.
What are the changes in the existing code of v1.2.26, I should not be missing, to make the application work?
There's now a guide available https://docs.angularjs.org/guide/migration - probably slightly less tedious than reading every single ChangeLog
Migration Guide - https://docs.angularjs.org/guide/migration
See the change log
https://github.com/angular/angular.js/blob/master/CHANGELOG.md
An easier way is to see where your code fails, debug a bit and hit the nail. There are no huge changes between the versions in question.
Although, your question is not a good candidate for StackOverflow questions but you should read the ChangeLog to see the breaking changes and fixes in each release after v1.2.26 to v1.5.0.
See the changes https://github.com/angular/angular.js/blob/master/CHANGELOG.md
Please take a look if this may help you:
http://www.diatomenterprises.com/migration-history-from-angularjs-1-3-to-1-5-and-then-2-0/
I can assist you in migration from 1.3/1.4 to 1.5 since did it a few times on different projects and all went smooth. Of course there're some tricks to do, but in general nothing breaking.

using swagger documentation or Hydra:ApiDocumentation for newly API

I am currently in the process of choosing a technology/format to expose my API. It seems there are lots of discussion on this topic, but could not find the one for future use. I am planning to use Hydra:
http://www.markus-lanthaler.com/hydra
as it seems to be fully restfull (hypermedia api) but it seems it is not accepted yet (neither HAL is).
when I go to : http://www.markus-lanthaler.com/hydra/api-demo/vocab, I get a json that seems to be what swagger returns.
my questions:
- is Hydra Documentation meant to be sthg like swagger
- could find any tool for it like swagger has.
- I would prefer using Hydra as it seems it has more description on operations... by using json-ld, but it does not seem to be as supported as Hal or swagger is.
-does anyone have experience with hydra
Great that you consider using Hydra. You are right, we do not have extensive tooling yet but that's just a matter of time. In fact, I'm already working on a documentation generator. If you have further questions regarding Hydra, please don't hesitate to post to our mailing list. There are a lot of people on that list that will be happy to help.

Where are some good documentation for this open source project 'solr-uima'

I'm really interested in being able to annotate my data. I am not really sure where to start, so I thought of using Apache Uima with Solr. I'm not sure if I'm no the right path, yet. Anyhow, I'm looking for some good documentation on this component called Solr-Uima
http://code.google.com/p/solr-uima/
Thanks,
J
I have no idea what UIMA is, but when I can't find any docs I read the tests. If the tests are not enough I read the code itself. (sorry if this is a generic answer, but this code doesn't seem to be too difficult to follow, so I really think it's a viable option).
The former project on Google Code has been contributed to Lucene / Solr codebase.
There is a wiki page, but needs to be updated.

Using Backbone.js offline

I'm evaluating Backbone.js for keeping data and UI synchronized in my web app. However, much of Backbone's value seems to lie in its use of RESTful interfaces. Though I may add server-side backup in the future, my primary use case involves storing all data offline using HTML5 local storage.
Is Backbone overkill for such a use case? If so, is there a better solution, focused solely on updating UI when data changes, and vice versa? (I'm also looking into Knockout and Javascript MVC.)
EDIT: I'm also now looking into Angular.js and jQuery Data Link.
Backbone.js works just as well with local storage as it does with RESTful queries.
I'm a learn-by-example kind of guy so here are some links to get you started:
Todos, a todo application
that uses local storage and
backbone.js, check out the annotated
source to see how it works.
The localStorage adapter is
all you need to get started, take a
look at the annotated source of
that too.
In the past weeks I have evaluated different solution for a scenario close to yours; being a project done in my personal free time and not being a good Javascript programmer, all I needed was something easy to learn to avoid starting from scratch.
Not surprisingly, I had the same candidate: Backbone.js, Javascript MVC and Knockout.js.
Backbone.js won:
I wasn't be required to follow conventions or replace what was already in place
I've easly hacked in its codebase to understand what wasn't clear from the documentation
I've successfully ignored a large amount of its features that was not interesting for me
It gave acceptable performance on busy pages
It works
Backbone.js is lightweight and relatively magic-free; you will probably use a small subset of its feature but it provieds a solid base to develop your solution.
I know it's been a while but you may want to check out backbone-offline project on github: https://github.com/Ask11/backbone.offline
You can also take a look at AFrameJS. I have created a bare-bones proof of concept note-taking app that works offline using HTML5 WebSQL spec, but also want to create an adapter that uses localStorage as well. My personal opinion (and I am biased) is that using an MVC library of any sorts is going to help you in the long run - the value of libraries such as Backbone, Knockout, and AFrame lie in their ability to reduce the cognitive load of the developer by enforcing a good separation of concerns. Data related functionality reside in models, displaying that data resides in Views, and the glue is kept in Controllers. Separating these three concepts might seem pedantic at first, but the end result is code that is easier to develop, easier to test, easier to maintain, and easier to reuse. A basic tutorial on using AFrameJS can be found on my site at: http://www.shanetomlinson.com/2011/aframejs-tutorial-for-noobs/

Resources