Advice and stuff

moe46664

Well-Known Member
Joined
Nov 5, 2013
Messages
200
Reaction score
4
Hey guys

So I've been working as a junior dev for about two years now, with experience in Java and C derivative languages.
Most of my experience comes from working on existing tools and frameworks , which tends to be mighty boring at times (most of the projects I work on involves using an existing DAO to retrieve data from sql table, send it down , display it on jsp etc).

Hence my need for a side project. :D

I am really keen on learning new tech by creating a cool little side project for myself. In essence, I want to be able to develop something similar to a free cloud based POS system (extremely simple, not for profit or any ambitious dream to commercialize it and quit my day job. Just something cool to keep busy with.)

The problem is I have no idea how to implement something like this. All the system should do initially is allow a user to log on, create a product, store that product with its attributes(name, colour, price) in the db. Each user must see their own products , and be abe to edit their details and view only products they have created.

I have a good understanding of how this is done for a desktop app , but I am really keen on learning how this is done for cloud based systems. Some of the tech I would like to play with:

MongoDB (Or any other NoSQL database)
Nodejs for the server?
REST services
Java backend??
AngularJS frontend


Basically, what would I use to develop a cloud based POS system ? What components are written using which frameworks etc? What do I need to learn to accomplish this?



My idea would be:

Nodejs web server
MongoDB with mongoose
AngularJS / ReactJS frontend
Any sort of Java in between?

P.S Extreme junior here. All criticism welcome. Advice even more welcome.

Thanks
M0e
 
There are many technologies that can be used for such web apps. I have noticed that full-stack JavaScript solutions are becoming more popular. You may want to look at MEAN.IO and MEAN.JS for some solutions that already take care of the basics of most web applications (user login, registration, glue between JS components). These stacks already make use of the tech you mentioned. The advantage of using them is you only have to know one language (essentially), the trade-off is that the language is JavaScript. ;)

You also may want to look into the accountancy-side of things. What statistics would be worth generating, what requirements with other interfaces will there be - like slip printers and tills...
 
If you really want to learn MongoDB and use NodeJS, then Meteor is going to be fun to use: https://www.meteor.com/. Meteor is a solution for data, server, and Web browser.

However, MongoDB is not a suitable datastore for financial data. Use it, but know that it isn't going to handle floating point numbers very well. I wouldn't trust it not to lose digits (just a guess) and doing simple aggregate queries like sums, averages, or max+min takes a lot of effort.

I would use MongoDB for other data like user information and a DB like MySQL or PostgreSQL for financial records.

NodeJS with Express is an interesting solution. You definitely do not need to use any other server-side layer. It would just complicate matters so choose either Java or NodeJS. Not both.

For the front-end, I would argue that it is better to learn ReactJS as it seems like ReactJS is going to become the next big thing. AngularJS is very popular though and is easier to get started.
 
If you are really junior then my advice would be to break it down into chunks and aproach each component separately doing all the documentation and learning as you go. Completing all the architecture, use case, etc etc documents can be very boring if all you want to do is code but you end up needing to do POC's and doing reasearch to see whats possible and learning vast amounts from all the research you need to do so I do recommend aproaching it like a real project and going through all the phases. But in IT as long as you keep learning and experimenting you will do well.
 
Are there no Senior devs to bounce you're ideas off from?

Anyway, if you have a firm grasp of what tech fits where (front, backend) then watch a **** load of videos. Start with small apps using angular, node then try to scale it to a full blown site. Get your hands dirty.
 
I'd advise you to go sails.js (it's an MVC for nodejs using express) on the backend, angularjs ont he frontend and postgres for your database.

sails also has waterline as the database ORM which means that your database can change and your code stays the same.
It also comes with sockets baked in making integrations easy.


In your database you'll have a table with fields like:
product - id, name, description, image, created_date, updated_date
attribute - id, attribute, description
product_attribute - product_id, attribute_id

In sails you'll have 2 models for:
product
attribute
And controllers:
productController
attributeController
setup routes like:
/api/v1/product
/api/v1/attribute

After following the introduction video on the sailsjs homepage you should be able to do the above.
The reason you have the /api/v1/ in the route and not just /product is because as your app evolves, you may need to change the api. You can then put the updated API at /api/v2/xxxxx and not break stuff using the v1 api.

In your angular you'll have a product service/factory and an attribute service/factory

Doing a GET call to /api/v1/product should retrieve all the products,
Doing a POST call to /api/v1/product should create a product ( you put the product fields into the POST body),
Doing a GET call to /api/v1/product/:id (where id is the id of a product) should retrieve the specific product information,
Doing a DELETE call to /api/v1/product/:id (where id is the id of a product) will delete the product.

Hoepfully this gets you on your way.

As stated before, this is all javascript, so only 1 language to learn. Coming from C, it shouldn't be too hard to pick up.
Plus - once you get all this done you've set yourself up to being able to cross over to web dev if you want.
 
There are many technologies that can be used for such web apps. I have noticed that full-stack JavaScript solutions are becoming more popular. You may want to look at MEAN.IO and MEAN.JS for some solutions that already take care of the basics of most web applications (user login, registration, glue between JS components). These stacks already make use of the tech you mentioned. The advantage of using them is you only have to know one language (essentially), the trade-off is that the language is JavaScript. ;)

You also may want to look into the accountancy-side of things. What statistics would be worth generating, what requirements with other interfaces will there be - like slip printers and tills...

I will definitely look into this, sounds like just what I need to get started. Thanks dude! Appreciate the advice :-)
 
If you really want to learn MongoDB and use NodeJS, then Meteor is going to be fun to use: https://www.meteor.com/. Meteor is a solution for data, server, and Web browser.

However, MongoDB is not a suitable datastore for financial data. Use it, but know that it isn't going to handle floating point numbers very well. I wouldn't trust it not to lose digits (just a guess) and doing simple aggregate queries like sums, averages, or max+min takes a lot of effort.

I would use MongoDB for other data like user information and a DB like MySQL or PostgreSQL for financial records.

NodeJS with Express is an interesting solution. You definitely do not need to use any other server-side layer. It would just complicate matters so choose either Java or NodeJS. Not both.

For the front-end, I would argue that it is better to learn ReactJS as it seems like ReactJS is going to become the next big thing. AngularJS is very popular though and is easier to get started.

Had a look at Meteor and it looks fun indeed. I will definitely start playing around with this today. Thanks for the advice, will probably implement something using either Postgres or MySQL.

Went through a few tutorials on ReactJS, the interesting thing is that it has a virtual DOM that it uses to determine how best to render your HTML, and it looks like it outperforms angular as well. Will definitely look into this.

Thanks!!
 
If you are really junior then my advice would be to break it down into chunks and aproach each component separately doing all the documentation and learning as you go. Completing all the architecture, use case, etc etc documents can be very boring if all you want to do is code but you end up needing to do POC's and doing reasearch to see whats possible and learning vast amounts from all the research you need to do so I do recommend aproaching it like a real project and going through all the phases. But in IT as long as you keep learning and experimenting you will do well.

This is exactly what I needed to hear. I agree that going through all the phases will probably contribute more towards my career growth as well. Will definitely keep you updated. Thanks for the awesome advice!
 
I'd advise you to go sails.js (it's an MVC for nodejs using express) on the backend, angularjs ont he frontend and postgres for your database.

sails also has waterline as the database ORM which means that your database can change and your code stays the same.
It also comes with sockets baked in making integrations easy.


In your database you'll have a table with fields like:
product - id, name, description, image, created_date, updated_date
attribute - id, attribute, description
product_attribute - product_id, attribute_id

In sails you'll have 2 models for:
product
attribute
And controllers:
productController
attributeController
setup routes like:
/api/v1/product
/api/v1/attribute

After following the introduction video on the sailsjs homepage you should be able to do the above.
The reason you have the /api/v1/ in the route and not just /product is because as your app evolves, you may need to change the api. You can then put the updated API at /api/v2/xxxxx and not break stuff using the v1 api.

In your angular you'll have a product service/factory and an attribute service/factory

Doing a GET call to /api/v1/product should retrieve all the products,
Doing a POST call to /api/v1/product should create a product ( you put the product fields into the POST body),
Doing a GET call to /api/v1/product/:id (where id is the id of a product) should retrieve the specific product information,
Doing a DELETE call to /api/v1/product/:id (where id is the id of a product) will delete the product.

Hoepfully this gets you on your way.

As stated before, this is all javascript, so only 1 language to learn. Coming from C, it shouldn't be too hard to pick up.
Plus - once you get all this done you've set yourself up to being able to cross over to web dev if you want.

I am installing this as we speak. I am definitely going to follow your advice and do a couple of tutorials here. I'm probably going to go through a lot of trial and error, but will definitely let you guys know how far I get and perhaps post a side project thread soon :-)

Thanks for all the help and advice man

Moe
 
Are there no Senior devs to bounce you're ideas off from?

Anyway, if you have a firm grasp of what tech fits where (front, backend) then watch a **** load of videos. Start with small apps using angular, node then try to scale it to a full blown site. Get your hands dirty.

Wax on , wax off. I've found a crap load of videos etc. Time to get my hands dirty. Appreciate the advice :-)
 
Top
Sign up to the MyBroadband newsletter
X