I've heard people complain about the lack of documentation for Solar. While I generally agree, there's something I have to say to defend Solar. There's also a few things about framework documentation in general that I feel the need to talk about.
These guys are my new heroes.
There's more to this music than just metalcore. They've succeeded to create metalcore that is as interesting as some of the progressive music I listen to.
Check out the video they made for Composure.
I'm hearing they'll be in Helsinki Oct 15th. I'm so looking forward to seeing you ABR!
Links:
augustburnsred.com
MySpace
I hate it when I see that a library or a framework has a module or a class called "util". What this means is that they didn't know where to put those code pieces, and so they just dumped them to this trash can called "util".
Let me tell you, it's wrong.
You end up with code that makes you always think: "was it here, or in the 'utils'?"
There's a place for everything, find it.
In my previous entry about SQL authentication with Solar I promised to tell about implementing Persistent Logins (a.k.a "Remember Me" -feature) with Solar. I will use the previous entry as a starting point and add functionality to it, so be sure to read it first. I will first describe the idea and then show how you can implement it on your site.
The code is part of the Lux project that I maintain together with Rodrigo Moraes.
Chris Cornutt (a.k.a enygma) launched a new version of PHPDeveloper.org. The site is now powered by Solar!
It is always good to hear about new sites running on Solar. What makes this special is that Zend Framework got replaced by Solar :-).
Git mirrors up for Solar, Sungrazr and Lux
5 Mar 2008 @ 21:48:55 3 commentsJust a quick note to let everyone know that I've set up git mirrors for Solar, Sungrazr and Lux. I'm pulling new changes every hour or so. For example, to clone Solar you would do:
git clone http://git.anttih.com/project/solar.git
These are all unofficial mirrors. All of these projects use Subversion as their official version control system. I just have to use git locally for managing all my patches. More about my git experiences in another post.
Sungrazr is Peripheral libraries for the Solar Framework and it is maintained by Clay Loveless from Mashery fame.
Lux is also a set of libraries for Solar maintained by myself and Rodrigo Moraes.
Setting Up SQL-based User Authentication with Solar
4 Mar 2008 @ 02:14:20 2 commentsI think it's a pretty common habit to have your usernames and passwords stored in a database table. This little tutorial shows you how to implement SQL-based authentication with Solar. Because of Solar's tight configuration mechanism, this is a walk in the park.
I had a weird experience a while back when implementing a cache for one of my sites. I figured I'd use APC's user cache because it's pretty fast. All was fine and the site seemed to work really fast. So next thing I did was try ab on it to see how fast it really was. Man did the performance drop. The whole server collapsed! I couldn't make a single request to the server.
The cache was for DB query data (surprise :-), so I took a look at show full processlist. It showed it was running queries multiple times that should not have been running at all. This seemed weird, to say the least.
Next, I took a look at APC's status with apc.php and saw my cache keys there like they should be. So again, I tried ab and refreshed the stats page. Now it displayed a completely different page than previously; some of the keys were missing. I tried refreshing, and again, the results changed.
Then it hit me. It must have something to do with the nature of FCGI because my ab tests would make Apache to spawn new FCGI processes to be able to handle concurrent requests (ab -c). It's pretty obvious: APC has it's own cache for every FCGI process. Not only for user cache but for opcodes as well. With opcodes this is not so bad but a user cache will take a lot of your memory if the same data is stored multiple times. It can also be really slow to setup cache entries for every process.
I didn't want to have data cached multiple times in memory so I switched to memcached. Memcached sends data over a TCP connection so it's a bit slower than APC user cache, but who cares.
Because I'm such a Solar fan-boy I'll tell you that Solar has cache adapters built-in for both APC and memcached. See the full list of cache adapters for Solar here.
Oon jo jonkin aikaa pohdiskellut että suomalaisille PHP käyttäjille pitäs saada jonkinlainen yhteenliittymä aikaseks. Tällä hetkellä jengi on aika hajanaista, eikä monikaan tunne toisiaan. Ainakin näin on omalla kohdallani. Joka ikinen kerta kun oon päässyt rupattelemaan muiden PHP ohjelmoijien kanssa niin on ollut todella hauskaa.
Tiedän että ainakin Brain Alliance Solutionsin joukossa on monia taitavia ohjelmoijia. Myös Nemein on minulle tuttu.
Luulen että paras tapa aloittaa olisi perustaa käyttäjäryhmä pääkaupunkiseudulle. Valitsin Helsingin koska se on pääkaupunki :-), ja koska olen itse Espoosta. Tämä ei tietystikään sulje pois muualla asuvia.
Perustin alkajaisiksi phpug-helsinki postituslistan. Olisi hienoa jos kaikki yhteistoiminnasta kiinnostuneet PHP ohjelmoijat voisivat kommentoida tähän postaukseen ja/tai liittyä postituslistalle. Bonuksena voisit kertoa kuka olet ja mitä teet.
Olen varma että tällainen ryhmä auttaisi työnhaussa sekä rekrytoinnissa, puhumattakaan siitä mitä kaikkea muilta ohjelmoijilta voi oppia.
Template Partials With Solar_View
27 Jan 2008 @ 16:55:23 No commentsIn this entry I'd like to demonstrate how you can create reusable view templates with Solar and use them with Solar_View::template() and Solar_View::partial(). I'll tell you why partial() is much practical when reusablility is your goal.
Welcome to anttih.com! :-)
Categories
Links
Latest Entries
- About Solar's documentation
- August Burns Red kicks ass
- "util" is wrong
- Persistent Logins with Lux and Solar
- PHPDeveloper.org made it's move to Solar
- Git mirrors up for Solar, Sungrazr and Lux
- Setting Up SQL-based User Authentication with Solar
- APC user cache and FCGI
- PHP User Group Helsinki?
- Template Partials With Solar_View
- First Post

27 Jan 2008 @ 18:55:37 