Re:Show HN: Open-Source Rails Point of Sale
by al2o3cr on Friday April 11, 2014 @02:36PM
(#7574618)
Neat project. A couple code-reviewish notes:
* why use protected_attributes in an new Rails 4 project? I'm curious what motivated this decision.
* if you're destroying records, you'll want to look into using the :dependent option to has_many to make sure you clean things up. However, you may want to carefully consider where in the app "deletion" actually makes sense; anything that winds up in an accounting system probably shouldn't be deletable at all.
* get the tests running. The version on Github has a controller test for "ZusersController" which doesn't appear to exist in the application...
* a minor thing, but it'll drive future contributors crazy: hard tabs vs. soft tabs. Ruby code is usually two-space soft-tabs, but even if you don't agree with that at least be consistent. There are files on GH that are a riot of mixed tabs (configurations_controller.rb is a notable example) and nobody's got time for that.
I'm not the best at catching replies on HN, but ping me on Github (same username) if you want to discuss further.
Re:Show HN: Open-Source Rails Point of Sale
by mtrpcic on Friday April 11, 2014 @03:22PM
(#7574932)
Thanks for someone pointing this out. There are a lot of places in the code that could use some cleaning up. The overall frontend code structure is a little lacking:
* There's a "main.js", and a bunch of empty .coffee files that were presumably generated via a generator. Choose one frontend language and use it.
* Vendor libs should go in vendor/assets/javascripts. This codebase has assets/javascripts/vendor, and then random vendor libs that aren't even in that folder, they're just in "javascripts".
* The frontend code is going to quickly become jquery soup. There's no structure, all code executes on all pages.
* Very minor, but OS specific files should be omitted from git (like .DS_Store)
* Test coverage seems pretty low
* The secret token is public in the git repo (Why not use secrets.yml and keep it out of SCM to be safe?)
There are a myriad of other minor issues as well. It's a good idea for a project, and would help a lot of entrepreneurs out of done properly, but there are some glaring code quality issues here that worry me about the project as it grows.
Re:Show HN: Open-Source Rails Point of Sale
by websitescenes on Friday April 11, 2014 @03:31PM
(#7575015)
Also really great feedback. I have been programming for only three years so I am still learning much of what you describe. I will be cleaning out the unused template files very soon. Good point on jQuery firing on each page, although I am not really sure why it matters if it has no effect. Processing time? There are no tests but I hope to add some soon. (I have never written any, so I will have to learn)
Re:Show HN: Open-Source Rails Point of Sale
by allyjweir on Friday April 11, 2014 @08:42PM
(#7576399)
For the JQuery, it is more about separation of concerns and keeping a maintainable an clear codebase. If all of your JQuery is in one file and somehow a small change to one part breaks another page's code that can be very difficult to catch/fix. It's just good form in general to separate it out.
You're also right about performance. Loading unnecessary stuff on a page is just going to slow everything down.
It's a great idea and also being a relatively new starter myself I can relate. Hopefully you can take all the feedback everyone is giving and make your project better!
Re:Show HN: Open-Source Rails Point of Sale
by websitescenes on Friday April 11, 2014 @03:25PM
(#7574952)
This is very valuable feedback! Thank you so much. I will remove protected attributes. I have thought about deletion and dependents and so forth I just wasn't sure how to address it yet. I must admit, I have completely ignored tests, thinking that I would write them later, but perhaps this is the wrong approach. As for indentations, they show properly on my end in Sublime, I will have to see why they appear differently in the repo. Again, really great feedback, I may take you up on a further discussion.
Re:Show HN: Open-Source Rails Point of Sale
by websitescenes on Friday April 11, 2014 @12:51PM
(#7574016)
When I actually finish, I will do all that stuff. I would say I am about 80% done. Trying to figure out how to make it easily extendible. I will probably use generators to facilitate custom module generation. Once those are done. I will write docs, etc. I may have jumped the gun by posting it here in its current form; Still I thought someone might find it interesting.
Re:Show HN: Open-Source Rails Point of Sale
by websitescenes on Friday April 11, 2014 @01:47PM
(#7574335)
That's awesome! I am glad there are people addressing this issue out there. With that said, I have to say that I am not interested in java at all. I think that java is one of the limiting factors of current point of sale systems. I prefer the web based approach and think that this is the future of retail sales. With that said, there are obvious detractions to a web based approach, like having to have an internet connection but I think that is acceptable.
Re:Show HN: Open-Source Rails Point of Sale
by morganvachon on Friday April 11, 2014 @03:02PM
(#7574777)
Not necessarily an Internet connection, but definitely a local network. Before we caved in and started using Quickbooks across the board for both invoicing and POS retail in our storefront, the bosses had me whip together a custom POS based on parts of OpenBravo and OpenPOS. I was running a virtualized, modified OpenBravo ERP server that was connected to the front register running a heavily modified OpenPOS front end. It was quirky, buggy, and ugly, but even if we lost Internet we could still operate as long as the LAN stayed up.
Now we're using Quickbooks for everything, because our accounting office wanted easier reporting. It's a nightmare, but at least we have good outside support across the board, instead of me being on call 24/7.
I'd love to give your project a shot in my spare time, and see if it might be useful for inventory management if nothing else. Quickbooks sucks in that area without their expensive add-ons.
Re:Show HN: Open-Source Rails Point of Sale
by iagorodriguez on Friday April 11, 2014 @03:35PM
(#7575053)
I found this project really interesting. Forked it. It might be interesting to create platforms like this for the very commmon uses-cases: ecommecrce, blogging, CMS. Currently there are solutions for all this use cases in the rails community but imo they are pretty directed. I mean, they are "difficult" to modify. I would like something like rails composer where you can configure the basic elements of the platform without custom generators.
Re:Show HN: Open-Source Rails Point of Sale
by LukeWalsh on Friday April 11, 2014 @12:53PM
(#7574028)
This is something I'm 100% behind. As a developer who works integrating with point of sales systems this is an industry ripe for disruption. The pain of integrating is killing innovation in retail. Whether it will be open source or someone like square I look forward to an industry standard in the future.
Re:Show HN: Open-Source Rails Point of Sale
by websitescenes on Friday April 11, 2014 @12:59PM
(#7574063)
I 100% agree with you. I have had client after client be limited by their point of sale and I have just had enough. I just want a simple web based solution that is easy to deploy and plays nice with standard API's. Thanks for the motivation Luke.
Re:Show HN: Open-Source Rails Point of Sale
by SheepSlapper on Friday April 11, 2014 @01:27PM
(#7574232)
I couldn't agree more. A few years back I wrote integrations for various Micros/Aloha POS systems, and it was painful. The industry as a whole seems to be stuck in the 90's.
Re:Show HN: Open-Source Rails Point of Sale
by wil421 on Friday April 11, 2014 @02:10PM
(#7574469)
Part of the problem is customer not wanting to update systems already in place (update to a new version of Aloha).
I work for the company that makes Aloha and I can see the newer products we are offering yet not many restaurants I frequent seem to be using the new versions.
We also make one for small business called Silver but I dont know how much has caught on.
Re:Show HN: Open-Source Rails Point of Sale
by SheepSlapper on Friday April 11, 2014 @02:14PM
(#7574498)
Totally. There hasn't been an incentive for them to upgrade, so they haven't. As more people get into the space and do cool things on top of POS systems that play nice with developers, they might be more inclined to switch/upgrade so they can have the same cool features as everyone else.
The industry is definitely moving in that direction, but POS companies are behemoths that haven't had to innovate in the past 20 years, so it'll be slow and painful.
Re:Show HN: Open-Source Rails Point of Sale
by sandGorgon on Friday April 11, 2014 @01:33PM
(#7574270)
could you talk some more on what is so painful about this ? I'm looking to join a startup that is looking to play in this space (in India) and I'm wondering, from a noob POS guys/experienced developer perspective, what the challenges are ?
is it that vendor docs are poor or is it something else ? I would like to think that system software integration is always trickier than .. say web API integrations.
In first place, API???? What the hell is that? No kid, POS/ERPs don't know what a true API is. Is direct access to the DB, plan text files, and a lot of hyper-pain talking directly to the developers of that systems. And good look doing data archeology of all of that.
Because this I'm also building a POS for the iOS (in late stage, but is hard to do this solo). One of the innovations it have? The customer table is called: drum-drum-drum "Customer". Seriously, after dozens of integrations mine is the only one that the tables have names that make sense. And the fields. And the data type of that fields (cough a database have a datetime field? cough).
Re:Show HN: Open-Source Rails Point of Sale
by SheepSlapper on Friday April 11, 2014 @02:09PM
(#7574463)
Probably the biggest problem is that documentation doesn't exist, is wrong, or is the crappy "GetItems returns Items" variety.
POS companies will often charge you a large sum of money in order to work with their systems. I think we paid Micros $10k to be able to integrate with their junk, and we had to fly to Maryland and sit in their offices for 2 days while they ran around being useless.
Workflows can be vastly different. If you're trying to write an IPOS interface that abstracts all that pain away for the client that's interacting w/ the system, it can lead to weird situations. Some POS systems will let you open a check w/ nothing on it (Aloha) but some won't (Micros). And on Aloha, if a server logs in and looks at that empty check before you put something on it, it'll automatically close. There are a ton of edge cases that you have to test, and the way two POS systems work in similar conditions are never the same.
Getting menu data out of a POS is a nightmare, as there's usually a ton of unused junk that you don't need. Often there are many duplicates, so the Onion topping you add to a taco is different from the Onion topping you add to nachos, and both are different from the Onion topping you'd put on a burrito. Despite the fact that it's literally the same onion being used. Sometimes, menu items that are on sale for happy hour or something aren't different items, but they get modified with "happy hour". You don't want your users seeing that junk, so you have to do a bunch of magic behind the scenes to submit the normal item AND the happy hour mod when the user orders it.
I could go on, there's a LOT of this weirdness when working with POS systems and most of the time you don't know what it'll be until you've sat there banging your head against your desk because when you order a Sandwich + fries it works, but a Sandwich + garlic fries will only add the fries to the cart. Feels good when you're finally done with the integration, but it's hell getting there.
Oh, and a lot of the time there is no real API, you're changing database files or doing some sort of dark voodoo magic to get the thing to work. Sometimes you get lucky and there's a SOAP service or some COM calls you can make that'll play nice with the POS, but that's hardly ever the case.
Re:Show HN: Open-Source Rails Point of Sale
by websitescenes on Friday April 11, 2014 @01:52PM
(#7574363)
Did you just call me a noob? You hurt my feelings haha.
It is difficult if you are coming from a web development standpoint. I started programming with PHP and moved to Ruby recently and I am not familiar with Java or the like. For someone that is familiar with those technologies I am sure it is a snap but honestly I have zero interest in learning Java or anything similar. I want to use the things I am familiar with. And yes, documentation is almost always horrible because POS companies almost always want you to pay them to integrate or extend the system.
* why use protected_attributes in an new Rails 4 project? I'm curious what motivated this decision.
* if you're destroying records, you'll want to look into using the :dependent option to has_many to make sure you clean things up. However, you may want to carefully consider where in the app "deletion" actually makes sense; anything that winds up in an accounting system probably shouldn't be deletable at all.
* get the tests running. The version on Github has a controller test for "ZusersController" which doesn't appear to exist in the application...
* a minor thing, but it'll drive future contributors crazy: hard tabs vs. soft tabs. Ruby code is usually two-space soft-tabs, but even if you don't agree with that at least be consistent. There are files on GH that are a riot of mixed tabs (configurations_controller.rb is a notable example) and nobody's got time for that.
I'm not the best at catching replies on HN, but ping me on Github (same username) if you want to discuss further.
* There's a "main.js", and a bunch of empty .coffee files that were presumably generated via a generator. Choose one frontend language and use it.
* Vendor libs should go in vendor/assets/javascripts. This codebase has assets/javascripts/vendor, and then random vendor libs that aren't even in that folder, they're just in "javascripts".
* The frontend code is going to quickly become jquery soup. There's no structure, all code executes on all pages.
* Very minor, but OS specific files should be omitted from git (like .DS_Store)
* Test coverage seems pretty low
* The secret token is public in the git repo (Why not use secrets.yml and keep it out of SCM to be safe?)
There are a myriad of other minor issues as well. It's a good idea for a project, and would help a lot of entrepreneurs out of done properly, but there are some glaring code quality issues here that worry me about the project as it grows.
You're also right about performance. Loading unnecessary stuff on a page is just going to slow everything down.
It's a great idea and also being a relatively new starter myself I can relate. Hopefully you can take all the feedback everyone is giving and make your project better!
Now we're using Quickbooks for everything, because our accounting office wanted easier reporting. It's a nightmare, but at least we have good outside support across the board, instead of me being on call 24/7.
I'd love to give your project a shot in my spare time, and see if it might be useful for inventory management if nothing else. Quickbooks sucks in that area without their expensive add-ons.
I work for the company that makes Aloha and I can see the newer products we are offering yet not many restaurants I frequent seem to be using the new versions.
We also make one for small business called Silver but I dont know how much has caught on.
The industry is definitely moving in that direction, but POS companies are behemoths that haven't had to innovate in the past 20 years, so it'll be slow and painful.
It really sucks because I can see what new technologies can bring to the table. I really feel POS systems should run on any desktop hardware.
is it that vendor docs are poor or is it something else ? I would like to think that system software integration is always trickier than .. say web API integrations.
I have a iOS app that integrate with several ERPs/POS (http://elmalabarista.com/bestseller) that is used in my country.
In first place, API???? What the hell is that? No kid, POS/ERPs don't know what a true API is. Is direct access to the DB, plan text files, and a lot of hyper-pain talking directly to the developers of that systems. And good look doing data archeology of all of that.
Because this I'm also building a POS for the iOS (in late stage, but is hard to do this solo). One of the innovations it have? The customer table is called: drum-drum-drum "Customer". Seriously, after dozens of integrations mine is the only one that the tables have names that make sense. And the fields. And the data type of that fields (cough a database have a datetime field? cough).
POS companies will often charge you a large sum of money in order to work with their systems. I think we paid Micros $10k to be able to integrate with their junk, and we had to fly to Maryland and sit in their offices for 2 days while they ran around being useless.
Workflows can be vastly different. If you're trying to write an IPOS interface that abstracts all that pain away for the client that's interacting w/ the system, it can lead to weird situations. Some POS systems will let you open a check w/ nothing on it (Aloha) but some won't (Micros). And on Aloha, if a server logs in and looks at that empty check before you put something on it, it'll automatically close. There are a ton of edge cases that you have to test, and the way two POS systems work in similar conditions are never the same.
Getting menu data out of a POS is a nightmare, as there's usually a ton of unused junk that you don't need. Often there are many duplicates, so the Onion topping you add to a taco is different from the Onion topping you add to nachos, and both are different from the Onion topping you'd put on a burrito. Despite the fact that it's literally the same onion being used. Sometimes, menu items that are on sale for happy hour or something aren't different items, but they get modified with "happy hour". You don't want your users seeing that junk, so you have to do a bunch of magic behind the scenes to submit the normal item AND the happy hour mod when the user orders it.
I could go on, there's a LOT of this weirdness when working with POS systems and most of the time you don't know what it'll be until you've sat there banging your head against your desk because when you order a Sandwich + fries it works, but a Sandwich + garlic fries will only add the fries to the cart. Feels good when you're finally done with the integration, but it's hell getting there.
Oh, and a lot of the time there is no real API, you're changing database files or doing some sort of dark voodoo magic to get the thing to work. Sometimes you get lucky and there's a SOAP service or some COM calls you can make that'll play nice with the POS, but that's hardly ever the case.
It is difficult if you are coming from a web development standpoint. I started programming with PHP and moved to Ruby recently and I am not familiar with Java or the like. For someone that is familiar with those technologies I am sure it is a snap but honestly I have zero interest in learning Java or anything similar. I want to use the things I am familiar with. And yes, documentation is almost always horrible because POS companies almost always want you to pay them to integrate or extend the system.