linnovate / mean

The MEAN stack uses Mongo, Express, Angular(6) and Node for simple and scalable fullstack js applications
http://mean.io
12.13k stars 3.45k forks source link

Template files #18

Closed avanderpluijm closed 11 years ago

avanderpluijm commented 11 years ago

Hi, I am trying to figure out why you are using app/views (e.g. for user) and public/views (articles) but I can't figure it out.

Could you give some info about this?

Thanks for this repository, really great!

liorkesos commented 11 years ago

Hi Basically mean consists of 2 MVC platforms - the first which is implemented is related to the server side code (node.js/express) and it's is implemented in the app/views andthe second one is angularjs's MVC and it's code recides in public/views. So youre clientside views go in public/views and the views created by node go in app/views

avanderpluijm commented 11 years ago

Thank you, so why are the user pages server side? You could see them as clientside, or not?

liorkesos commented 11 years ago

Sure you can but basically the idea is that some of the pages are delivered through nodjs and contain the reference to angular. The core pages act that way and are (currently) dished out by node and templated by jade so you can see pages like sign.jade which act this way.

avanderpluijm commented 11 years ago

I understand. I am trying to understand what the rationale is for some pages through node and others through angular, how do you make the distinction. I guess this issue can be closed since there are are already two others.

greggh commented 11 years ago

This is definitely a question I had too.

amoshaviv commented 11 years ago

First of all thank you for your comments.

One of mean main concepts is to use popular existing modules and frameworks for familiarity reasons, one of those modules is passport for authentication, passport uses oauth to authenticate so the entire login process need at least two views, of course I would of preferred to use nodejs solely as a REST machine, but for now we have to stick to the passport model.

kcrwfrd commented 10 years ago

@amoshaviv I had the same desire and I'm trying to figure out a solution–see #121. I would appreciate any feedback!