Welcome to LjGww's Blog

Here we will see...

Pages

Tuesday, May 10, 2011

Where I'm heading?

PHP I personally find a very balanced solution for writing web site automation. Quick enough, can be scaled, is not dependant of platform, browser neutral, well documented, easy to use... I find this as benefit. Of course some will toss in its OO approach, extensive libraries and a lot of third party know-how. Nice.

It is not my favorite though from the aspect of the language - I am fan of ruby and C++, and reasoning behind this is currently out of scope for this writeup. I wanted something else here.

PHP have very nice OO system, simple, effective, just enough not to get into the way and just enough that you can "organize" concept in chunks of convenience.

How do I jump on writing a "large" application in PHP?

I can make libraries myself, use a lot of PEAR stuff to do side-work but this requires analysis of the whole system. This is time consuming. You can't write large library of things overnight.

As Internet user I step on common sites like Facebook and Twitter, news sites, shopping sites, banking sites, repositories, personal views (like this one I am writing).

All of them are some sort of an application. Many of them possibly written from scratch as PHP was once upon a time a "form" processor. Yes I have used it very very early :)

If you wish to build a web site, that is nothing easier today. Start simply by creating a blog. Couple of clicks here, couple of configurations there and hey! there is decent web site.

If you wish to go deeper there is plethora of ready-made software for various purpose - wanna discuss - internet forums - wanna publish/edit web site - a number of cms-es. Wanna imitate facebook success and have something in between discussion and publishing - hey there is social network softwares.

Many things on the web come nowadays as SaaS. Which is great concept - people who make software make it at one place and people who use it pay some rent to use it.

But how to write your own application by not "twisting" cms'es?

Not that I find this approach wrong, on the contrary - twisting cms-es is great method to make your web site and possibly automate it with some plug-in here and there. It really depends on a need.

So after many talks with friend here and there, I got a suggestion: Prado framework. Quick glimpse over its functionality and you realize this is large animal to chew on. But somewhere on the road I also got hinted to Yii as being "successor" of Prado. Looked fresh and more inviting.

Spend days trying to understand nuts and bolts of it. Acquired a book. Hmmm.

After a lot of clicks and trial and error i managed to make something.

It turns out not to be too complicated. But I had some sort of not being really happy with it. Yii (and I presume Prado) are absolutely great to write web application - for example - you want to write a ledger application.... You develop database model and Yii helps you to make code that runs about it. This is great but not exactly what I am looking for. I want to make large application that is web site too. Second thing is that Yii is several tenths of megabytes of upload. This is less of a problem because you need to upload library only once to a target web server and then you changes/uploads are relatively minor.

Still I wanted some flexibility, something that balances structure and help and from another side offers me more openness.... to be what I want it to be.

So i went to research PHP frameworks a bit more. There are some resources on the net that compare them. Which is not very useful not even mentioning all of them. But after some time I stepped on something smaller than Yii - Kohana. Again - couple of days to understand what is going on in there. But some comparisons emerge from the beginning. Kohana is much smaller than Yii (ad hoc about 5 times smaller) - not too large to upload. It defines structure but do not impose design. You can write whatever you want from scratch. Do not take me wrong - with Yii you can do the same, it has "themes" as for customization, but Kohana opens me a flexibility needed to build how I want it to be.

Now to my knowing and investigation Kohana is "new kid on the block", it still lacks a lot of documentation and experience of third kind, but looks to me promising. I am of adventurous kind, and possibly if I am more "strict" I would possibly contemplate Code Igniter as being longer around.

The choice has not been made yet. I first want to 'understand' what all these framework want to solve and offer and then choose one that I find most suitable.

On a track side there are some thoughts. But they do belong to another section of this blog.




No comments:

Post a Comment