Welcome Guest, Not a member yet? Register   Sign In
Why CI Needs a Package Manager Like Gems
#11

[eluser]cahva[/eluser]
@Kenny:
I'm in a hurry but I wanted to tell you that you can install local PEAR installation per site basis. If you use that go-pear.php file, it will pre-fill the config for the current dir and create the config for you so its not just systemwide thingie. I think you missed the point, PEAR's packaging system is good. And if some Pear class depends on another, it will install it also(theres a switch to force it). I've been in hostingbiz for almost 10 years so I know what I'm talking about Smile But the main point was that Pear's package system is really good and one can take some of the features it has(the pear channels is something that should be looked on). I didnt suggest Pear should be used as it is. And about rubygems.. Its also depencyhell when I last tried it Smile
#12

[eluser]Phil Sturgeon[/eluser]
PEAR and RubyGems are both similar ideas, but not really what we are looking for here. I want to be able to go into a specific application and say "install auth", bang, auth is in there. This is something that works really well in another framework FuelPHP as I wrote a really simple manager for it.

This does not need to be a crazy "loads of XML files tracking everything with loads of cross dependency junk to manage it" as Yorick suggests because... we who needs it? It is very rare that a library or helper requires anything much more than having curl, gd lib, etc installed and if you don't have that you'll get a pretty obvious PHP error when you try to run it anyway.

All it really needs to do is install a file, or a group of files from a specific location. The easiest way to do this is to have a CodeIgniter Addons BitBucket account and each addon can go on there. This means that before you can have your content freely available to everyone it needs to be checked through quickly. As well as supporting this we can support "sources" which will be a simple array of other locations for repositories like your BitBucket or GitHub profile.

This is how I would see it working as it's worked out pretty nicely in FuelPHP, but it does not have to be this way.

[quote author="James Dunne" date="1297749699"]I'm not sure how you would do it. CLI seems the most obvious choice but I know there are people out there who use a remote server for development which is only accessible by FTP *gasp* so either a web interface or having a CLI tool WITH FTP support?[/quote]

A quick note here, you should not be worried about this as how often do you edit your live site? If you are editing your live site then... stop editing your live site!

A CLI tool would of course be optional and downloads will be available without, but you should be using a CLI tool to modify, add to and work with your local copy then upload everything via FTP or whatever version control / deployment system you normally use.
#13

[eluser]Yorick Peterse[/eluser]
One of the key features of Codeigniter is that you don't have to use the command line at all. While I have nothing against CLI based frameworks (I actually enjoy them) this simply doesn't fit in Codeigniter (Reactor). Codeigniter shouldn't be a dumphole for all funky features ported from other frameworks. If somebody were to developer a third party system that does this it would be pretty cool but there's absolutely no reason to force it down people's throats. Why? Because of the following:

* Not everybody uses Git or Mercural, in fact most people probably download the archives
* It's honestly not that hard to download an maintain an archive or a clone of a repository, it's what we do at work and it works awesome
* There's no real benefit as packages are still project based (when all you're doing is just cloning a repository)

There are a few more reasons but these are probably the most important. Fuel might have a cool system like that but this isn't Fuel so stop trying to make it like it.
#14

[eluser]beaufrusetta[/eluser]
First off - I'm extremely interested in this. I've got both a PHP & a Rails background, and there are quite a few things built in to the Ruby on Rails framework that I've been sorta porting over to CI.

I've got a base model class that extends the base CI_Model class that does a lot of automagic like Rails models do, however, I need to update my git repo to reflect all the recent changes I've put in to place.

I've started working on a migration type class to make table creation easier, etc - no more SQL writing, no more using effin PHPMyAdmin...ugh.

I've been using "phake" quite a bit, because it works similar to rake tasks in Rails. I use this in conjunction with my external.php file (in the root dir) that allows me access into CI from an external source. It's legit - and I don't have to do all these crazy hacks to run a cron job with code I've created inside of CI - just include the file, and I then have access to a CI instance via $CI.

Now...trying to just keep my base model class updated throughout my projects is a bit on the "manual" side...and I've got some libraries that I've been creating. I'm a huge fan of RubyGems, and I would totally love to run "phake package:install beau_base_model" and then later "phake package:update beau_base_model" and have it all automatically handled.

So...

I've actually already started going down this route. I even submitted an email to CI a few months back mentioning this when they were asking for some all-stars to maintain the CI base framework. I'm in the process of putting all of this together, and if there is anyone out there that wants to collaborate with me, I'd love to hear from you. Hit me up @ beau DOT frusetta AT gmail DizzOT com.
#15

[eluser]kenny.katzgrau[/eluser]
@Yorick,

It's true, requiring CLI is against the grain of why a lot of users use CodeIgniter in the first place. So using the CLI would be optional (like Phil said).

In terms of CodeIgniter becoming a funky dumphole, I actually think a package repo/accompanying manager eliminates that problem in the long run. Funky packages/ideas stay out of the core, but can be installed by users who really want them.

I dont know about 'no real benefit'. A big benefit might be having the ability to rate and comment on packages in the online portion of the repo.

The best packages should be able to rise to the top. If I could find a really well-rated twitter lib, it would be great. Right now, I just google it, and inevitably end up on Elliot Haughin's site, or write it myself.

Elliot's lib might or might not be the best library, but it'll probably dominate Google results forever.

@beaufrusetta and @mdpauley, I'll ping you in a bit. Anybody else who's interested can get me at [email protected] too.
#16

[eluser]Phil Sturgeon[/eluser]
Agreed with Kenny here. Also, there would be no Git or Mercurial requirements to this at all. ZIP files are used if nothing is installed.
#17

[eluser]beaufrusetta[/eluser]
I think having a repo link (for authors) would be awesome - because it could auto update the libraries based on their versions stored in their repo - so they don't have to update their library stored in the CI Repo all the time.

I've got a whirlwind of ideas in my head about all of this. Let's get'r done.
#18

[eluser]Yorick Peterse[/eluser]
[quote author="beaufrusetta" date="1297819016"]I think having a repo link (for authors) would be awesome - because it could auto update the libraries based on their versions stored in their repo - so they don't have to update their library stored in the CI Repo all the time.

I've got a whirlwind of ideas in my head about all of this. Let's get'r done.[/quote]

Yeah, let's implement every idea you have. Good luck with that. Like I said earlier, Codeigniter isn't a dump hole for all ideas by person X. One of the most important reasons why CI is so popular is because it's so damn stable and does what it has to do but nothing more. If you want to have a Rails like framework use Cake.
#19

[eluser]beaufrusetta[/eluser]
Wow...chill out bro...never said all my ideas were the end all.

I don't like the Cake framework just like I don't like the Zend framework - I prefer CI, and there are quite a few things I like, that could be or not be installed by users by using a package manager - COMPLETELY OPTIONAL.

Never said anything about putting this in to the core, or anything - leaving the core alone and small is the right way to go about this, and a package manager would be an optional add-on for people seeking to maintain libraries in a way similar to RubyGems.

See...you really have nothing to gripe about now - because it won't affect you at all. haha :-)
#20

[eluser]kenny.katzgrau[/eluser]
@YoRick,

[quote author="kenny.katzgrau" date="1297818410"]@Yorick,
In terms of CodeIgniter becoming a funky dumphole, I actually think a package repo/accompanying manager eliminates that problem in the long run. Funky packages/ideas stay out of the core, but can be installed by users who really want them.
[/quote]

It won't become a dumphole. This is one feature that allows the framework to expand without actually affecting the core code.

But anyway, the stability of this thread is entering the token Forum-Thread-Blowup level, so we should probably avoid the impending flames that are probably being written right now.

Roundup: Optional CLI, backed by git or hg, central repo with ratings, little to no impact on the core. Dumpholes are bad. Sounds solid to me.




Theme © iAndrew 2016 - Forum software by © MyBB