Learn Zend Framework version - zend-framework

I would like to learn Zend framework and I am at a loss when it comes to versions.
It is possible to learn directly Zend framework 2 without consulting the documentation of Zend framework 1?

Since both version aren't compatible together, there is no point in learning ZF 1.x (unless you have to maintain a ZF 1.x project).
As with many frameworks/libraries, errors have been made in term of design and mecanics which are often corrected in newer releases.
So unless you will have to maintaint an older application, go for the most recent (as long as what you want to do is supported)
Zend Framework 2 > Zend Framework 1 (theorically, I haven't worked with ZF2)
This is not a definitive rule to live by. Python is a good example, many useful Python 2.x haven't yet been ported to Python 3.x. It illustrate that you can't always pick the higher version blindly. You have to search for functionnalities based on your needs.

Related

Play 2 Framework code generation tool or Yii/Cakephp frameworks?

I'm trying to get started with a couple of web applications. However, choosing a framework to work with can be overwhelming!
I've worked with Java in the past, and since I do C# .NET at work, I don't mind learning and extending my Java knowledge. Now, the only framework that seems to work without jsp and other applet things that I've never understood is Play 2 Framework. I downloaded this framework, put the executable file in my path, and it seems that it would work for me. However, I came across CakePHP and Yii frameworks (I'm sure there is more) and notice there is a code generation tool that gets the database and automatically generates the models for you + the CRUD and such. Geez that is a save of time.
I went and googled my question and got that this is also possible in Play Framework (bummer only found the module for 1.x framework.)
How to quickly generate models in play framework 1.2?
http://www.playframework.org/modules/db
So, my question is...
Is there a module that would easily let you do this work in Java Play 2.0 Framework as in the mentioned PHP frameworks?
If no, would it be worthy (any advantages) to stick to the Java Framework?
If no, what php framework or even python (but Ruby) framework you consider has the best tools like this auto completion feature? I don't mean learning a new language, I will have to anyways. But rather to learn a language I can do things other than web development (for Ruby I know you can do more stuff but it might be just a waste of time to learn that other language. However, learning Python, Java, would open up app and phone development as well)
Don't mean to open a debate, please be concise (not like me) in your answer. Thanks!
From personal experience, there's several difference in both frameworks, particularly the way models are handled in cake vs yii.
In cakephp you cannot use composite primary key, this is the main deal-breaker for me. Composite primary key is supported in Yii.
Cakephp enforces convention, while yii favors convention, you are not forced to follow a certain standard.
Out of the box performance, I think yii has the advantage, but as with performance tuning, with proper cache configuration, and as long as you are careful in using the ActiveRecord patterns, they are not that much apart
As a side note, I have lead web app implementation with both CakePHP and Yii, the feedback that I got from the team was that the less experienced team preferes CakePHP, while Yii is preferred by the more experienced team. Make of that what you will.
Well it can turn out to be a very long debate. Each has its own life. So far from Experience I have found Yii to be most promissing than everyone. For me it matters who gives more work in less time. Cake is a bit heavy but Yii is light weight framework. I am from .Net Background but it took mew few weeks to get going with Yii

MongoDB aggregation framework availability

The new aggregation framework will come with the 2.2 version.
They made some presentations and demos on that :
http://www.10gen.com/presentations/mongosv-2011/mongodbs-new-aggregation-framework
I does not found any development release on their site.
Does someone knows where I can test the new framework ?
Thanks
You can download and install the development version 2.1, it is inside (and currently under development).
http://www.mongodb.org/downloads
But (at this stage) it is still a bit "young" (see for example a recent thread http://groups.google.com/group/mongodb-user/browse_thread/thread/3de5df85ce5b3713).
MongoDB uses the standard “odd numbers are development, even are stable” versioning scheme. So the 2.1.x series is still under development, and you should probably wait until the release of 2.2.x to use this feature in production unless you fully understand what you’re doing.
I am looking for it as well. :-)

Zend Framework or Symfony

I am in the process of migrating to a new PHP Framework. I have been involved in heavy development using the CodeIgniter Framework, but I am finding it a little too lightweight for my needs now.
I have boiled my choices down to either Zend Framework or Symfony. I know the learning curve for both is relatively high. However, I just wanted to get a rough idea of which will be worth getting stuck into (as I will be spending quite a lot of time getting familiar with the chosen framework).
If it helps narrow the answer down a little. I am not looking to build a simple blog or anything like that. I am in need for something that will support full-fledged development of e-commerce systems, customer relationship managers and content management systems.
Personally i have been working with ZF since it was in version 1.6, and i am pretty happy with it , I had seen very good improvement since 1.6 , but i think ZF missing some ideas :
1- ORM and later on very great implementation between ZF + Doctrine 1.2 has taken very popularity
and i honestly depend on ZF + Doctrine in many projects
and these days we can see great integration between ZF + Doctrine2
2- the symfony's bundle is completely forgotten in ZF
Do you think Zend framework misses the Symfony's Bundle principle ?
and i think its really indeed to see it soon (hopefully in ZF 2 )
3- i had many good points about symfony 1
- doctrine built in support
- bundle principle
- admin generators which can save a lot of time
- symfony plugins is very popular
- symfony documentation is really good
finally , i had took a deep look at symfony 1 but i am really taken by the buzz of symfony2 in the late of 2010 and till today its public preview http://symfony.com/download
and i am trying to spend some time learning it .
wish me luck :)
update
I don't want my answer to imply that ZF isn't good or symfony is better than ZF , ZF IMO very powerful library and being ZF developer === advanced + powerful PHP OOP programmer .
I had to make this choice about 1.5 years ago. I first looked at ZF and read up on it as much as possible, but at the end of the day I never really felt comfortable with it. It felt over-engineered, and I found myself getting lost in the code pretty often. I then checked out Symfony with Doctrine. I was able to come to grips with the code base much quicker than ZF. I've since used Symfony on 30+ projects, everything ranging from small sites to pretty large applications and I couldn't be happier. Their admin generator tools have cut down the time I spend building CMS's by a ridiculous amount, and I'm constantly adding my own additions so that future projects take even less time. On top of that, their routing framework, forms framework, and plugin architecture are very well built and very useful. (And Doctrine is a God-send, but you can use that with ZF as well, it's just nice that Symfony uses it by default and has some tighter integration with it.)
Luckily, both ZF and Symfony are highly extensible, so whichever you choose, you'll be better off than using CodeIgniter.
Personally I would rather invest my time in learning the Zend framework. I've played with symfony in the past, and it does have its merits, but I like the Zend framework better. For me Symfony (1.x) has that "things patched together with duct tape" feel around it. There's a lot of different plugins, with varying code quality. ZF tries to raise the bar and feels like a more professional, and well thought out framework (and on top of that ZF is very flexible). Symfony might be better suited for prototyping though because of the admin generator.
I haven't looked at Zend, but I did look at a couple of other frameworks before deciding on symfony.
For me it was the quality of the documentation - which for Symfony is excellent.
The thing with frameworks is that if you cannot use features because they are not well documented then they are not features at all.
It really boils down to your own requirements and how each feels - as you know the whole point of a framework is to work with it, if you are always adding extra code or exceptions then that framework is not right for you.

Why ZEND uses interfaces and abstract classes everywhere while Codeigniter doesn't use them at all?

ok. So i grep'ed through Codeigniter 2.0 directory looking for interface or abstract keywords.
I couldn't find Codeigniter using class skeletons anywhere. AFAIK and can see - CI only uses concrete class implementations.
Is not using abstracts and interfaces bad? Why does Zend framework utilizes them for every occasion while Codeigniter simply ignores this convention?
Zend is re-written on a regular basis implementing the newest PHP5 features which is great for them.
CodeIgniter has always been about portability and minimal requirements and was written when PHP5 was still in development with a very PHP4 approach to its architecture.
Now that CodeIgniter 2.0 is out support has been dropped for PHP4 and the requirement has been raised to 5.1.6. This doesn't mean every single file has been re-written in PHP5 because, well there's not much point in that. New features will be using PHP5 and we're working on bringing some of the framework up to date while trying really hard to not break things for applications using 2.0.
Scalability - this is the difference.
Besides, AFAIK Code Igniter is PHP4 based.
Edit after comment:
By saying based, I mean that it was written previously for PHP4, so it does not use all the newest PHP5 features from the core.
This is not only about OOP features, but also about some of the design patterns which are described by SPL.

Help me convince higher-ups to allow switching to .Net 3.5 (from 2.0)

I have been sold on the fun of using linq in areas other than pure database interaction. (See Calling fellow code nerds - Alternatives to Nested Loops?).
We are stuck on 2.0. I have told the powers that be about the ease of updating to 3.5 (we have already migrated to VS2008) but they are wanting a list of "benefits" for upgrading.
Can those that have experience in 3.5 help provide some talking points for the benefits of updating an existing app to 3.5?
UPDATE: Found an additional reason: Microsoft's inclusion of Charting tools for Asp.Net as a patch on top of 3.5! They get their business value, I get the fun...
Can YOU make a case for it? Sounds like you want it because LINQ is fun. Other people are mentioning features that are fun. I've always had a problem selling fun features to management because they aren't very compelling reasons to potentially disrupt an environment.
Honestly, it really depends on what you are using C# for. Are you a web developer, system admin, something else? Taking a general approach, I would use the following selling points (you will need to do some work to prove these things):
Zero-disruption for end-users when upgrading. Upgrading to the new version will be seamless and we will have a thoroughly reviewed test plan for updating all clients to this version. All of our old applications that require .NET 1.x or .NET 2.0 will still work perfectly.
Programmer Efficiency. You could mention how more of the Windows API is wrapped by .NET classes, thus making programmer more efficient because they don't have to P/Invoke as much. LINQ makes your more productive because of x, y, and z. Lambda expressions make you more productive because of x, y, and z.
Ease pains of future OS migration. Moving to WPF now will prepare us for Vista/Windows 7. We won't have to migrate applications using the now deprecated "Windows Forms" to WPF, because we will already be using it.
More applications purchased from 3rd parties will require it, so we will have to upgrade sooner or later.
In the end, you need to prove that at the very least, this move will not cost you money in terms of increased support or testing costs. If you can show it will make you be more productive and it will be a rather painless switch, then you will get your wish.
Maybe you should talk to some Java developers who are probably still forced to develop using 1.3 or 1.4 despite 1.5 being out for over 3 years and 1.6 for a couple... it appears platform consistency across the business is often of greater importance than the benefits of using the latest and greatest.
Also remember that 3.5 is just additional BCL libraries. You are still running on CLR 2.0. Same is true for 3.0. Usually when people find out that the underlying framework is the same and that you are just adding in new libraries they are more likely to go along with it.
You don't need .NET 3.5 to get LINQ or C# 3.0 features. You can implement your own LINQ for .NET 2.0. I am using C# 3.0 all over the place in my .NET 2.0 application. I don't know the full details on how to start the conversion process because I didn't set it up myself. This might be a good link for you: http://www.danielmoth.com/Blog/2007/05/using-c-30-from-net-20.html.
http://msdn.microsoft.com/en-us/library/ms171868.aspx
Transitioning onto 3.5 would help you reap the benefits/ features of:
LINQ to (Entities/ XML / Objects / Datasets etc ).
WCF, WF and WPF.
ASP.net MVC where MVC is kind of a de facto standard in other
platforms like Ruby/Python which
allow you pure HTML/ Javacript based
development.
ORM options with ADO.net Entity
Framework/ Linq to Sql
4.
With a few addons you can have
support for dynamic languages
like
IronPython/IronRuby.
Oh ya I almost forgot ADO.net Data Services..one of my fav.
These are the few benefits that immediately come to my mind.
In my experience, the addition of LINQ and Extension methods alone have made many previously arduous and/or time consuming tasks much easier and faster. The increased developer productivity from that alone is worth the upgrade effort IMHO.
Lambda expressions are awesome. There is no end to the places where I find that lambda expressions help me out in a very concise and readable way.
Automatic properties, while being a simple concept, really help making the code base smaller and clearer.
Also, I sencond the extension methods.
Before I even opened this question I had my answer: LINQ - it's one of the greatest extensions ever in .NET - I love it. It took me a few days to figure out, but now I've got it, I use it all over the place. The ability to query collections and arrays is worth the upgrade alone in my mind.
Decreased development time (and therefore increased ROI)
Less time wasted finding workarounds for .NET bugs that've been fixed in newer releases.
Extension methods for native types (in a similar fashion to JavaScript prototyping)
LINQ extensions - they take a couple of days to get your head around, but it's awesome!
LINQ to XML makes working with XML so much simpler
LINQ to objects/collections
A nice new 3.5 poster from Microsoft that you can pin up in your cubicle.
As a manager if I have a happier more productive team that is producing more in less time, then its a no brainer.
Ask yourself this: Will the developers be more effective and will their increased productivity actually increase benefit to the company or reduce corporate costs once you've considered the upgrade/transition/installation on the servers/additional testing etc? If the answer is truly yes, then do the upgrade and quit arguing about it.