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

[eluser]pettersolberg[/eluser]
Hi, anyone recently switched to the Slim Framework or anyone using it besides CI?

One of my clients has got a site developed with Slim (very basic, generally routing to views), approached me if I could extend its functionality. Some ideas about DB connectivity or email classes? I know that for one - CI has them available out of the box, Slim doesn't; on the other hand - there are plenty libs out there, but which ones would be worth a try?

And BTW - the switch to CI is a no-go.

#2

[eluser]Bart v B[/eluser]
To be honest, why are you asking the CI community for help on a other framework?
Does slim has it's own community to ask this kind of questions?
When i want a fast car i don't ask the butcher if he has some information for that. Wink

Why is a switch to CI a no-go?
As you say, all those things has CI out off the box..
#3

[eluser]pettersolberg[/eluser]
I'm asking the community because maybe someone with a strong CI background - like me - has some expierence with Slim also.
Zealots on the Slim forum will probably focus on the ideology of switching frameworks (and why's Slim better), I just want to hear "well in Ci you have Active Record and something that resembles that functionality is XYZ, the email class in CI has a great working clone in form of ABC", etc.
Switching is a no-go just because of the client's stubbornness.

And as for the butcher story, it was entlightening as much as pointless - but maybe you're right, maybe the butcher owns a fast car?
#4

[eluser]Bart v B[/eluser]
Do not get me wrong.
Lately I see a lot of topics on the forum that CI do a swipe to the framework.
This is why my answer about maybe a little offensive.
But that is not addressed personally to you.

I have no experience with slim php.
But as I look around for active records, for example, you could use it as PHPActiveRecord.
http://www.phpactiverecord.org/
It does not seem that difficult to manage to build.
For validation forms you could use. GUMP
https://github.com/Wixel/GUMP
#5

[eluser]pettersolberg[/eluser]
Thanks, that's perfectly the point - I don't want to bash and and trash CI, as one can observe it lately being almost a common sport.
I'm just lazy and are being forced out of the CI sandbox, where you just go through the documentation and everything's there.

Thanks for your tips on the libs,
cheers
#6

[eluser]Alucemet[/eluser]
I initially used Slim when converting all of the CI classes to use outside of CI. DB classes were the most time consuming, but it can be done. When I got all of the CI classes converted, I was basically using Slim only for routing, so I decided to make a router of my own and drop Slim usage. I personally like CI routing better than Slim because I think REST is a bunch of horse crap. One thing that was nice about this project was that I got to strip/change out the garbage code that I didn't use or like. I made my own improvements, and the result was very nice, but of course personalized to my own tastes.

I can tell you that I basically used Pimple as a DI container, and put all of the CI classes in the container. The container can be extended, passed around, injected, etc. Classes don't get loaded until you use them, unlike "true" dependency injection, so I like it better. I also made a static class to compliment each of the standard classes. The static classes have access to the container, so each class has 2 ways to access it's methods, and it's pretty kickass if I don't say so myself.

I'm not sharing my code until Ellislab changes the license to MIT or BSD, and if that doesn't ever happen then so be it. I find their license to be very unfriendly, and I'm not willing to pass code around that has that license attached to it. If you'd like to see my code, make sure to send Ellislab an email requesting the license be changed to MIT or BSD.
#7

[eluser]pettersolberg[/eluser]
That was pretty insightful, thank you
#8

[eluser]kwoodfriend[/eluser]
Hi pettersolberg,

Are you allowed access to Composer within the project (i.e. PHP 5.3+, hosting with SSH access, a client willing to allow it)?
#9

[eluser]pettersolberg[/eluser]
Hi kwoodfriend,
yes, I am, as long as I will extend the provided, existing base files created with Slim (it's a matter of some legal mambo jumbo I suppose).




Theme © iAndrew 2016 - Forum software by © MyBB