Welcome Guest, Not a member yet? Register   Sign In
CI and PEAR or ZEND
#1

[eluser]luftikus143[/eluser]
Hi there,

I am totally new to these coding environments. I normally just create the file hierarchy and the needed code of my web sites "by hand". Now, as I want to move to another level of programming, I wonder how the different environments and add-ons play together; or what the differences are...

Can anyone shed a light on that for me? CI versus ZEND environment?

I have really no clue...

Thanks for any hints,

Stef

PS: What does this "You are not interested in large-scale monolithic libraries like PEAR." mean? Large-scale? Monolithic? I was in another thread asking actually how to integrate PEAR with CI? As I want (I explained that in the other thread) to move an exisiting project into a more modular, flexible, opensource like environment (using eventually PEAR libs) , this statement makes me thinking.... and not understanding what CI actually is...
#2

[eluser]bradym[/eluser]
[quote author="luftikus143" date="1207237610"]
Can anyone shed a light on that for me? CI versus ZEND environment?
[/quote]

From what I've seen, Zend is more like pieces you put together to build your own framework. The pieces can also be integrated into CodeIgniter or used as stand-alone libraries.

With CodeIgniter, the framework is built for you. There's no need to put the pieces together before you start writing your own code.

One very significant difference is that Zend is PHP5 ONLY, where CI supports PHP4 and PHP5.

The very best way to decide which framework is best for you is to spend some time building something with each one. Spend some time in the documentation, user forums, and build something simple to see which one fits your needs and coding style.

[quote author="luftikus143" date="1207237610"]
PS: What does this "You are not interested in large-scale monolithic libraries like PEAR." mean? Large-scale? Monolithic?
[/quote]

Using PEAR can be very painful. There are so many dependencies, so many out-dated projects, abandoned projects, bad documentation, etc that many developers (myself included) won't even consider using anything from PEAR.

That said, there's no reason you can't use PEAR libraries with CI. It is very trivial to use pre-existing libraries with CodeIgniter.

Brady
#3

[eluser]luftikus143[/eluser]
[quote author="bradym" date="1207271202"]Using PEAR can be very painful. There are so many dependencies, so many out-dated projects, abandoned projects, bad documentation, etc that many developers (myself included) won't even consider using anything from PEAR.

That said, there's no reason you can't use PEAR libraries with CI. It is very trivial to use pre-existing libraries with CodeIgniter.[/quote]

Thank you very much for the information.

So, instead of using PEAR, what do you use? I do understand that certain functions/libs are coming with CI.... And I guess there is a database somewhere with additional libs coming from the community.... But if I am looking for, say Excel-export functions, or PDF creator libs, Webservice modules.... Do I find this with CI?
#4

[eluser]bradym[/eluser]
[quote author="luftikus143" date="1207302932"]
So, instead of using PEAR, what do you use? I do understand that certain functions/libs are coming with CI.... And I guess there is a database somewhere with additional libs coming from the community.... But if I am looking for, say Excel-export functions, or PDF creator libs, Webservice modules.... Do I find this with CI?[/quote]

First of all, if you are currently using PEAR, there is no reason you should stop using it just because I don't personally use or like PEAR.

Not everything you need will be built into CI, and that's kinda the point. It's a lightweight framework that provides a great starting point, but it doesn't try to include every possible function you may ever need.

For exporting to Excel, I've always just used CSV files. I've never needed to do an export that was too complex for that. From what I've seen, the PEAR module for exporting to excel (in terms of using excel functions like formulas, etc) is about the only option out there.

Creating a PDF? There's several options. FPDF, domPDF, pdf functions that are built into PHP, and several others. Again, take your pick as to what you use.

Like I said, take the time to read the user guide and build an application or two, there's no better way to decide if you like CI or want to use something else. Just don't let your decision be based completely around how many built in functions there are, as it is very easy to use outside code with CI.

Brady
#5

[eluser]Mirage[/eluser]
You can view Zend as a lower level framework compared to CI. A framework is little more than a collection of re-usable classes that help you reduced the amount of code you need to write to implement a given [Web] Application.

CI offers you a more complete workflow within the framework, such as URI routing and clear layout of controllers, models and views. That's what makes it easy to get started with and makes you extremely productive right off the bat.

ZF is growing nicely and very well supported. It's much more comprehensive with it's components than CI. But you need to ask yourself if you really need all of that (right now) at the expense of a longer learning curve.

I've used both and in fact ported ZendAuth and ZendAcl to CI libraries because I love how they work. But I still choose CI over anything else because it allows me to get things don't flexibly and most importantly: fast!

HTH
#6

[eluser]Michael Ekoka[/eluser]
I use and love both. If you're only getting your feet wet, I'd recommend to start with CI to get acquainted with the overall concepts. As you get more and more comfortable with architecture, have a look at what Zend has to offer.

Both frameworks have their own interpretation of the MVC pattern. There are some similitudes and some differences.

As a framework, CI can be classified as in between glue and full-stack. Meaning that some functionalities of the framework can be easily adapted to use external libraries, while others need a lot more tweaking. Also, not all native libraries can easily be pulled and used as stand alone components in non CI projects, because they assume knowledge and presence of other core functionalities. CI's architecture is quite "liberal". You need to only understand stuff like Routing, Controller, Models and View. That's it. Concepts like bootstrap files and dispatch are all handled by the framework. It is a very good choice as a first framework.

Zend on the other hand is a true glue framework with a minimalist core (front controller, request, router, dispatch, response). All parts of the framework are interchangeable/adaptable (even the core, provided you implement the key accessors to these classes). Think of it as a collection of libraries for people who want to build their own framework or feel the need to further customize the behavior of any given part.

You'll find that Zend is a lot stricter about architecture than CI (while remaining flexible). It shows in their implementation and in the documentation. Components tend to be described using specific pattern names (observer, registry, singleton, front controller, etc). It probably is safe to say that a certain familiarity with patterns is assumed. Nonetheless, a beginner can quickly grasp these concepts without paying too much attention to names.

Both documentations are excellent. A beginner will prefer CI's while a more seasoned developer will probably favor Zend's.

As a developer, you will pick up a lot of new concepts initially by going with CI, it will lay the ground work for more advanced topics later on. Its approach to solve certain recurrent problems encountered during development is quite clever and elegant and could be, for a programmer, lessons to be carried to future projects. As for Zend, it will bring you to yet another level. The architecture and the code is just that mature and convincing. Also, the fact that Zend was designed for PHP5 allows it to take advantage of some cool functionalities (the perks of evolution). You will discover a lot of things that you didn't know php was capable of.




Theme © iAndrew 2016 - Forum software by © MyBB