Working with two separate Google maps addons ember-g-map and ember-place-autocomplete which causes this error:
You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
Makes sense, since my index.html page now has multiple scripts loaded in.
Anyone know how Ember devs normally deal with this kind of problem?
Ideally the addon author should provide a config option to allow the consumer to include or exclude the Google Maps library. I just submitted a PR to ember-place-autocomplete that does just that. Once the PR gets merged you can use that, or use my forked version.
As an alternative to ember-g-map you might consider using ember-leaflet with the ember-leaflet-google-tile-layer addon. Ember-leaflet seems to be the main mapping addon for Ember and it does give the option to exclude the Google maps library.
Related
I am working on a project that, among other things, automatically generates Swagger APIs for Python projects. One thing that I have noticed is that the curl text exposes passwords if the API requires those. Since there's no way to mask the passwords as of now (https://github.com/swagger-api/swagger-ui/issues/5025), it seems like the easiest thing to do is to simply disable the curl text so that I can screenshare my Swagger API without exposing my password.
In another issue (https://github.com/swagger-api/swagger-ui/issues/5020), a plugin is shown that can disable the curl text.
However, I'm totally stumped on how to actually import and use this plugin. There's lots of documentation about how to write plugins, and none on how to import them. I can see that I can load plugins using the plugins option in https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/, but I don't know how where to put the code.
As Helen alludes to, the answer to your question depends on your setup. However, I would hazard to guess that you will need to configure the SwaggerUI object by running an "unbundled" version of the app. You might think of this as creating a custom entrypoint to a docker container, say.
For example, the link you provide shows suggestions for running a customised version of SwaggerUI. Those customisations are written in JavaScript, so any old HTML page with the necessary dependencies in place which loads the script you write to configure SwaggerUI would answer the question of "where to put that code".
The details would depend on any frameworks you are or are not using.
I'm am trying to add a reactive Vue js on the frontend and have Django serve the different pages on the backend. But how do you add these guys together?? I have found different ways to do so, but I can't find a good explanation on the why they are tying them together that way. I was hoping for a comprehensive explanation as to how these 2 are added together but also the why? I am still new to both of these frameworks so I am trying to understand not only how to do something but the reason for my doing them. Thanks in advance.
There are many guides on internet about how to use Vue and Django together. I provide you the main differences and a sample link of implementation for each one.
There are two main options for that:
Using Vue in Django templates
Separating Vue and Django projects
Option 1 is usually used when you want to use vue in some parts of the app or just making some reactive components. Your routes are handled by django and your passing data to frontend by passing data to views. In some cases you're a backend developer and don't want to spend time on frontend so you use this option whenever you need. For implementation check out this link.
Option 2 is when project is large and complex or you prefer to make a SPA (check this link) so you separate frontend and backend projects and interactions between these two is via API. So you run your frontend project separately and routing and other stuff is handled by vue. For implemetaion check out this link.
I've downloaded Ember.js ver 1.13.13 for a test drive.
With other js frameworks, I am able to run from a file system. Does Ember require a server? I could not run directly from a file system. I did find some old tutorials that allows this. Is this a new thing?
You are using Ember-CLI which requires running ember serve in order to view your ember app. Ember-CLI uses conventions so that it knows where to locate the files that compose your ember app. As Ember-CLI locates your files, it knows how to combine them in a manner that ultimately results in the single JavaScript file that is executed in your browser. In theory you could use the globals style of development-which is the style reflected in the 'old tutorials' that you reference-and run the app directly without using any sort of "server." But, I don't recommend that. Learning Ember-CLI is useful as it is the preferred method of development moving forward. And, in my opinion, gives you a number of features that allow you to more quickly prototype apps. You can read more about that in the link I provided to the Ember-CLI website.
I want something analogous to Google Analytics' tracking, where all page views are tracked automatically, but do not want to rely on 3rd party connections/libraries. This will be used for a closed-network application, so I can't connect to any external services like Google Analytics.
Additionally, I want this module to track all page views without requiring me to specify manually which should be tracked.
It looks like https://github.com/attuch/django-statistics may be a match, but it doesn't look well-maintained, and the "official" version of project isn't available. Are there any other popular apps that accomplish what I'm looking for?
There's the Open Source Analytics Platform PIWIK. The Platform itself is written in PHP, but one could integrate it using the module django-piwik. Looks a bit dead, too ... I'd be curious if it still works.
In the project I am working on, we are using ember.js (1.0rc1) without ember-data which is working out quite fine so far. The reason why we decided to go without ember-data is that we already have some utility methods to handle the integration with the REST interface, and over all because ember-data is not part of the ember.js.
From emberjs.com:
Currently, Ember Data ships as a separate library from Ember.js, while
we expand the adapter API to support more features. The API described
in this section tends to be stable, however. Until Ember Data is
included as part of the standard distribution, you can get your copy
from the GitHub page.
So, to my questions and the input I am looking for:
how much do we lose/gain with this approach? (besides the REST integration)
experiences of somebody that actually might have started also without ember-data, and now migrated to ember-data
maturity of ember-data and its integration into ember.js
And there is another question, which might rather be for the ember.js/ember-data devs:
what's the roadmap to integrate ember-data into ember.js and how strong will be the impact on the APIs?
Thanks for sharing your experiences and giving some hints and advices. // ph
I use ember-data in my project and I'm very pleased with it. I saves you a lot of time developing your own stuff for communicating with the server.
At this time ember-data is not officially production-ready but I use it already.
Read this on the emberjs website about ember-data. It says:
Without any configuration, Ember Data can load and save records and relationships served via a RESTful JSON API, provided it follows certain conventions.
We also understand that there exist many web service APIs in the world, many of them crazy, inconsistent, and out of your control. Ember Data is designed to be configurable to work with whatever persistence layer you want, from the ordinary to the exotic.
There is more information on the github page. There is even kind of a roadmap in it...
Another advantage is that you can define your Models with their relationships. It's also possible to use transactions which are giving you the ability to rollback changes if something went wrong at the server.
I really like the vision behind ember-data that it's not dependent on the kind of backend you use. Or where you define your relationships. If you use Mongo-db where you define the relationships on the parent object, where others do that the childs.