Welcome Guest, Not a member yet? Register   Sign In
Is CI FP friendly?
#1

(This post was last modified: 09-27-2017, 08:24 PM by castle.)

Hi

I'm thinking to write a simple CMS using CI and Functional Programming style. I think it's a good way for me to learn more about FP. But, I would like to hear from the expert ones about using functional programming with Codeigniter. CI itself is written using OOP style, so do you think is a good idea to mix it with FP? Any thoughts about FP and CI will be appreciated.
Reply
#2

Sorry, but what is FP style? What does FP stand for?
Reply
#3

(09-27-2017, 10:19 AM)PaulD Wrote: Sorry, but what is FP style? What does FP stand for?
my guess Functional Programming
Reply
#4

CodeIgniter defines a fairly large number of stand-alone functions in the "Functional Programming Style" that are "included" when the framework starts up. In addition, the "Helpers" are all defined using FP.

So mixing OOP and FP is clearly not an issue for CodeIgniter.

That said, IMO you are likely to make your life very difficult trying to create a web app that is a mix of the two styles. That statement depends on what you are trying to accomplish at any given point in the app design. There are times when FP is a great choice and other times when it creates more problems than it solves.
Reply
#5

Not withstanding the great answer given by dave friend above, the real beauty of CI is that it is a framework that does not tell you how to program. If you want to plough into a CMS with functional programming, go ahead, put as much as you want into the controller, make a big fat controller to do everything, have it do nothing and fill your views with php if you want. However you want to do it you can. I would say though that a functional CMS would be a bad idea, and like Dave said, you will find yourself very quickly in a quagmire of rewriting and hacks and fixes every time a new approach is adopted.

But CI lets you do whatever you want. Use as much of it or as little of it as you need. It is a toolbox of incredible flexibility that lets you do it however you want to.

Best of luck,

Paul.

PS I would ask yourself why you want this approach though. It really is not the easiest way to do things.
Reply
#6

FrontPage extensions?? LOL!
Reply
#7

@skunkbad still laughing about your answer, thats a classic
On the package it said needs Windows 7 or better. So I installed Linux.
Reply
#8

(09-28-2017, 09:00 AM)rtenny Wrote: @skunkbad still laughing about your answer, thats a classic

That's the only FP I know. When I started making websites in the early 2000s I was using FrontPage 2000. It is pretty funny to think back to that.
Reply
#9

(09-28-2017, 09:24 AM)skunkbad Wrote:
(09-28-2017, 09:00 AM)rtenny Wrote: @skunkbad still laughing about your answer, thats a classic

That's the only FP I know. When I started making websites in the early 2000s I was using FrontPage 2000. It is pretty funny to think back to that.

You must have started then the same time I did. I still remember Frontpage but luckily never used it. But did use DreamWeaver. OMG I am showing my age here. Almost seems like a different life back then.
On the package it said needs Windows 7 or better. So I installed Linux.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB