PHP, JS & Service layers: Blend like never before

By Freeaqingme on Monday 14 March 2011 20:15 - Comments (9)
Category: Zend Framework, Views: 17.355

The past week I've been only programming (clientside) Javascript, and last night I finally got to tying it all to the serverside app, which is written in PHP. While adding some functionality to my Service Layer, it came to mind how much slower this process was in the past. Tweeted about that realization, and was asked to blog about it, so here I am.

As mentioned, I use service layers (stricly spoken that should probably be singular). All they do is proxy requests to my mappers, and in the mean time log the request and check if the user performing it is actually allowed to do so.

When adding a new feature to the clientside part of my app I used to add a function to my javascript that performs an xmlhttprequest to a custom url, parse the output, and then update one or more elements based on the result. Serverside, I would then add a route to the file where all urls are mapped to their relevant module/controller/view, created a controller or action that would parse the data as was received from the javascript, call the appropriate method in the relevant service class, parse the result from the service layer call, and send it back to the client. Yes, you're right: That's quite a tedious job indeed.

Read more »

MariaDB: Replaces Mysql, gives you more (without effort!)

By Freeaqingme on Saturday 1 January 2011 20:59 - Comments (21)
Category: Linux, Views: 24.464

Mysql. It seems these days everybody doing something in the IT branch has used it, or still does. However, there are some problems: you only get the fun stuff (like clustering etc) if you pay big time, its development is stalling (more and more core developers are leaving), a seemingly evil company is running it, and last but not least, the community is being excluded.

There is a solution though. It's called MariaDB. MariaDB is a fork of Mysql, and was started by Michael Widenius (aka Monty), the original author of Mysql. MariaDB is a project that actually is as open to the community as can be, releases all its code under a truly open license like the BSD/MIT license whenever possible and is able to add new functionality at a much faster pace than Oracle does. Last but not least, MariaDB is 100% backwards compatible with Mysql, and therefore can be used as a drop-in replacement.

Read more »