# Ember Frustration, Data Relationships 2017/09/13
I've been building a large web app for about two years. The front end is made with Ember.js. We have a team of two people and for both of us this was the first really large scale single page app we have written.
Ember was very good to start with. It gave us all the build tools and project structure to start with. Even with so little experience we were able to start writing our business logic in day one.
The Reality Kicks in
But, when your experience and needs grow you suddenly realize that in many cases you are fighting the framework. Of course, Ember has good intentions and most of the time everything works as expected and there's a lot off cool magic that Ember does for you.
But every now and then you need to do something in a non-Ember way. Maybe you're working with a legacy API or your data model doesn't quite fit Ember's way of thinking. And this is when things get frustrating. You find yourself fighting the framework which is just trying to do your work and does it wrong. It can be difficult to tell Ember to back off a bit and give you more space to do your own thing.
Now I've hit one of those moments. We have some relatively complex data models, although in this case they are used in a very simple way. Sometimes I'd just like to be able to call an API and process the raw data without Ember intervening.ng.
Of course, there's always an Ember-y way of doing things but sometimes I'd just like to take a short cut and have my own way. But in a way, Ember forces you to use some good programming practices and I have to give them credit for that.t.
# Don't Use includes(), use indexOf() Instead 2017/09/12
I always forget that Internet Explorer does not support
indexOf instead. Luckily Edge is one step ahead and already has
# Ember "No model was found for `user-role?`" 2017/09/12
I added a new model in Ember called
user-role. It's no different to
any of the other 30+ models the app has. But out of the blue I get
this error in the console:
No model was found for 'user-role'
I get this error when I'm requesting the
user model from the
user model has a
hasMany relationship to
user model already has at least three
hasMany relationships to
other similar models and they work just fine. I'm completely lost why
this is happening.
UPDATE almost two hours later
I renamed the
user-role model to
userrole and everything works as
expected. I've been using Ember for over two years almost on a daily
basis and I'm still lost with their naming conventions.
also has a
hasMany relationship to
user-relationship model and it
works just fine. There must be some difference how the data is loaded
from the API.
# Long Term Support in the JS World 2016/10/18
The LTS version will receive security fixes for 60 weeks. Sixty weeks? Long term?
I guess that's considered a long term in the JS world. Anyway, it's a very welcome announcement for anyone who creates enterprise software.
I'm starting to get frustrated with all the front-end development kits. I'm more of a back-end guy and I've been spoiled by Symfony's long term support, excellent documentation and punctual release cycle. I wish some JS frameworks would offer the same kind of enterpriseyness.
# Note to Self: Check out Aurelia 2015/11/16
It's still in pre-beta, but it looks interesting. Documentation is good (especially for a pre-beta) and it seems to focus on real world use cases like routing instead of trying to be the fastest framework or rendering engine compared to others.
ps. If you're confused with all the ES5, ES6 and ES-whatnot names, here's a good explanation by Ben McCormick.
# CSS & JS Minification 2015/10/20
# Angular VS Ember VS React 2015/10/02
The battle of the JS frameworks, this is something that I've been wondering lately. I'm working on a longer blog post about this, but I think in the end it comes down to these things:
- Use the tools you and/or your team knows
- Use the tools best for the job
I know that's easier said than done.