Posts tagged: php

My “experience” with web-programming languages

Listen to this Post. Powered by iSpeech.org

HeyHey reviewsHey reviews ho guys, I want to write about my OWN experience in different programming languages. This is only MY personal view. So don´t take it to serious :) (Oh and its from the view of web development )

Java: This language was made for persistent client side applications which are aimed for portability. Java was never intended on a “per” request base. Like other web programming languages. Java is like regex in greedy mode. There scenarios where it might be useful to use it, but in general it is to much. (RAM, CPU power and so on)

RubyRuby reviewsRuby reviews: If you say Ruby, you have to say Rails (Ruby on Rails: RoR). Ruby is an awesome programming language. Maybe THE best web-programming language out there. It is a pleasure to program and code in RoR. The only drawback is, if you want to extend RoR. With all its hooks, API calls and “standard” over configuration paradigm. You have to crawl deeply into he API to extend it. I don´t mean simple MVC “extensions”. This is by far the easiest (And probably) the best way to extend it. But if you want more complex, more independent project plugins, it is a pain. Beside this problem RoR is slow, sure you could cache, cache and even more cache. But I think caching should be a boost to your application. Not a solution of a problem.

PHPPHPPHP: The world leader, the world best and well known web programming language out there. There is no problem which could not be solved with php. It is fast, reliable and “spread” around the world on nearly all servers out there. And if the server can´t run PHP, you could extend it, to run PHP. There plenty of frameworks out there for PHP ( If I remember right, someone counted 130). Which are written in an opensource license. If you don´t like one, just chose another. If you want a job in web programming, it is like a guarantee to get one. This are the good points of PHP, now the drawback(s): It has a sluggish and splattered not well written “API”. Sometimes functions which do string manipulation are written with underscore, sometimes without. (As an example). The OOP in PHP is more like an addon and not well integrated. There still hosts/servers out there which only run PHP4 (PHP without real “OOP”)

PythonPythonPython: This is a programming/ script language which gets more and more attention. I am just starting to get in touch with this programming language. So my points maybe something like a hype or not really from experience. This language looks also a bit sluggish,with strange signs in code :) . But it looks very promising, feels fast and expendable and is well documented. I would say to sum it up: If you don´t like Java, Ruby or PHP, this looks like the perfect balance between performance and OOP for web programming languages.

I will never return to RoR or Java, mybe I will return to ruby if something better than RoR would come out, but my personal favorite at this moment is python/ django!

Short overview PHP 5.3 Frameworks

Listen to this Post. Powered by iSpeech.org

YesterdayYesterday reviewsYesterday reviews I started crawling around the net, about new Frameworks which are build around the new PHPPHPPHP 5.3 version ( formally known as 6 )

Things I found (Later on I will write a few words about them)

Symfony 2.0: the big leader
Shozu: the mini enemy
FatFree ( F3): Another mini
FLOW3: EnterpriseEnterprise reviewsEnterprise reviews “grade” framework

Well, I dont think I had to write much about Symfony 2.0. At this moment it is one of the “big” candidates which will lead over any other 5.3 framework. At this moment there is a sandbox where you could play around with Symfony 2.0 ( but undocumented, or better: No tutorials or something like this ) And a buggy (at least for me) Repository which dont looks often updated at this moment.  This framework should be released at the end of this year (2010). At this moment the symfony foundation  is in contact with phpbb which wants to use symfony 2.0 for its next version as the backend framework. Which dont seems to be a bad idea. And last but not least, the benchmarks about this framework sounds very promising. Ok I know those benchmark are more “fake” then real, or better: They are tweaked for Symfony, but at least it will be faster than Symfony 1.4 :)

Another good candidate is Shozu, ok this one is not real a framework. Its more like a “micro” framework. But it has something really interesting integrated, it is called ReadBean, this is an ORM with automated TABLETable reviewsTable reviews and ROWRow reviewsRow reviews creation. So, no more hazzle around with “inis” yaml setup or whatever you normally use on ORMs like doctrine. just setup the connection and go on with whatever you want. The only problem is see is while you develop, you sometimes  change the database setup. Which would lead to “unused” rows, or even tables. Or if you misspell something, and create two similar rows, where on has only one entry, and the rest is in another row. It could be hard to find the error, why you get a nearly empty page… But maybe this is not a big problem, or there is a solution for build in it but I dont found it. But it has everything you need from a “basic” framework: ORM, Jquery, caching, URL rewriting for clean URLs, and ImageImage reviewsImage reviews manipulation. For a better Jquery experience it has taconite integrated, and a small example.

FatFree is another mini framework, which is (in there words) condensed in one 60K file. So far it looks like a basic framework. Without really “cool” features. Only basic MVC, but there are a few plugins which you could “activate”. The other problem is that you get a special license. The code is released under “GPL” but if you want to use it “commercial”, you have to pay for it. Another problem is that the dont tell you how much you will pay for it. SO I dont recommend it as your standard framework. Only if you want to learn from sourcecode or you just want to experiment with it….

FLOW3 looks like another “big hope” in PHP 5.3 scenario, it looks really thought out, complete and promising. Another problem is that it looks really complex (but Zend is also complex) So I guess it could be competitor to Zend (they dont claim it) but I guess they want to compete versus Zend. Sure it is a hard target they (maybe) set. But they are the creators of typo3, so I guess they know what they are doing :)

Last but not least: Dont chose “your” framework, based on performance or popularity. Chose the framework you like!

Say No2SQL or NoSQL – MongoDB

Listen to this Post. Powered by iSpeech.org

One year ago ( or even more ) I found which was called MongoDB. This database  concept is designed around “NoSQL”. The first time I saw it i thought: Uh, why the hell should I use it? And even the syntax it is used to get access to the stored data locked weird to me. You access your data like an array ( In general ). And I thought: It must be slow, if you compare MySQL, for example, against MongoDB. The idea was, as every language when you remove int, string and so on, the engine must first find out, which type of data is stored. But after reading a few benchmarks and tutorials about it. I can´t admit, that this database “type”. Is pretty powerful, easy to use and amazingly fast.

But you might still think: Why should I use, learn or even keep an eye on it?

Well, most users forgot, or at least: don’t want to know what happened to the MySQL developers. ( They were bought by SUNSun reviewsSun reviews/ OracleOracle reviewsOracle reviews ) They promised to keep MySQL alive as it is. And want to keep it opensource. But we all know that this is just a promise… The EU still keep an on SUN/ Orcale and MySQL. Cause they fear the same thing as many users fear. I dont think they could “close” MySQL now or later. But they could do other things. Reduce resources, introduce buggy versions. Stopping to work with the community and much more.

But now I don´t fear the death of MySQL, MongoDB is getting better and better. And if MySQL lose users, MongoDB will get more users :)

LinkLink reviewsLink reviews: http://www.mongodb.org/

The tutorial/ blog, which opened my eyes: PHP-Classes-MongoDB

Ecoder – webbased “ide”

Listen to this Post. Powered by iSpeech.org

Hello guys,

sorry for the lack of posts, or (never ) answering comment questions. I was too addicted to Allods and “HeroesHeroes reviewsHeroes reviews of Newerth”. Both are realy cool games. But Allods did too many mistakes and… failed :( . But this is another story.

TodayToday reviewsToday reviews I want to write about something useful, which could be called a “Web-IDE”. This small tool is perfectly for “quick and dirty” editing of files on your server. Or if you want to code from your IPhoneiPhoneiPhone or something similar. While you are on the way to your girlfriend in your train :)

Sure it is not perfect, but is amazingly fast and small. It has everything you need for your dirty trix on the fly.

Summary:

  • File-Browser
  • Syntax-highlighting ( Which works in real-time! )
  • Tabbed file opening
  • File-Uploading
  • Generalgeneral reviewsgeneral reviews file modifying ( open, close, rename, new, rename… )
  • And shortcuts to make your life easier ( The about on there website claims:
    keyboard short-cuts lend it the feel of a locally installed application. )

LinkLink reviewsLink reviews: Ecoder

Note: This project look like it is dead, but on the sourceforge forum the author claimed that he “restarted” his project.

GD Image Rotation Low Quality / Poor Performance error on debian

Listen to this Post. Powered by iSpeech.org

If you get a error message like this one:

The installed version of PHP GD does not support image rotations. It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHPPHPPHP. You should recompile PHP –with-gd using the bundled GD library. See: http://www.php.net/manual/en/image.setup.php. An implementation of imagerotate in PHP will used in the interim.

And you run a debian LinuxLinuxLinux server and you have access to it. And you don´t want to recompile (it) . Here is the solution for it:

You could use the dotdeb repository. It has everything you need. Just set this sources:

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

In your:  /etc/apt/sources.list file

RunRun reviewsRun reviews apt-get or aptitude, and your done

Drupal domain access module

Listen to this Post. Powered by iSpeech.org

Well, tried hard to get the fine module to work. But I cant… ProblemsProblems reviewsProblems reviews I run into:

After adding a node returned to wrong domain ( main domain ) fixed by ucommenting out the $base_url variable
in settings.php

ContentContent reviewsContent reviews not shown on right site ( all sites ), every time all “pages” are shown on all sites.
Or they where only shown on one site, even when all sites are selected.
This could be fixed by using “views”. But this would mean much work.
Cause you have to create MANY views…

well, I will use the normal, multi site setup of DrupalDrupalDrupal

Better than piwik

Listen to this Post. Powered by iSpeech.org

I searched for something which could replace piwik. Cause it is not stable ( OsDate crashed with it )
I searched around and found on a blog a comment about open web analytics. A long time ago,
I saw this php website analytics tool. But I was not interested in something like this. And forogt about
this one.

Then I “re-found” it, and tested it. And I must say: Iam impressed. This tool works nearly out of the box.
You just have to make changes in the config file, related to your web-address and database settings. Add your site
Add your tracking code ( A javascript “similar” to google analytics ). And you are done, nice!

And the api looks much more “thought-out” than the one from piwik.

Here are the features from there website:

Invocation

  • PHP API – invoke OWA from within your PHPPHPPHP application. This allows for an easy way to build web analytics right into your application logic.
  • Javascript Tag – invoke OWA from Javascript. This allows for remote logging and integration with non PHP based applications .
  • WordPressWordPressWordPress v2.x plugin – full featured WordPress plugin seemlessly integrates OWA with the WordPress publishing platform and administration interface
  • MediaWikiMediaWikiMediaWiki plugin – provides tracking of MediaWiki articles and special pages.

Tracking/Reporting

  • Track Page views, visits, and unique visitors over time
  • TrackTRACK reviewsTRACK reviews unique, new, repeat visitors over time
  • Multiple Web Site Support – track any number of web sites and view statistics in aggregate or by site
  • ClickClick reviewsClick reviews-streams – view the actual click-stream of each visitor
  • Click Tracking – Track where exactly on a web page users are clicking and view clicks by browser type
  • Click Heat Maps – view a heat map of where users are clicking on your web pages
  • Google MapsGoogle MapsGoogle Maps – map your visitors on Google Maps
  • Google EarthGoogle EarthGoogle Earth (KML) – view your visitors in Google Earth via a KML file export
  • RSS/ATOM subscription tracking – track unique feed readers, reader types, and feed requests
  • Visitor Aging – understand the age of your repeat visitors.
  • Canned and Custom Time Periods – generate reports using pre-defined reporting periods or custom date ranges
  • Refering Page Analysis – View the title, anchor text, and surrounding text of inbound links from refering web pages
  • View visits by user agent
  • Track entry and exit pages
  • Track pages by custom page types

Development

  • Full MVC based framework
  • Module framework allows developers to extend OWA’s entitiies, events, reports, and graphs without modifying the base components.
  • Plugin framework for authentication, database access objects, data validation, and geo-location
  • Object Relational Mapping layer
  • Lite templating layer
  • Event handlers

Deployment

  • Events can be writen to the database asynchronously.
  • OWA to can run on multiple front end web servers and write to a remote database.
  • Event Logging and admin/reporting user interface can run on the same or seperate servers

WordPress Specific Features

  • Track visitors by WordPress user name or e-mail address they use in comments.
  • Track all Wordpress Page Types (Posts, PagesPages reviewsPages reviews, Authors, Archives, Categories, etc.)
  • Track the number of comments made by visit
  • Reporting accessable via Admin Dashboard
  • Track subscribers to RSS/Atom feeds

MediaWiki Specific Features

  • Track article , catageory and special pages.
  • Track all visitors by user name and email address.

Quite impressive, eh? :)

now I run crawltrack for, uhm, well crawler things. And OWA for website statistics.

The only problem so far is the “click-map/ heat map” It shows the click points. But not the website.
I hope they will fix this “small” issue :)

I dont know, why this both programs are not more popular? Together,
they create a VERY strong team!

LINKSLinks reviewsLinks reviews:
http://www.crawltrack.net/

http://www.openwebanalytics.com/

LouiseBrooks theme byThemocracy