Sunday, September 8, 2013

A bit of fun with Zend Framework 2

After writing web applications in Java for about ten years, we recently approached PHP. After a bit of training and experiments on the Zend Framework 1, before starting to actually work on a real product we decided to switch to the Zend Framework 2 (mostly because of a great Zend Framework Day).
But it was only after a few months that my colleagues had started to use the framework that I eventually joined them.

At the beginning it was really frustrating. After ten years of Java, getting "back" to PHP has been somehow weird: I kept using dots instead of arrows, always forgot the dollar sign before variables, yet insisting on declaring their types. Not to mention the syntax to declare and use arrays (which, to tell the truth, I never remember also in Java). But these were not problems, just minor diversions.

My real problem was that I didn't know what happened under the hood, and I mostly proceeded tentatively. In the Zend Framework 2, of which by the way I have quite a good opinion, so many things happen automagically, and some of them are not very well documented. I mean, thanks for a great tutorial for beginners and all, but... why on earth do I have to create an album/album directory for the view? Would it be so terrible to say that there is a folder for the module and one for the controller? Or to explain how camel case turns to dashes and dashes turn to... what do they turn to?

And so, even the simplest tasks seemed daunting. Then, after banging my head on the wall for a while, I slowly started to get the gist of it, up to the point that now I feel quite confident, at least for the basic things.

And then, suddenly (snaps glove), you get a break... all the pieces seem to fit into place

And, hear, I started to enjoy playing with it: controllers, factories, autoloading... and, last but not least, tests. And (and, even if this was the fifth and in such few a lines, I somehow managed to slap in a sixth and a seventh one) I slowly switched from "how the hell do I get this parameter from the route?" back to "where should I put the responsibility of horizontally filtering data"?

Up to the point that I am seriously considering the possibility to REALLY get way out of my comfort zone and submit a proposal for one of the next conferences introducing the framework for beginners like me, trying to smooth the path I have lightly trodden with so many difficulties.

Hey, maybe it's only me, maybe I'm particularly dumb... but then again, somebody could find it useful. As always, I'm wide open for suggestions... but closed for modification :-)

As an end note, I'd like to thank Antonio for being so patient and putting up with my musings, questions and doubts. Looking forward to some more programming fun time together!

28 comments:

Unknown said...

Your blog is really nice; it has some great information about Zend framework. Thank you.

Hire Yii Developers

kanchana said...

Truely a very good article on how to handle the future technology. After reading your post,thanks for taking the time to discuss this, I feel happy about and I love learning more about this topic. keep sharing your information regularly for my future reference. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.
Android training in chennai

cdcdcdcd said...

Wonderful post I'm waiting for your next post
Best Ice Fishing Gloves Best Ice Fishing Gloves Best Ice Fishing Gloves

shemadevan said...

valuable one ...waiting for next update...
LoadRunner Training in Chennai
performance testing training in chennai
performance testing training
Loadrunner Training in OMR
Loadrunner Training in Porur
QTP Training in Chennai
core java training in chennai
C C++ Training in Chennai
Mobile Testing Training in Chennai
Manual Testing Training in Chennai

shwethapriya said...

Excellent and very cool idea and great content of different kinds of the valuable information's.
Data Analytics Courses in Chennai
Data Analytics Courses
TOEFL Training in Chennai
french courses in chennai
Spoken English in Chennai
Blockchain Training in Chennai
Data Analytics Courses in Tambaram
Data Analytics Courses in Adyar

Reshma said...

Excellent post. It will be definitely helpful for many people. Keep posting like this.
Web Designing course in Velachery
Web Designing course in Anna Nagar
Web Designing course in Tambaram
Web Designing course in T Nagar
Web Designing course in Thiruvanmiyur
Web Designing course in Vadapalani
Web Designing course in Adyar
Web Designing course in Porur
Web Designing course in OMR

Khalif Mohammed said...

Drive More Qualified Visitors to Your Website with Award-Winning SEO Strategies. Blow Away Your Competition. Grow Your Business. Measurable Results. Contact Us! Authorized SEM Agency. Qualified Resources. Cost Effective Management. Quick Turn Around Time.
seo services in usa, seo companies near me, seo company nyc, seo company uk, seo company usa, seo consulting company, seo ranking services, seo service provider, seo services uk, seo services usa, the best seo company, top ranked seo company, top seo companies, top seo services, quality seo services, industrial battery manufacturers usa, new york seo, on page seo services, best seo company, best seo consultant, best seo services, buy seo services, best search engine optimization company, best seo agency, affordable seo services, industrial battery manufacturers usa

Khalif Mohammed said...

There is always a smarter way to win the task! And if you are looking for ways to unveil that secret, you have landed on the right page. Best Search Engine Optimization services can make your online website perform better. The Web Mines is the company full of creative minds, we are catering SEO services in different countries of the USA. We assure our clients to give the best SEO services. The services we offer our clients are designed according to your business requirements that can fit best in Google algorithms.
local seo company in usa, local seo the web mines, local seo services pricing, local seo services toronto, local seo services, local seo services atlanta, local seo services companies, local seo services st louis, local seo services in cape town, local seo services usa, local seo services uk, best local seo services, local seo expert company, local seo services for small business, affordable local seo services, local seo marketing company,industrial battery manufacturers usa

Khalif Mohammed said...
This comment has been removed by the author.
rocky said...

python training in bangalore

python training in hyderabad

python online training

python training

python flask training

python flask online training

python training in coimbatore
python training in chennai

python course in chennai

python online training in chennai

dhinesh said...

Outstanding blog with good content

Full Stack Course Chennai
Full Stack Training in Bangalore

Full Stack Course in Bangalore

Full Stack Training in Hyderabad

Full Stack Course in Hyderabad

Full Stack Training

Full Stack Course

Full Stack Online Training

Full Stack Online Course



Professional Course said...

I am delighted to discover this page. I must thank you for the time you devoted to this particularly fantastic reading !! I really liked each part very much and also bookmarked you to see new information on your site.

Business Analytics Course in Bangalore

Data Analytics Course said...

It took me a while to read all the reviews, but I really enjoyed the article. This has proven to be very helpful to me and I'm sure all the reviewers here! It's always nice to be able to not only be informed, but also have fun!

Data Analytics Course in Bangalore

Data Science Training said...

Now is the perfect time to plan for the future and now is the time to be happy. I have read this article and if I can I want to suggest some interesting things or suggestions to you. Perhaps you could write future articles that reference this article. I want to know more!. Tableau Course in Bangalore

EXCELR said...

Thanks for sharing great information. I highly recommend you.data science courses

rajmohan1140 said...

Nice and amazing post. I really appreciate you on good effort. Thanks for sharing this kind of information.

Java Training in Chennai

Java Course in Chennai

Data Analytics Courses in Bangalore said...

Now is the perfect time to plan for the future and now is the time to be happy. I have read this article and if I can I want to suggest some interesting things or suggestions to you. Perhaps you could write future articles that reference this article. I want to know more!
Data Analytics Courses in Bangalore

Data Science in Pune said...

It took me a while to read all the reviews, but I really enjoyed the article. This has proven to be very helpful to me and I'm sure all the reviewers here! It's always nice to be able to not only be informed, but also have fun!

Data Science Training in Pune

Data Science in Pune said...

I was browsing the internet for information and found your blog. I am impressed with the information you have on this blog.

Data Science Course in Pune

Data Analytics Courses in Bangalore said...

very happy to find a good place for many here in the post, the writing is just great, thanks for the post.
Data Analytics Courses in Bangalore

Data Analytics Courses in Bangalore said...

It is always so interesting to visit your site. What a great information, thanks for sharing. it will help me a lot in my learning.
Data Analytics Courses in Bangalore

Business Analytics Course said...

I recently came across your article and read it. I want to express my admiration for your writing skills and your ability to get readers to read from start to finish. I would love to read more recent articles and share my thoughts with you.

Business Analytics Course

Data Analytics Course in Bangalore said...

I enjoyed the coursework, the presentations, the classmates and the teachers. And because my company reimbursed 100% of the tuition, the only cost I had to pay on my own was for books and supplies. Otherwise, I received a free master's degree. All I had to invest was my time.

Data Analytics Course in Bangalore

Data Analytics Course said...

Happy to chat on your blog, I feel like I can't wait to read more reliable posts and think we all want to thank many blog posts to share with us.
Data Analytics Course in Bangalore

Tamil novels said...

Very nice blog.
Tamil novels pdf free download
Ramanichandran novels PDF
srikala novels PDF
Mallika manivannan novels PDF
muthulakshmi raghavan novels PDF
Infaa Alocious Novels PDF
N Seethalakshmi Novels PDF
Sashi Murali Tamil Novels PDF Download

Nathan said...

I want to thank you for your efforts in writing this article. The information provided was very useful.
Iot Course in Bangalore

Career Academy Center said...

I'm always looking online for articles that can help me. I think you also made some good comments on the functions. Keep up the good work!

Best Data Science Courses in Bangalore

Hire Web and Mobile App Developer said...

Thanks for sharing this your experience with us about how you started using Zend Framework 2. PHP has many framework and Zend is one of them. If you have any requirement to Hire Zend Developers or any PHP web developers for your project. Please visit our website.