Welcome to LjGww's Blog

Here we will see...

Wednesday, May 25, 2011

Mobile web

I am contemplating how to adopt a web site to be more suitable for the mobile phones. I have stepped on a set of solutions that may provide an answer to this question and cover more than one phone type.

http://mashable.com/2010/08/11/cross-platform-mobile-development-tools/

Writing application for each phone seems a bit tedious business. I guess that producers will hit the wall of cross compatibility. It is cool to have a native app for your phone, but multi-phone development is costly, and maintenance of several lines of mutually exclusive phone os-es applications even more. Thus I guess we will go to a deadend with specific apps (except for games and system utilities for each phone). Already top 10 apps on iPhone are games - I've seen nothing serious.

Sunday, May 22, 2011

Cloud

As every IT hype in the past couple of decades it goes in the same fashion. Someone yells some buzz, then everyone buzz the buzz, and then some catastrophic event spins the buzz....

What I have heard in last years - virtualization, virtualization, cluster, cluster, cloud, cloud, cloud, cloud, cloud, cloud.

While you try to explain that you need to backup, your manager hits you with the $$$ speech. And it goes then they fork $$$ more than they saved $$$ before, to do the remedy.

It is hard to keep repeating: there is no silver bullet solution! You cannot shoot a problem with one solution. But that part hardly gets understood.

http://www.bbc.co.uk/news/business-13451990

Wednesday, May 18, 2011

Going, not going...

Past several days have been switching and resting. Little bit of graphical design fiddling with HTML divs and trying to make something working. Found that divs are very hard to control if one is working in percentage world. Now I understand designers why they go to fixed pixels. HTML is not easy to control. At the end I needed to combine TABLE and DIV approach to align things and I am still not satisfied with the result. It could come as crazy statement but HTML/CSS is not covering "floating" layouts easily - a lot of tricks.

When I get saturated with HTML design, then I switch to PHP. Kohana is coming good. Just controller/view system is doing great job. Make template, make control, populate template, do some HTML design. In iterations.

When I get tired, I get out of the circle, read articles, email, messages... and along the way I have stepped on a HTML/JavaScript that may surprise you - whole linux in a browser "terminal" window. Furthermore it turns out that this person  Fabrice Bellard is making a whole simulation of the Terminal and 80x06 and Linux on top in JavaScript! For me this is amazing! A unix/processor emulator within the browser. Try it for yourself: http://bellard.org/jslinux/ Note that you need at least Firefox 4 or Chrome 11 (not the latest Chrome 12). Script will tell you if it is going to work in your browser. This makes my day. There are things worth making.

Another thing I have stepped on is purely mathematical X^4+X^2=1. It says 85% of people cannot solve this. After all this programming, I also found out that I completely forgot some algebraic transformations. Yes I can solve this by using computers - what a waste of CPU cycles, but that would be beside the point. 

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.