Ask HN: Best-architected open-source business applications worth studying?
Not just good code described in books like Code Complete, But aslo has a great architecture as a whole, and should be open source business applications, as there are many great library/framework/generic applications like Yii Redis Lua Linux, but open source business applications with great architecture not easy to find.
95 comments
[ 4.2 ms ] story [ 209 ms ] threadOpenERP, now Odoo, is written in Python.
OpenEMR is written in PHP. It dates from a while ago, but has been mostly updated to the latest PSR standards.
Might also try OrangeHCM, but not sure what those guys are doing these days.
None of this is arguing that one or the other style of architecture is "better" per se, but rather the architectures are different because they were in the end optimized for different kinds of development organizations.
Most business applications remain fundamentally a three-tiered architecture, with the interesting stuff today tending to happen in how you slice that up into microservices, how you manage the front end views (PHP and static web apps are pretty different evolutionary branches), and critically how you orchestrate the release and synchronization/discovery of all those microservices.
(None of which is directly an answer to your question, but is more meant to say that lots of the most interesting stuff is getting harder to spot in a conventional github repository because much of it is moving much closer to the ops side of devOps)
[0] http://www.hbs.edu/faculty/Publication%20Files/08-039_1861e5...
I'll also mention a somewhat related article here, not directly on topic, but likely interesting to those reading about conway's law and architectures: Microsoft Research did some very interesting work on the interplay of code quality and organizational metrics (e.g. how high in the org chart do you have to go to get everyone who committed code to a specific DLL or what fraction of the developers under that lead engineer committed code to that DLL, or etc). Their conclusion, simply put, was that organizational metrics appeared to better model actual end user experienced shipped code quality than more traditional test metrics[0].
[0] https://www.microsoft.com/en-us/research/publication/the-inf...
I'm thinking of Odoo for example, almost exclusively developed by Odoo S.A. (not saying it's a particularly good codebase to look at though).
Spree has a clean API, clear models, front end and back end, extensions, and command line tools.
https://github.com/spree/spree
Especially take a look at the models:
https://github.com/spree/spree/tree/master/core/app/models/s...
Nginx has a lot of respect on the market for handling high concurrency as well as exhibiting high performance and efficiency.
I don't even have to speak about the Git architecture. It speaks plainly for itself.
There's a series of books called The Architecture of Open Source Applications that does justice to this topic
http://aosabook.org/en/index.html
PostgreSQL is also extremely nice.
Thankfully, I went for a coffee, came back and the tab was still open for a more complete read. I've worked on tons of projects in my career -- from healthcare to finance, large insurance companies and defense. I really think SQLite is definitive case study on how to test your code-base in a "meaningful" (where "meaningless" would be generating the aforementioned permutations) manner. As new methods of testing emerge, they expand the scope of their coverage as well (i.e., AFL and other fuzzing techniques which emerged circa 2014).
Hats off to their team for the discipline. If I ever need someone to manage taking a pacemaker to production, I'd hire whoever was in charge of their testing, give them access to Fidelity Payroll, hand them the p-card, and tell them "whatever you need, it's yours, buddy".
[1] https://sqlite.org/testing.html
Even though I'm pretty comfortable with git thanks to attending a two day workshop conducted by a guy from Github, I still like using tortoise git.
I understand the value of being familiar with your tools, but sometimes the CLI just isn't the right one.
EDIT: btw, I use the vim plugins in all of my work (VS, VSCode), so I'm not shy when it comes to learning curves.
Gets all the differences between your current unstaged changes vs your head, no need for typing 20 individual paths
By the way, you might want to look at the `--diff-word` option.
Don't get me wrong, knowing the command line is invaluable when it comes to corner cases that just don't work well in a GUI and automating tasks.
As to your use case, git diff has never failed me.
This is all aside from the fact that the CLI is ubiquitous. One day you'll be in a situation where it's all you have access to, and you'll thank yourself for having learned it (or kick yourself for not).
From any of the IntelliJ derivatives I'll tend to do add, commit, push and diff just because it's a clean interface where I'm already working. I've never really like any of the standalone 3rd party tools though. They just never felt like they gave me anything all that useful.
I've seen others get in situations with fussy merge conflicts or a detached HEAD and be clueless why the UI isn't working properly. I can't blame them though, since git can be complicated and a tool like SourceTree has to make things nicely-abstracted to be helpful/productive. It's hard to know what details to make explicit/simplify, and I think with git there's a lot of work we could still do.
I've been looking for years to find something like it for git. Nearest I've seen was GitKraken, but it's UI is still horribly opaque, can't invoke from cmdline in nearly the same way, and requires me remotely authenticate (!?) to use it :|
However, it's quite important to recognize when your basic git skills are not enough anymore. Which often is joining a bigger team/company.
What can't be done from the GUI? The only thing I've had to do from the command line is using git subtrees.
Speaking of that, which git GUI is good, in your opinion? I tend to use Git from the command line, but had tried out a few GUIs for a project earlier, but not enough to decide. GitEye was one, another might have been SourceTree (IIRC it is from Atlassian).
You can put down a sequence of git invocations in a text file or script, stare at them, reason about them, tweak them as appropriate for your use case, copy and paste them to another developer, write about them in a blog post, include them in a README.
It's harder to do this with a sequence of gui actions.
Most developers, pull, push, merge, rebase, and fix merge conflicts.
Really I'm disappointed that people don't build their computers from scratch these days. You don't know what's going on when you have so many components joined together with random blobs of firmware.
Give me a bare Z80, a bunch of RAM, and anybody could understand it. Plus if you're writing your code in assembly you can optimize better than any compiler - they wouldn't know enough to use your opcodes as constants when you need to.
/s
Not only has it been a time and life saver in my coding projects, it has also helped me out in other aspects - keeping versions of documents.
Once, at work, I created a script that would take regular git 'snapshots' of all the procedures defined on a SQL Server. O'course, there could have been better code management and deployment practices in the first place, but this script let me introduce some sanity without affecting the DBAs workflows.
Off-late, I have been working on a pure python implementation of Git (Calling it Pigit [1]). While, I am attempting to clone git's behavior in Python, I believe there are important lessons to be learned about the different components involved. I am also attempting to see if I can make it modular enough to have changeable 'reference' or 'object' store (instead of the file system). One use-case I can think of, off the top-of-my-head, is having an entirely in-memory repository for testing scripts or purely for pedagogical reasons.
Strangely, I never thought of looking into the AOSA Book for Git! Thanks for the reference :)
[1] https://github.com/rajatkhanduja/pigit
Anyway, here are some projects which I can recommend by its source code:
* OpenBSD. Also the other BSDs. Plan9. And the BSD tools. Linux is a bit bloated but maybe it has to be. I don't recommend the GNU tools.
* LLVM/Clang.
* WebKit. Also Chrome. Firefox not so much, although maybe it improved.
* Quake 1-3, as well as other earlier id games. Really elegant and clean. Also not that big in total. Doom 3 has become much bigger in comparison but again maybe it has to be.
* CPython. Anyway interesting also for educational purpose.
* TensorFlow. Very much not Theano.
I really enjoy reading the source code of most projects which I used at some point. Some code is nicer, some not so nice, mostly judged by how easy it is to understand and how elegant it seems to be. In any case it really is rewarding to look at it as you will gain a much better understanding of the software and often you will also learn something new.
"On January 16, 2008, MySQL AB announced that it had agreed to be acquired by Sun Microsystems for approximately $1 billion"
https://en.wikipedia.org/wiki/MySQL_AB
Edit: sorry, missed the question entirely. I thought OP said "open-source businesses worth studying"
Frappe also lets you build extensions (apps), add hooks to standard events, has a built in RESTAPI and more. Here is a quick overview https://www.slideshare.net/mobile/rushabh_mehta/frapp-framew...
Disclaimer: see my bio
The learning curve to go from I've never heard of them to reading about them, to installing them and using them was very small at least for Consul, Nomad, and Vault.
Something that's expandable by multiple departments, expandable business-specific logic, modular, plug-in infrastructure, the ability to work with multiple authentication schemes, etc....
Take a look at Liferay Portal: https://github.com/liferay/liferay-portal/
Edit: fixed all my typos.
Wasn't the question about business applications?
Redeeming answers: ERPNext, Odoo, OpenERP, OpenERM
Define "business application".
To me, it would be defined as "application used in a business" (EDIT: or more precisely: "application upon which a business is built"). Web servers, databases, and (maybe) operating systems definitely qualify. So do web browsers.