tower-archive / tower

UNMAINTAINED - Small components for building apps, manipulating data, and automating a distributed infrastructure.
http://tower.github.io
MIT License
1.79k stars 120 forks source link

Angular option #310

Closed ricick closed 12 years ago

ricick commented 12 years ago

Could it be made optional to use angular instead of ember?

maedi commented 12 years ago

Oh... and I'd just got the hang of Ember :) But AngularJS also looks really good.

I'm assuming it's going to be hard, considering how tightly Ember is already integrated with Tower.

lancejpollard commented 12 years ago

No, sorry. Ember is a core part of Tower's Object Model.

If Angular can work along side Ember, meaning if you could use the "view" part of Angular and just not use the Ember views, while still the Ember objects, then it's perhaps possible. But that's something you would have to test and see.

Tower is using Ember and at least for now won't support Angular and Knockout, the primary reasons being that Ember's "Object Model", and Ember's "run loop" (pretty much a port of Apple Cocoa's run loop), are [in my opinion] unparalleled implementations of observers, data-binding, and classical inheritance (and basically "multiple inheritance" through mixins), and Tower is taking advantage of this stuff at the core level.

That said, if you can show that Angular templates work with the current tower + ember codebase, I would take another look.

PhilAndrew commented 11 years ago

I think that being restricted to Ember is one reason that people might pass this project on.

thehydroimpulse commented 11 years ago

Right now tower is extremely tightly built around ember. To support angular would require full modularization. But, you don't really use Ember directly, tower abstracts most of it so I'm not sure if supporting angular would do anything. On Jan 9, 2013 8:50 AM, "philip andrew" notifications@github.com wrote:

I think that being restricted to Ember is one reason that people might pass this project on.

— Reply to this email directly or view it on GitHubhttps://github.com/viatropos/tower/issues/310#issuecomment-12050162.

PhilAndrew commented 11 years ago

Yes I don't actually know how TowerJS uses Ember, except that I enjoyed programming in AngularJS on the client side and came to the decision that AngularJS is really really god.

PhilAndrew commented 11 years ago

I want to ask, does this use Ember on the client side? or is it using Ember somehow on the server side? Also I don't understand how its using Ember. My problem is, what if I start to want to use AngularJS on the client side which I have used for other projects, is this going to be incompatible with this project? Lets say I want to set up some bindings with AngularJS form and a model,... is it going to work? I guess I can just try and see or look at your source code, but if you give me any hints its good .. thanks, Philip

thehydroimpulse commented 11 years ago

Tower is built around Ember.js since the beginning. It uses Ember.js on the client-side and server-side (using the object system, etc...). The only way to support Angular would be to modularize Tower completely and that would require it to be completely re-designed. Right now Ember is the only framework supported, because everything works around Ember and it's design, especially the object system, data syncing, etc...

PhilAndrew commented 11 years ago

I see. I looked at the source code and also see that its closely tied with Ember. Maybe I will just compromise and use Ember instead of AngularJS, even though I enjoyed working with AngularJS.

thehydroimpulse commented 11 years ago

I find Ember.js a lot better then Angular, one of the reasons is because Ember's view system is completely separate from the DOM (string-based templates), while angular is forced to be tied with the DOM which makes pre-compile templates not possible. Having string-based templates allows you to manipulate it and pre-compile it on the server-side where there is no DOM. Just one example of the differences.

edubkendo commented 11 years ago

Nearly every object in the Tower system inherits from Ember. Because of this, we get all kinds of perks, including the meteorjs/socketio-type data-binding nearly for free. It is incredibly powerful and useful. Tower.js is a FULL-stack framework that means server and client. But it also means that in many cases you only have to write code once, and it works in both places. The real problem isn't that we don't support Angular, or Backbone, or any of these other frameworks people keep asking about. The real problem is that there aren't good tutorials/examples/screencasts available to demonstrate how easy and awesome this stuff really is. Unfortunately, none of us want to make those yet because Tower is still heavily under construction and anything we did now would be obsolete in a month. The good news is that I talked with @viatropos last night, and he's hard at work on tying these changes up and says he'll be done soon. So, I'm guessing that will put us at 0.5.0, which should mean the API is fairly settled and we can start putting those kinds of things together. In the meantime though, I encourage you to really give this a chance, there will be plenty of projects where you can use Angular if that's what you like, but I think you'll find that Tower is way too powerful to ignore.

PhilAndrew commented 11 years ago

Hi, yes, well - my comments are out of scope of this issue but I think from what I read in TowerJS it fits what I want, I like CoffeeKup, Coffeescript, the code looks good, concise. I don't see any problem yet apart from this issue from a choice point of view regarding these ... but from a practical point of view, EmberJS will get the job done anyhow.

TowerJS needs some improvements, the website needs to be more cool and attractive, right now it looks very ordinary. This is a psychological issue, sales issue, first impressions do count. Also needs a video on the homepage as the sales pitch and simple explanation that can be understood in 5 minutes. People are busy comparing these JS frameworks and trying to work out what to use for their project, like myself. Please integrate with Yeoman http://yeoman.io/. Also I don't want Twitter Bootstrap, I want Foundation CSS.

PhilAndrew commented 11 years ago

AngularJS vs Ember, I don't know which is better except that I was successful with AngularJS, however it seems Ember can do everything AngularJS can do, at least in the area of what I want, so I shouldn't worry.

thehydroimpulse commented 11 years ago

Yes, we are going to spend lots of time on marketing, polishing, etc... website, documentation, tutorials, and screencasts are all on the list.

lancejpollard commented 11 years ago

We are confident that Ember is a better choice than the related frameworks. Ember has a much more calculated approach to solving the web/mobile problem and is in this for the long term.

The code for these larger projects is always likely going to work. So if you have built apps in the past with Angular or Knockout or the like, you have definitely had some success. But the real distinguishing factor between these different frameworks is how well each implements the ideal principles established by the community, and how they go beyond them to invent new ones.