Code layout question

5 views
Skip to first unread message

murrayh...@gmail.com

unread,
Jul 7, 2015, 1:21:04 AM7/7/15
to gl...@googlegroups.com
Give the dramatically reduced amount of code in GluJS cf ExtJS, I have started adding both the viewmodel def and the view def to the same .js file. It seems to make more sense somehow.

So, my question is, for those of you who have built large GluJS apps, do you find that separating the viewmodel and view into separate files (a la ExtJS MVC) has any advantage / disadvantage?

Thanks,
Murray

Ryan Smith

unread,
Jul 7, 2015, 12:36:57 PM7/7/15
to gl...@googlegroups.com
It all depends on the situation for me personally.  I had a really large file called FormBuilder (which was a drag-n-drop form generator with all kinds of controls) all in 2 separate view/viewmodel files.  I've also done everything totally separate, and I've done them together.  It really depends on your preference.  If you are on a larger team though, it might make sense to break the "logic" from the "view" though so that part of the team can focus on the business requirements (viewmodel) and the other can focus on the presentation (view).  In the end, go with what makes the most sense to you :)

-Ryan

--
You received this message because you are subscribed to the Google Groups "GluJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glujs+un...@googlegroups.com.
To post to this group, send email to gl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glujs/2ebad66d-9a24-4eec-9fc0-89811427066f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

murrayh...@gmail.com

unread,
Jul 7, 2015, 5:37:18 PM7/7/15
to gl...@googlegroups.com
Thanks Ryan, good points.
Go well,
Murray
Reply all
Reply to author
Forward
0 new messages