I want to know the differences in ember and glimmer.
I know that glimmer is used for components. But why do we need separate part for component called glimmer?
can anyone explain this in detail?
Thanks in advance
Glimmer.js is lightweight library for creating component-based applications while Ember.js is feature-packed framework. You can think of Glimmer.js as View layer of Ember.
In the future you should be able to grab Glimmer.js, and then install your way with dependencies up to Ember.js. For example - you can install Routing from Ember, etc.
Also, Glimmer.js uses TypeScript by default, and its Components are true ES classes. That's why you get better support in editors for writing apps in Glimmer.js.
Similarity between Glimmer.js and Ember.js is that both use Ember CLI for tooling.
Related
I wanted to follow ember js rules thoroughly.but I am novice to ember js so I am struggle to find ember standard way of doing coding.
Is it ok to do some jquery code inside ember component or controller ?
is it not good to use jquery inside there ?I think it not good to use jquery there.
You should try to minimise the usage of the jQuery in your Ember application unless that is a 3-rd party addon/library.
The reason to do so is that if you introduce jQuery to the application. You have to manually manage your application's state (sync all the state between different components for example).
Doing so you lost the biggest advantage of using a Front-end framework like Ember.JS.
My advice is to try to use computed property to change your application's behavior.
I have a 'core' Ember application that needs to be able to be extended by 'child' Ember apps. In Ember 0.10, this was achieved by heavily modding grunt tasks, but Ember 2 appears to have a possible workflow for this built in.
A super high level summary of my current (and target) setup:
core-application ('core')
contains shared business logic across All apps + templates and components
plugins
shared templates and logic that can be reused across apps (but not needed by all)
application
is composed of elements from core-application, plugins, + any app specific code. a note that routes should be able to be 'pulled in' from 'core'
In the current Ember 0.10 app structure, this has worked by modifying grunt tasks to build the apps in a quick, fairly fool-proof way.
Now, in Ember 2, it appears that this sort of pathway for app development is provided by using addons and blueprints. I suspect my 'core' app should become a 'blueprint' and plugins could be either an 'addon' OR 'blueprint' based on what is required by them. I'm writing proof of concept code now, but I have the following questions:
what does the --blueprint flag for the ember addon command do? I see that it essentially generates an app structure, but I don't see any realy documentation regarding where to go from there. This appears to to be what I want to use for my 'core' app, but the documentation is lacking here.
If the above --blueprint flag isn't what I want for this kind of set up, is there a better approach I should be considering?
Any other info regarding the above that folk with greater Ember 2 + ember-cli experience than I have can share on this would be hugely helpful.
Thanks in advance for any all feedback.
I found my answer by digging around existing Ember community addons.
The ember admin project seems to outline the structure AND consumption of an Ember addon that essentially creates an Ember app complete with routes and overridable/extendable elements.
The Host application then 'mounts' the admin addon by importing the admin addon's routes to the host application's routes and BOOM things work as expected. I've been able to write POC code to prove this concept works for my needs.
I'm looking to replicate the exact functionality seen here: http://verbalink.com/services/transcription-services#transcription_rates
There's no change of URLs and no requests to the server.
What parts of the Ember framework would be needed to accomplish the above?
Ember, Handlebars, and JQuery (Ember has a dependency on it).
I'm currently adding ember.js to an existing rails app. Is it common to serve different ember apps based on route if the functionality is substantially different? Or is it better to keep it as one ember app?
The way that Ember intends you to use it is that you have one Ember application, and all the back-end stuff such as database interactions are handled by Ruby. Ember just communicates with the back-end to get what it needs.
However, if you feel comfortable having separate Ember applications on different pages, then that's absolutely fine, but it's not how Ember would like you to use it, since it's an ambitious framework.
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.