Hi, 
This is about a project I recently finished, and I Hope i'm addressing a 
problem that many developers face when the angular projects are getting 
bigger.

*So what is the issue ?*

I'm using angular over a year now and I used to work with lot of REST apis, 
and the problem I came across is that we are so used to 
the literal notation of objects 
when we are working with REST apis, developers are using the response 
object directly after a $http,  and I must say this is very much ok when 
you are working with smaller projects but when things are getting bigger we 
need to see the definitions!!, for example if you are directly using a 
object generated after a $http call then only thing you need about that it 
is an object to know more about it we have to reffer the api documentation 
other than that there are no ways to actually see the content and when the 
api changes you need to search your project to see the places you have use 
the attributes. 

So it is always good to use classes (prototype or constructor ) but then 
how do you populate them ? 
javascript does not have a library which does JSON to Class instance and 
class instance to JSON mappings, so all we have to write our own code to 
generate the object tree, what I feel is that we need something similar to 
Gson for the Javascript space which gives us more readability of our code 
with the classes 

*So that is why I worked on this project called Angular-JsClass* 

This allows you to define the class structure and directly populate it 
using JSON as well as Convert it back to json, 

https://github.com/imalhasaranga/Angular-JSClass

With this I created a small class generator as well 

http://jsclass.imalhasaranga.com/


Try this out, I'm no expert in anything but I hope this will help someone 
and people will start contributing, or if this is insane guide me to the 
right track :) 

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to