Full-stack angular with angular-server

Hi guys,
Wanted to let you guys know about the angular-server project I’m working on.
The main idea is writing full-stack angular applications by running angular on the server side. This has several advantages as I see it:

  • Dependency Injection on the server - Using angular DI on the server means we don’t need to think about load order, and we can create more decoupled code. Easier to test, Easier to understand.

  • Injecting server services to clients! - I have always had a problem with Meteor methods. They felt too much like global functions to me. With angular-server you can define a service on the server, and inject it on the client as if it was defined there. That makes the dependencies very clear and easier to test! calling a function on the server is no different from calling a function on a client service, and the result is automatically wrapped in a promise. It even keeps the same concepts as meteor methods with the ability to simulate changes on the client for an optimistic UI. Read more about it here.

  • Reusing existing angular knowledge from the client side on the server. For example, in angular we all know how to use the $http service to do http calls on the client. Now there is no need to learn how to do $http on the server in another way. You can use the same services. And you can use the community services and tools that were developed on it on the server as well! Pretty cool.

  • Future possibilities - angular server side rendering, live updating server side objects, client-to-server injection and more.

Check out more information here and an example project here.

For the meteor world - we are also working on a dependency injection framework for meteor that will enable service injection from the server to the client and server to server injection using cluster. It’s called Zodiac and it’s just starting. Check it out here.

I wanted to hear your opinions. What do you guys think about this solutions? Sounds like something that would make your lives easier?

5 Likes

I thought angular-server was done for as I hadn’t heard much about it in awhile.

Sounds awesome.