... do you think the developers adopted:
- the service call technique to pull data from the module tables for example vs using the db_xxx calls back in ver 6?
- sometime's tracing a variable value back through the multitude of functions that call functions is mind boggling but I'm sure there's good reasons to do it that way. Any thoughts on why it was done like that?
- I've always associated the word 'injection' with security issues yet this app uses injections often. Is this a semantics thing where what I think the definition of the term is really is not what is going on. Why and what are injections?
- On a given block, you can adjust the cache setting from the default setting to whatever. I keep everything on 0 but since it's an option, obviously there is a good reason why you may want to adjust the cache variable. What is a good example of when you would want to do that and what should that number be?
Don't spend too much time trying to answer, this is just me "wondering" out loud so-to-speak. I use Dolphin more as a real time learning platform than trying to monetize it as a public site. But if you do have a quick thought about the bullet items above, it'd be great to hear from you. And maybe the collective contribution of knowledge would be good for anyone else wanting to learn.
|
I am trying to find out as much as I can about Dolphin and programming as well.
I'm Eagerly waiting for some answers, explanations...
Best wishes
Mayki
"When things get tough the tough get going..." |
... do you think the developers adopted:
- the service call technique to pull data from the module tables for example vs using the db_xxx calls back in ver 6?
- sometime's tracing a variable value back through the multitude of functions that call functions is mind boggling but I'm sure there's good reasons to do it that way. Any thoughts on why it was done like that?
- I've always associated the word 'injection' with security issues yet this app uses injections often. Is this a semantics thing where what I think the definition of the term is really is not what is going on. Why and what are injections?
- On a given block, you can adjust the cache setting from the default setting to whatever. I keep everything on 0 but since it's an option, obviously there is a good reason why you may want to adjust the cache variable. What is a good example of when you would want to do that and what should that number be?
Don't spend too much time trying to answer, this is just me "wondering" out loud so-to-speak. I use Dolphin more as a real time learning platform than trying to monetize it as a public site. But if you do have a quick thought about the bullet items above, it'd be great to hear from you. And maybe the collective contribution of knowledge would be good for anyone else wanting to learn.
Database access is not what the service calls are for. They are for calling a function that exists in another module. Primarily used to obtain the code for a page block, to obtain a list of photos from the photo module, to upload a photo to the photos module from another module, to display the shoutbox on a PHP block, ect.
As for variables and functions. It's a royal pain. Dolphin is based on PHP classes. And it quite complex. But it allows for the reuse of code and to even override those functions in some cases. It prevents the need to have to include the same block of code over and over again throughout the script which would result in a script that may be easier to follow, but much harder to maintain and update, and would be many many times larger.
Injections have a number of different meanings. Such as a shot you get from a doctor. That's also an injection. In this case injections are pieces of code that can be inserted into various locations in dolphins templates marked by injection point markers. It's one of the methods dolphin provides to try and eliminate the need for a module to require source code changes.
Block catching should be enabled whenever you have a block whos data rarely changes. For example, the stats block is in constant flux, so caching it is a bad idea, but other blocks such as featured members will rarely change so should be cached. The amount of time set is a decision you make based on predicted change frequency.
If you think dolphin is complex. You should look at some of the php development frameworks such as CakePHP, Yii, Zend, ect. Many have asked in the past why dolphin does not use one of these frameworks. I have looked at a few of them. I find them complex. I would not want to see dolphin developed using one of these frameworks. But thats just me. Others believe the frameworks make development easier which is actually their intended purpose.
https://www.deanbassett.com |
Whew... I've been working in Rails a lot lately and do not miss php at all. Anyways, those are some great notes from deano, and I just want to echo the class setup situation. I think the best way to work with any part of dolphin is to override core classes with your own, to customize or extend functionality.
Why things are written the way they are in dolphin, starts to make more sense once you start extending classes and stop hacking away at them.
Just my ramblings.
sup |
Why things are written the way they are in dolphin, starts to make more sense once you start extending classes and stop hacking away at them.
When I first started working with Dolphin, this was mentioned to me. I was trying to do something with a module that was using a core class. One of the developers, probably Deano, told me to override the class in the module instead of editing the core class because editing the core class would affect the whole site, in the module, it would apply only to that module.
Geeks, making the world a better place |
Great feedback everyone. I'm still climbing the mountain of knowledge. lol.
Thanks.
|