Does Ember.js support loading external file view templates? - ember.js

I'm new to Ember/Sproutcore...
From what i could find in SproutCore documentation, SC.TemplateView supports loading handlebar template from external files. Does this functionality exist in Ember?

As other answers have mentioned, your build tool is the key to achieving this. The following StackOverflow question shows how to do this using Rake::Pipeline Setting up rake-pipeline for use with handlebars alongside Google App Engine
Regarding BPM vs. Rake::Pipeline: At the moment, the Ember.js core team is using Rake::Pipeline in their production projects. The authors of BPM have expressed interest in getting back to it, but no one is actively developing it as far as I know. That said, it's a great tool, and we're currently using it on a project.

It's no problem to load your template from an external File. Like in SC1 this functionality is provided by your build tool which in fact translates your external files into the appropriate javascript code. One solution to do that is to make use of BPM.

Related

Creating a PWA app at the hand of a template

Good day,
I have a question.
And that is a quite simple question, but nevertheless I could not find the answer directly using the search functionality.
I got a question from a client to create a straightforward APP that has to be installable from the playstore and appstore.
Now I see that Envato lists bunch of PWA templates. Now my question is. Is it as simple as downloading the tenplate. Using PHP to generate the custom content and modifying the manifest file for the project and upload the project to the appstore?
So basically modifying the PWA template as you would build a website. But now for an APP. Because when I am looking for it online this is my conclusion.
Or is there much more to it?
This is quite important for me to be sure. Since I don't want to shoot myself in the leg.

How to use Google Blink/Webkit to render HTML code

Sorry if the title somewhat ambiguous.
I'm buliding an app that recieve an URL then return the final HTML code (and save it for caching), after Ajax and other js feature executed (something like Phantomjs).
My language can call C++ code, so I think it would be nice if I can buid and use Blink/Webkit libary directly.
The issue is both Blink/Webkit document is too big.
UPDATE 1: Which API (Blink has many APIlayer) or a particular class I need to look at?
Do you know any example or tutorial I should look at?
Or any alternative simpler libary?
Thanks
Finally Chromium project have headless API in development with very good example which can be build using ninja, more information in their project at https://chromium.googlesource.com/chromium/src/+/master/headless/
A video from BlinkOn https://www.youtube.com/watch?v=GivjumRiZ8c&t=838s

Trying to create a search engine using Ember.JS

Hello I am new to developing with Ember.JS and I am having trouble understanding how to develop a query driven search engine with the library.
Could anyone either point me to an example of how to do this or provide some code I could use in my open source project I am developing with the Ember platform?
I would like the user to be able to type in a query in a textbox and then have the results display.
Thank You,
Eric
For text-searching your own site, or a full blown search engine?
If the former, Ember Sherpa has code for an example app here: http://embersherpa.com/articles/search-example/.
There's also an answer with a JSFiddle you can play around with for someone asking a similar question here: Build search box searching with Ember.js

Best practices and tools for a big, extendible worklight enterprise application

I'm trying to optimize my company's application.
Tha architecture at this time is composed of different folders (inside common folder) for different sections of the app (for example Managing Bills, Managing Canteen, Managing Events etc etc).
Every js and css are included in the first page of the application (login.html) because I'm using the simple page template of jQuery Mobile.
Now I'm considering to add some other components to make the app easier to mantain and maybe speed it a bit.
What do you think about:
RequireJS to divide each section in a module so i can load only the javascript of a particular module at run-time instead of loading within login.html
Inline #imports for CSS files to produce single composite CSS
uglify.js to Minimize file sizes
Handlebars.js to realize fragments of html reusable
Do you think is a good way of work for an application that will become greater by adding new sections?
Do you think of other tools?
Thank you
This is a very broad question. I think you're on the right track... I'll list some libraries that could be worth trying:
Require.js - Will give you the ability to have 'modules' and dynamically determine and load dependancies. Alternatively some people prefer patterns such as the Revealing Module Pattern, jQuery Plugin Style or Common JS style modules. For what it's worth I recommend Require.js.
Bower is a package manager, you can use it to bower install [package]. They have a lot of packages here and you can also link it to your own repo. This could be helpful for managing dependancies.
Uglify.js and Google Closure Compiler are both good for minifying your code. Remember that some minification configurations such as advance mode could break your code. Run tests against the minified version of your source code.
QUnit is good for doing JavaScript unit tests. There are many other alternatives like Jasmine, which is what the Cordova guys use.
Lodash is another (faster) implementation of underscore.js that will provide a lot of utility methods for working wit arrays, objects, functions, etc. It also includes templating support. There's a good talk by the author here.
There a MV* JavaScript frameworks that could help more than jQuery (DOM+AJAX+Animations) or jQuery Mobile (Mostly UI) such as: Dojo, AngularJS, Backbone and Ember.js.
For UI you may want to checkout Adobe's topcoat repository and website. There's also Twitter Bootstrap and Foundation which allow you do to responsive design out of the box. If you're set on jQuery Mobile I personally like this Flat theme.
JSDoc and YUIDoc are good alternatives for documenting your JavaScript code.
I have no idea how many of those tools will interact inside Worklight Applications. It should be fine, since Worklight doesn't impose a certain set of JavaScript libraries you have to use. However, I haven't personally tried most of them inside Worklight Applications.

What is the best way to integrate Google Analytics into a C++ OpenFrameworks desktop project?

I'm currently building an OpenFrameworks project and need to use Google Analytics to track user interactions. I have yet to find any existing C++ libraries for doing so, and am considering writing my own. Is the API open enough to allow a custom library to be created? If one doesn't exist, any ideas on where to begin coding my own?
Yes it is possible and easy to extend openframeworks!
You can look here if there is an addon which fits your need. Maybe ofxCurl or ofxHttpUtils are the right ones to create an request like the one mentioned in the comment by yahelc.
If you don't find a solution there, you can look here to find first informations about creating addons for openFrameworks. If you have any further questions, please ask in the official openframeworks forums which you can find here.
Looks like you'll have to build your own solution... I'd use ofxHttpUtils to ping Google's Analytics API. You should also consider wrapping your work as an OF addon and sharing in openframewors.cc
I've built an OpenFrameworks add-on to do just that:
http://github.com/armadillu/ofxGoogleAnalytics