I’m getting quite comfortable developing in SuiteCRM 7 and really enjoy it.
The time has come to venture into SuiteCRM 8. I have read over the Developer Guide and it’s really new to me. I didn’t go to school for software development so I really need to learn this stuff buy understanding it and then trial and error (and a lot of guidance from you in this forum). So looking for some “big picture” advice to get started and just to clarify in my head how it all works. If anyone can help guide me I’m sure I’m not the only one with these questions:
Do I need to create the development deveopment environment and push back and forth or is this just “best practice”
Do I need to yarn build for any changes to take effect? Or only front end changes? (ie do I need to do this for things like before_save hooks and other backend type stuff?)
Once I build the dev how do I access it in my browser for testing? What’s the URL?
So big picture (as I think I understand it), I run the commands to create the dev environment, make changes to the dev… will they be immediately visible in the dev, or do I need to rebuild the dev for them to take effect? Or is that what the --watch does, automatically adds changes to the build?
So then, if lets say my assumptions are correct and dev is the way I want it, I need to run the yarn command to push them to production?
(sorry I know this sounds simplistic, but that’s where I’m starting from)
Before moving to v8, just a question about v7 - are you using an IDE already? if you’re still missing out on the joys of XDebug and stepping through the code, calmly looking at call stacks and watched variables… then that’s what I would recommend that you learn first.
That knowledge would also be valuable for the move to v8.
About your questions:
You mean git push/pull? Not necessary, but yes, quite useful
yarn is for front-end changes only (Angular). Many other things won’t require those rebuilds, things like logic hooks, metadata changes, etc. Note that this build is quite resource-hungry (RAM!)
This is independent of v7 / v8, it’s just how you set up your web server (I’m talking about your main web server like Apache, not the built-in ng web server, which is optional).
Thanks @pgr, The docs say that you have to install a dev package to get started. I’m kind of confused about this, I had in my mind after reading it that it would create a separate “dev” installation where you would make changes and then push them to production. Maybe my terminology isn’t right, but I guess the dev is properly called the “extension”?
The dev package is just a normal SuiteCRM installation with an added “dist” directory:
The dist folder is the master folder containing all the essential files and subfolders which are hosted on the server. It contains transpiled code of Angular apps in JS, HTML and CSS files. This folder gets created itself when run ng build comand.
So it’s basically a way of saving you from having to build the whole thing (since you will be building it).
A different issue is the Symfony environment, defined by APP_ENV setting in .env. This can be prod, dev or qa. You can do dev work with prod environment, no problem, but if choose dev you get extra debugging info (along with a slower build and execution).