Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I prefer the "VC" style (MVC minus the M). It is way too much work to have to redefine your models on both the client side and server side, when you can simply have all the data in temporary dictionary structures. You define your models just once in the database itself. I don't know if anyone else does this, but it keeps the amount of code to a minimum.


I use Django on the server, with Ember on the client-side. Without a concrete model layer in the client that has computed properties and, to a lesser extent, observers, things that were trivial to implement would become much more difficult.

Of course, I look forward to the day when we can write our models once for both the server and the client, but I've yet to see a "full-stack" solution compelling enough to get me to abandon both Django and Ember.


To be fair, and if I'm understanding you correctly, you can use ember-data alongside Ember to get your model layer (or even just use plain Ember.Objects as needed).

Ember fastboot seems like it'll address some of your concerns too - it'll allow for initial rendering of a page on the server with the intention of the client taking over after that.


I use Ember Data along with Ember. Ember Data is my model layer. I should have made that more clear.

As for FastBoot, correct me if I'm wrong, but right now it supports rendering static pages for SEO. This is not useful for business apps. Rehydration on the client-side (what you seem to be referring to) is still being worked on. But it does not replace the server-side application.

At any rate, eventually someone will bring together the best of server and client technologies in one full-stack package. With all due respect to what's out there now, I haven't seen anything approaching the elegance of Ember and Django.


You can do this with any Javascript-on-the-backend solution today. Not saying it's better, but we're doing it. Node is the obvious one, but we're running V8 in Java on the backend so we can use Spring-boot and a bunch of other Java stuff we get "for free" at the company.


If you use a framework like Meteor, a small version of your database runs on the client, so you don't have to keep re-implementing various DB functions/features to display data to users or waiting for a round trip to run a trivial query. The server code turns into a set of replication rules and various functions that should never run on the client (security, touches a lot of data, etc).

This way is good for CRUD apps, but may not be the best approach for others.


I build thick controllers and rely on the database schema + DAL to handle the "model". 'course one could argue the array the data is dumped to is a "model" but its clearly not an object like MVC enforces normally.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: