Welcome Guest, Not a member yet? Register   Sign In
php vs other modern language
#1

(This post was last modified: 06-03-2022, 06:47 AM by richb201.)

I am confused by something. As some of you know I have been a programmer for many decades. I initially worked on ibm minis before the birth of the PC world. I then was a C programmer for another decade or two. In all of the older languages you could have a third party write some code that we could then call from the main source code and it would run. There were of course other steps involved such as compiling, linking, etc but the bottom line is that there was a "modular" way to build an app. 
Does CI3 have the ability to call an independently written, php functions (not js) in a modular fashion? 

Sorry for the stupid question. I just can't believe that we can no longer do that?
proof that an old dog can learn new tricks
Reply
#2

https://en.m.wikipedia.org/wiki/Modular_programming
proof that an old dog can learn new tricks
Reply
#3

Hello fellow old C programmer! Wink

Of course you can call PHP code that was not specifically written for CodeIgniter. I've used FPDF, PHPMailer, NuSoap, and other PHP classes in CI3 projects. The easiest way I found is to create a wrapper library to load this external module. See this page on how to create a custom library in CI3: https://codeigniter.com/userguide3/gener...aries.html
Now all you have to do in this new library is to load your external module, following the module's documentation.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#4

Beer, it has been a long time. thanks for the response.
proof that an old dog can learn new tricks
Reply
#5

(06-07-2022, 04:31 PM)richb201 Wrote: Beer, it has been a long time. thanks for the response.
Yeah, I've been neglecting the forum. I've been busy with lots of other projects, including building a pool deck!  Cool
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#6

In PHP world, now there is a site Packagist https://packagist.org/
that provides packages (modules) for PHP.

The package management system for it is called Composer.
So these packages are called as Composer packages.

CI3 also can use Composer packages.
https://codeigniter.com/userguide3/gener...t=composer
Reply
#7

@richb201 , a developer is only limited by their mind (or unwillingness to learn more about PHP). There is a very good reason why PHP runs over 77% of the web. I can honestly say that there is nothing that I've unable to do with PHP.
Reply
#8

(This post was last modified: 06-08-2022, 07:26 AM by richb201.)

Unwillingness? Rocs, you make me laugh. Since the end of my C programming career in 2003, I went back to get an MBA in Accounting. Why? I got sick of the ever changing language learning requirements of the "developer life". (Beer, I'd love to hear your opinion of that decision since you clearly took the other road, message me).  I ended up getting a job for the IRS where, to this day, I still audit software tax credits of some very, very large software companies around the US. I also have done some work on tax regs affecting software. So Rocs, I don't think "unwillingness to learn more about PHP" is a fair measure of "laziness". Have my development skills degraded since I was a pro developer?

Surely. But i can pretty much guarantee that I know more about the taxation of software development projects than your "average bear".  Does that make me unwilling to learn more? I don't think so. I just am concentrating on different "technical issues". Between my engineering education, my Accounting Education, and my 16 years of knowledge of the US tax code, my brain is fairly tightly packed. At this point I need to be careful to only add new info that is important in the short term.  At 63 is there a "long term" Cool

I am a life long learner and that is why I couldn't imagine that modularity was not being addressed in PHP. So thanks for that information. Being one of the few software taxation auditors at Treasury, I don't really have other engineers to talk to about modern programming paradigms. I do attend AWS free trainings as much as possible, but I need much more. 

Again, thanks all for the valuable answers. You guys are kind to share your insights.
proof that an old dog can learn new tricks
Reply
#9

(06-08-2022, 07:04 AM)richb201 Wrote: Since the end of my C programming career in 2003, I went back to get an MBA in Accounting. Why? I got sick of the ever changing language learning requirements of the "developer life". (Beer, I'd love to hear your opinion of that decision since you clearly took the other road, message me).

Well, I've been programming in C for the last 25 years, and I still do occasionaly to support old softwares on Unix and Linux. I learned PHP and Javascript on my free time some 20 years ago because I had interest in web development. It was a good decision because it allowed me to work on interesting projects, both personal and professional. But then I was somewhat forced to work with Java, Grail, Spring, Hibernate, TypeScript, Angular, NgRx, RxJS, and all sort of tools like Maven and npm. I feel like I can never learn enough to be comfortable with this new stuff when they decide to throw something new in my face...

So, yeah I understand why you got fed up with all this. That's also why I like the simplicity of CI and that's also why it took me a very long time to use Composer.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#10

(This post was last modified: 06-09-2022, 06:26 AM by php_rocs.)

@richb201 , maybe the "(or unwillingness to learn more about PHP)" was a little strong  Wink  .  What I was trying to imply is that PHP can pretty much do anything and with the flexibility of CI you are only limited with what you are willing to try/learn.  I've used different pieces of code from all over the place and I have been able to incorporate it into CI with ease.  Sometimes it worked flawlessly other times I had to think it through ( or look in the forums for ideas)  but in the end I was able to achieve my goal.  Bottom line: CI is flexible enough to work with other code even if it isn't in it's codebase.  All that is needed is willingness to research/try/learn.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB