What is a Parse Collection? - parse-platform

I'm learning Parse (the Javascript flavor) using their Todo App tutorial. I'm trying to write my first query. In the tutorial, I found this code:
var TodoList = Parse.Collection.extend({ ... });
I can't find any info about Parse.Collection in their JS Guide nor their API docs.
Can someone shed some light on what a Parse.Collection is and when I should use it?

You're not seeing anything in the docs because Parse.Collection was removed from the JavaScript SDK in v.1.6.0.
Downloads Page and JavaScript Changelog
SDK no longer contains Backbone-specific behavior. Moving forward, the core SDK will not be tied to any single framework, but we will work with the community to produce up-to-date bindings like Parse+React. The major changes are the removal of Parse.Collection, and allowing Parse.Objects to act as event channels.
In previous versions of the SDK, Parse.Collection was used almost identically to Backbone.Collection, as the Parse SDK was based on Backbone. Things are particularly confusing right now because tutorials on parse.com use pre-1.6.0 versions of the SDK.

Related

nobody can get cocoadocs page for swift framework

Trying to post to CocoaPods, but when the project goes through it doesn’t generate docs (site + docs button, instead of expand). Alternatively, when I specify a docs url the docs button doesn’t work either. According to the guides, it seems like jazzy isn’t parsing, but when I run:
jazzy
or...
jazzy —podspec MagicCloud.podspec
…it throws no errors and generates 100% documentation (which is hosted here). At the 404 page, If I select the Alternatively, click… or Potential error info buttons no luck. I’ve tried with and without a .yaml file generated here. When I try to use the following…
http://api.cocoadocs.org:4567/redeploy/MagicCloud/2.9.x // x = 5,6,7,8,etc…
http://api.cocoadocs.org:4567/error/MagicCloud/2.9.x // x = 5,6,7,8,etc…
…safari can’t find the server. I’ve posted so many versions at this point, any help would be much appreciated. The project is here, along with it's podspec file. Thanks in advance.
So after contacting Orta (the developer) directly, I eventually found out that he had handed the project off to Buddy Build. With their acquisition by Apple, they're holding off on new clients and are no longer offering support to Cocoapods.
As far as I can tell, no new Cocoapods have been able to compile their docs (at least through jazzy / swift), since the announcement January 2018. If anyone knows different, or if things change, please post here. Thanks.

Xamarin Forms & Parse SDK - How to edit the server address

I'm currently, with some friends, on a freelance project. For some reasons, the customer asked us to don't make a new server but just use Parse. The thing is, we knew that Parse will stop but he was keep wanting this thing, so we used it. Today, Parse has been stop and the costumer said he moved the data/stuff on another server. He also told us; "you just have to change the server address."
However, I can't find the way to change this address from xamarin forms. I found a solution which doesn't exist on my side:
ParseClient.Initialize(new ParseClient.Configuration
{
ApplicationId = "MYAPPID",
Server = "http://example.com/parse/"
});
But I as said above, it doesn't work since Initialize takes only 2 params which are the following, and not a ParseClient.Configuration stuff.
So I would like to know if you have any idea? It's not the only thing I tried but it seems to be the best example I can show you.
Any help is welcome, thank you !
I just started to use Parse. So maybe I can help you.
In fact with Xamarin Forms applications, Parse's configuration is a little bit different than with native platforms.
I suspect you don't use correct Parse DLL in your project. For instance in your iOS app (AppDelegate.cs), reference Parse.iOS.dll. Personally, I don't use Nuget packages and downloaded the correct DLLs from here:
Parse SDK .NET (github)
So referencing this dll in your project, you should be able to initialize Parse like that:
ParseClient.Initialize(new ParseClient.Configuration
{
ApplicationId = "xxxxxxxx-xxxx-xxxx-xxxx-b1782265ea00",
Server = "http://myParseServer.com/Parse/",
WindowsKey = parseID
});
For a more detailed description on how to use Parse for Xamarin Forms, I wrote a Post describing my solution:
Setup Parse for Xamarin Forms, conditional builds
Hope this helps

Can ExtJS 3.x and ExtJS 5 co-exist in a single application?

I'm not a developer myself, but my company develops and supports a large web application for insurance brokers.
Since way back we've been using ExtJS 3.x and as we went further the harder it got to migrate from 3.x to 4 and now to ExtJS 5. Due to the structure of the application and demands from out customers we cannot afford to freeze development and focus on refactoring our interfaces.
But we still want to use the benefits and functionality of the ExtJS 5.
My question is - is it possible to use both versions of the framework in the same application? For example, developing new grids and modules with ExtJS 5 and gradually migrating existing forms.
Did anybody have this sort of experience? Or is it plain nonsense and will never work?
Thanks to everyone in advance.
I find this question very interesting. I had a similar challenge, when I had to migrate our in house app from legacy Jxlib to ExtJs4. Putting my experience together with #Lolo's answer here is what I can advice:
Build on a new solid foundation. You could be tempted to keep your app in ExtJs 3.0 and start grafting new ExtJs 5.0 components on it. If you really want to take advantage of all the new features of ExtJs 5.0, you should start off with a clean, simple MVC app in ExtJs 5.0, that could be as little as the main window and the main menu. You could then bind all existing menu entries to the existing ExtJs 3.0 code. This will allow you to start with a really clean thing, keeping all the old functionality, without rewriting the code, and allow you to develop all new features with clean ExtJs 5.0 code that follows current best practice recommendations.
You will face two stumbling blocks:
You have to separate the namespaces in Javascript and CSS. Here also, I would advice to change the prefixes for ExtJs 3.0, and not for Ext 5.0 (I ignore if ExtJs 5.0 includes a sandbox file). The reason behind is that all your new ExtJs 5.0 code will be standard compatible, while only the old legacy code becomes incompatible (what it is anyway already). This will represent some code refactoring though, because you would need to replace all Ext. occurrencies in all your code with Ext3. or similar (the same applies to CSS, but will be much less work). I hope for you, that ExtJs 3.0 has a sandbox version, because I think refactoring their code would be a lot of work (but not impossible).
A major feature of ExtJs 5.0 (as already for version 4.x) is the automatic building and compiling of an MVC application using Sencha Cmd. This didn't exist yet for ExtJs 3.0. I think it is crucial that you start straight away using this tool. I will allow you to really take advantage of all the enhancements (declarative programming instead of imperative, advanced MVC and MVVM features). It will radically change your coding style.
To get this work, you compile in a first step you old code in one Javascript file. Sencha Cmd must not recognize this as an Ext app. Then you simply add requires: 'Oldapp' in Application.js and ExtJs will include a file called Oldapp.js. That file should define a class Oldapp and include all the rest of your application code:
Ext.define('Oldapp', {
// Just what ever you need
})
// All the rest of the code of you old app
Then layout all the folders and files of your new code according to the MVC or MVVM specification (whatever you prefer) in the Ext doc, and Sencha Cmd will build you the whole app correctly.
I think this all allows you to take advantage of all the new features immediately, building on a clean, standard foundation with only minor code refactoring. It sounds like eat the cake and have it too, but it is possible.
But this will take a huge mental step: You must learn ExtJs 5.0 like something new and try to forget all you know already about ExtJs. You won't use Ext.ready anymore, Ext.Loader will handle this under the hood. Nor will you instantiate Ext objects from declarations (ban panel = Ext.create({xtype: 'panel', ... stuff), stick to Ext.define('Myapp.view.Mypanel' .... There are many other points where everything changed since Ext 3.0 ...
This last point is in my opinion the biggest stumbling block, much more important than the two technical points explained before: It is difficult, but crucial to reeducate yourself.
You can use sandbox version of Ext Js 5.0 and "normal" 3.0 (I don't remember if 3.0 is also available as sandbox).
Then you can change prefix for all 5.0 classes and css rules. By default it is Ext4 (not Ext5) for JS, and x4- for CSS.
To use sandbox include ext-all-sandbox.js file from build directory.
It won't work. The javascript files will clash with each other.

Looking for guidance in using standard Polymer Core and Paper components (and associated events) in Dart Editor

First of all many thanks for the incredible source of information that you are providing to people like me.
I am visiting this site very often and most often finding the answer I need, but this is this is the first time I post a question, so please accept my apologies if I don't fully conform to rules.
Here is my issue:
I am "playing" with Dart Editor and Polymer to try to understand if I could use these technologies in my job moving forward
I was able to import the Polymer Core and Paper components in Dart Editor and to install polymer.dart
I was able to create a simple web page with a "core-selector" and to add some Dart code to handle a click on this component
I can't find how to listen using Dart code for component-specific event ("core-activate" & "core-select" here) and how to read component-specific attributes ("selected" & "multi" here)
I don't seem to be able to find good examples showing how to use "standard" polymer components in a web app created Dart Editor
I could find material on how to create my own polymer components using polymer.dart but I would just like to use standard components
I understand both Polymer and Dart are young but I can't imagine the clever brains at Google not having a solution or plans on this.
Regards and many thanks again.
Sebastien
The problem is not that Polymer and Dart are young. Dart is quite mature, Polymer is not even beta but also not so young anymore. The problem are the core- and paper-elements. They are very new and developed in JavaScript and the Polymer.dart team just created a code generator that wraps the JS core- and paper-elements in Polymer.dart elements. This process is only available since a few days and there are several issues which are yet to be solved.
I think you should provide a concrete example in your question of what you can't get working. Basically Polymer.dart core- and paper-elements work exactly as other Polymer.dart elements. So it's hard to know what to explain.

How to integrate Firefox Sync?

Firefox 4 comes soon (ok, next year ;)) and there is a Firefox plugin to sync your bookmarks etc. with Firefox 3.whatever .
I would like to know if anyone has a comprehensive, up-to-date tutorial to integrate Firefox Sync into your own plugin? Or any idea regarding this?
I mainly followed this official "tutorial" and also this blog post, but the information seems to be slightly outdated.
For example, the object is not called Weave anymore but Engines and the weave.engines. preference became services.sync.engines.. I played a little with all the mentioned options, but it does not seems to work (and my plugin does not show up in list where you can select what to sync).
I assume that the Tracker and Store classes are fine, the main problem is to register the engine...
The ClientAPI tutorial you mention is definitely the way to go. I updated it recently so if something's not working, please let us know so I can fix it in the docs. Wladimir's blogpost is definitely quite old and contains some outdated information. We will also make changes to some parts of the API in the upcoming beta releases, so be prepared for some flux...
The Weave namespace is still the canonical way to access Sync related APIs from UI code. It exposes components such as Weave.Service and Weave.Engines. You can import it via Components.utils.import("resource://services-sync/main.js"). If you want to implement your own engine, you'll have to import the actual underlying modules, though (all listed in the ClientAPI tutorial). The tutorial also describes how to register your custom engine implementation. Once it's registered, it won't automatically show up in the preferences UI, though. I suggest building your own UI that flips the services.sync.engine.YOURENGINE pref in your add-on's preferences.
Out of curiosity, what kind of data are you trying to sync?

Resources