Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Time to refactor?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Time to refactor? (Read 1183 times)
bpr-admin
Newbie
Posts: 3
Karma: 0
Time to refactor?
«
on:
May 04, 2022, 06:05:58 pm »
I know this will probably sound crazy, and would be a huge challenge, however:
I believe that PHP has had its day. Now is a great time to move on. I believe that OPNsense would be a much better product if it was refactored/re-written in Go. OPNsense would seem right up Golang's alley.
Besides "It's hard" or "It takes too much time", why would OPNsense not want to drop php for golang??
Logged
Patrick M. Hausen
Hero Member
Posts: 6810
Karma: 572
Re: Time to refactor?
«
Reply #1 on:
May 04, 2022, 07:31:10 pm »
For a web UI? Seriously?
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
EdwinKM
Full Member
Posts: 155
Karma: 5
Re: Time to refactor?
«
Reply #2 on:
May 04, 2022, 08:25:04 pm »
What would be the benefits? Especially for this project. They are still refactoring the old pfsense/monowall codebase to a more mvc design. Why throw away all that work? And creating new bugs in the process probably.
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Time to refactor?
«
Reply #3 on:
May 05, 2022, 02:23:03 pm »
It's probably faster to drop all the code and start again, but that's willing to scrap a lot of "knowledge" bound in existing code. We already have occasional issues with complex networking and implied functionality so probably the biggest reason not to do it is regressions.
Reason number two: PHP isn't that bad of a language that it was 20 years ago.
Lastly, efforts are underway to change backend functionality to Python where possible, but it's a slow crawl for first reason listed and isolating the whole backend to be able to run PHP without root is an eventual target with that, which would take the remainder of problems from reason number two away.
All in all, it just takes a lot of years to do this. If you asked 2015 we would have said we would be further in 2020, but now it's 2022 and we are probably half way to where we want to be. If that's still true in 2025 I don't know but we will see.
Cheers,
Franco
Logged
bpr-admin
Newbie
Posts: 3
Karma: 0
Re: Time to refactor?
«
Reply #4 on:
May 05, 2022, 04:13:12 pm »
Thank you for that reply.
Quote
Lastly, efforts are underway to change backend functionality to Python where possible
That's great to hear, I had no idea.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Time to refactor?