News for hackers. Stuff that matters.
Re:Why I’m rewriting my SaaS by jdsully on Monday May 20, 2019 @12:21PM (#19961999)
This Joel on Software article “Things You Should Never Do” is quite timeless and worth a good read. The first one is never to rewrite your software. Your just giving your competitors a free break.

https://www.joelonsoftware.com/2000/04/06/things-you-should-...

Re:Why I’m rewriting my SaaS by growtofill on Monday May 20, 2019 @02:05PM (#19963221)
Joel’s conclusions were based on a single data point. There were successful rewrites as well: https://medium.com/@herbcaudill/lessons-from-6-software-rewr...

In particular, Basecamp successful rewrite seems more applicable here, since both are web services. They never sunset previous two versions though.

Edit: typo.

Re:Why I’m rewriting my SaaS by jdsully on Monday May 20, 2019 @06:17PM (#19965859)
Actually it was based on multiple datapoints: Netscape, Quattro Pro, Arago, and Microsoft Word.
Re:Why I’m rewriting my SaaS by riku_iki on Monday May 20, 2019 @02:09PM (#19963252)
I rewrote my app from AngularJS to Angular 2, very happy with result. Rewrite is justified if it will allow to move faster in the future.
Re:Why I’m rewriting my SaaS by raviojha on Monday May 20, 2019 @01:29PM (#19962768)
This! OP, please consider thinking over this before you set out on the voyage.
Re:Why I’m rewriting my SaaS by reillychase on Monday May 20, 2019 @01:34PM (#19962814)
Great post, and appreciate what he is saying. But in this case I'm kind of locked into WordPress and the plugins I'm using. It will be much easier to start over with Laravel Spark which will give me more control. From there, I agree that it should never be rewritten again, only refactored.
Re:Why I’m rewriting my SaaS by momokoko on Monday May 20, 2019 @02:07PM (#19963239)
You can encapsulate your business logic on the WordPress PHP side into PHP classes first.

What you want to do is break your WordPress application into classes containing the business logic and turn WordPress into a dumb wrapper for those classes. At that point, you can move those new classes over to Laravel when you are ready to make the switch.

For example, you can switch your customer dashboard views over to be written in Laravel. You can use either nginx/apache to route, or have a base index.php file that either includes the WordPress index.php or the Laravel index.php based upon PHP code. Within your new Laravel routes, you will be boostrapping WordPress from Laravel and calling WordPress code from within Laravel.

For example the WordPress users. You could create a new class and interface to encapsulate all of the WordPress user code inside your WordPressUser class that implements MyAppUserInterface. Eventually, you will create a new class that implements that interface for Laravel once you are ready to switch out WordPress for user management and use Laravel. With that said, I would likely leave users to be the very last thing you change. And quite possibly, think about leaving WordPress around solely for user auth and management.

The same idea works for posts and other entities you are currently using within WordPress.

On the WordPress side you can implement hooks that can call methods on the Laravel side as you move through the transition.

Rewrites are so often deadly. Please put some serious thought into it. No one knows your business better than you do, so I'll just leave you with that friendly advice.

Also, writing this makes me chuckle as I can't even get a response from a single resume I've sent out over the last two weeks. Sigh...

Re:Why I’m rewriting my SaaS by gravypod on Monday May 20, 2019 @01:50PM (#19963031)
Have you considered keeping your wordpress as a "frontend" and making API calls to a backend build in laravel? You could slowly migrate your code to a `/v2/` path on the same system. Then, once everything is moved into API calls on the `/v2` path you can just write a new frontend that talks to the new APIs you've built.
[dead]
Re:Why I’m rewriting my SaaS by twblalock on Monday May 20, 2019 @01:48PM (#19963007)
Maybe it was downvoted when you saw it, but it isn't now. Maybe it will be downvoted again next time someone sees it. Who knows? This is why it's a bad idea to complain about downvotes.
Re:Why I’m rewriting my SaaS by jdsully on Monday May 20, 2019 @06:15PM (#19965848)
It was down-voted because I didn't explain why the article was relevant. I added the last two sentences a bit later.