Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter and Joomla
#1

[eluser]Unknown[/eluser]
I'm developing an application that we want to deliver in two ways: as a standalone application and as an application integrated with Joomla. There are good business reasons for wanting to deploy the application in both ways. So....

I searched the CI forums for Joomla and the Joomla forums for CodeIgniter, but didn't see that anyone has a ready-made solution for this. Is there one?
#2

[eluser]xwero[/eluser]
I'm wondering why you would want to bend CI code to fit into the joomla framework? Wouldn't it be easier to make a joomla component?
#3

[eluser]tonanbarbarian[/eluser]
I am a Joomla! developer from way back (when it was mambo)
I can guess the reason for wanting to develop a product that can run stand-alone and integrated, we are doing the same thing

I am trying to build a library of code at the moment that will allow a CI app to do the following
- run stand alone
- run inside almost any other app or framework, i.e. Joomla, Mambo, oscommerce, you name it

I am basically building libraries that can determine how the app is being run and act accordingly.
If it is run stand alone the app uses its own Session and Authentication libraries and its own User model
If it is integrated into an app it tries to run in 1 of 2 ways
- Fully integrated so that if possible it uses the frameworks existing Session and Authentication functions. As an example it would look at the $my global in Joomla! to determine if the user us logged in and be calling functions from the MainFrame obejct etc.
- Partially integrated so that it would look for an existing session cookie or whatever mechanism the framework uses and determine if the session and user is valid

The libraries for the external frameworks will all be the same so that the system can use any of them transparently, i.e. once the libraries are loaded they will always be accessable via $this->session or $this->auth and they will have the same methods for each so that code can be consistent.

Also building URL libraries that will convert a CI url to something acceptable for the framework and back again.

Plus the libraries have a CRUD scaffold type feature to make development even faster

I am building this to integrate into Joomla! 1.0x at the moment as that is what the app I am building will run in.
I will also eventually build integration code for Joomla! 1.5x, Mambo 4.5x 4.6x and I have plans to build libraries for other things so that app can be integrated into anything.

SO if you want a newsletter that can integrate with an oscommerce install then it will be possible. It will use the oscommerce user database and if there is an existing session there will be no need for a new login.

Plan is to have an app installer too. Stand alone installer will hve options to decide where to install CI, the App and the web (i.e. index.php and any css, images js etc).
There will also be a Joomla! app installer.
The Joomla! app at this stage is planned to be able to run either directly inside joomla, or to CURL or fsockopen to the standalone app. The CURL / fsockopen method will allow for the app to be run when there is little free memory. Joomla! uses so much memory in its core that in the CI app is more than 3 - 4 meg it may run out of memory so that CURL / fsockopen method will have the app running in a seperate webserver thread and therefore using less memory.

The project I am currently developing this for is for a commerical client, but I hope to have a version of the framework finished and possibly released to the community in a couple of months. And hope to start churning out app about the same time.

[quote author="xwero" date="1199667630"]I'm wondering why you would want to bend CI code to fit into the joomla framework? Wouldn't it be easier to make a joomla component?[/quote]

The main reason we are looking at doing this (not sure for fatbear's reason) is that Joomla! is no longer supporting commercial extension in any format.
So to get around this we are now going to develop our extensions such that they can be stand alone apps or run inside Joomla! or any other framework.
This increases our client base as they no longer need to use Joomla! as a framework for the apps, allows our existing clients to still use our apps in Joomla! if they wish, and hopefully allows our clients to use ouor apps almost anywhere they need to.
#4

[eluser]Unknown[/eluser]
Thanks, tonanbarbarian, for your post. We're in a similar position.

For those who still wonder "why," there are several reasons:

1. Some customers already have Joomla as their framework; we need to fit into their existing framework (their requirement).

2. To monetize our applications. We can sell our products standalone or as part of an integration.

3. To leverage the value proposition of other frameworks. Note that while we could design a Joomla component, that fails to leverage our resources. Otherwise, we'd need to do this for each application we write. Also, as we integrate into other frameworks (e.g., WordPress, Drupal, etc.), we want a solution that does not require development and QE resources again and again.
#5

[eluser]xwero[/eluser]
If i understand it right it's a matter of creating framework independent libraries with framework specific interfaces if they need to be implemented in an existing codebase? If that is the case the CI specific code would be minimal, or not?

I think the matchbox library gives you a good idea on how to accomplish this (Look at the file structure). You could make modules with a models, views, libraries and interfaces directory. In the libraries directory you would have the base classes (database and interface) and in the interfaces directory you would have the different files that connect with the different frameworks. There would have to be some global to check if you don't load the same libraries multiple times.

I'm not sure how this would be accomplished in joomla because i remember from my mambo days component view files are stored in different directories for admin and frontend. I guess if you want to use base code on several systems you are going to need some framework/application specific hacks to get everything running and keep your code maintainable.
#6

[eluser]Unknown[/eluser]
Hello, I'm working on a Joomla component (some sort of bridge) for a CI application that I already own. I’m starting with the very basic stuff since I’m new to both CI and Joomla framework programming.

Have you guys (tonanbarbarian and fatbear) made some progresses on your projects for the integration of CI applications into Joomla?.

Thx.
#7

[eluser]Unknown[/eluser]
Hello,

I am new to CI, but I am interested to this discussion. Googling arround I found this

http://hypertext.azrul.com/codeigniter-for-joomla.html

Have someone tryed it ?

or does someone knows of other way to integrate CI applications into Joomla?

Thanks
#8

[eluser]Saymont[/eluser]
Uall,

Very good idea.
Lets integrate it.
#9

[eluser]gene_x[/eluser]
Hi.

We are looking for someone like this: http://dev.sypad.com/projects/jake/
Long time ago, I've tried the component in link posted by sharemind. (I'm Marcelo Oliveira).
But can't go ahread since I can't deal with params.
Some time after, I read the helpful comment made by Powerslave but, as I've already finished the project that needs that integration, I didn't tried it out.
There is a post in the joomla forum where I tried to make this integration, without sucess =(
http://forum.joomla.org/viewtopic.php?f=428&t=330191

I ended up using simple vanilla joomla wrappers (without any modification) to finished the project.
I worked. But is not a true integration =/

I'm interested in this discussion.

Regards
#10

[eluser]Unknown[/eluser]
[quote author="tonanbarbarian" date="1199671291"]The main reason we are looking at doing this (not sure for fatbear's reason) is that Joomla! is no longer supporting commercial extension in any format.[/quote]

We can get round this now!

You can still offer a commercial extension and be listed in JED! The way round this it offer an extension that is both Open Source and Free, but subscribers have to pay for support before they can download the extension, you simply make the price for support the same as the extension.

Hope that makes sense?

Baz Smile




Theme © iAndrew 2016 - Forum software by © MyBB