I was trying to figure out how it worked by reading the generated code; experimenting with small code changes to see the effects; and reading documentation from MEAN.io and questions from stack overflow. This didn't get me very far. I was either too deep in the code or too far above in the high level overviews.
The best learning tool for me was this youtube tutorial by Michael Moser. He went through each of the components of a MEAN stack application.
I'm finally starting to get it, I think. Here are two things that I'm starting to see.
Communication between the client and the server is done via http verbs. In your client side angular controller, you can do a few operations with your model like $get, $save, $remove and $update. These correspond to http verbs like get, put, delete, update and so on. It seems so simple now. My misconception was that I could define functions with my own keywords and I'd have to keep this in sync between the client and server.
The node package manager is only used on the server. This means, "npm install whatever" allows you to write
var whatever = require('whatever');
in server side code. It doesn't work on the client (I think). This again makes sense now that I realized it. Node is your server, so you wouldn't install server side modules onto a client.
Working with new technologies is painful. But things are easier with youtube, tutorials, Q&A sites. After you become an experiment in something it is hard to remember how you felt when you were a newbie and what you didn't quite grok before.
This blog entry is just a reminder to my future self of how little I once understand.
JavaScript Stack is a modern web development approach that uses JavaScript across different layers of application development. Technologies such as Node.js, Express.js, React.js, and databases like MongoDB can be combined to create dynamic and interactive web applications. JavaScript is widely used for building responsive user interfaces, server-side applications, APIs, and real-time web solutions.
ReplyDeleteLearning JavaScript Stack helps developers understand both frontend and backend development while working with popular JavaScript technologies. Developers can build complete web applications, connect APIs and databases, implement authentication, and create scalable solutions using a single programming language across multiple layers. JavaScript Full Stack Course
ReplyDeleteJavaScript Stack – Powered by Blogger provides useful learning resources and development ideas for students, beginners, and professionals interested in modern web development.